5. #2 – Smoke Tests
Confidende Testing, Build Verification Testing
Smoke tests are a subset of test cases that cover the most important functionality of a
component or system
It uncovers problems early.
used to aid assessment if main functions of the software appear to work correctly.
7. #2 – Smoke Tests
Advantages:
Covers most of the major functions of the software but none of them in depth
Showing Build is stable enough to proceed with further testing.
Framework Upgrade
Legacy code
Refactoring
8. #3 – Integration Tests
Testing performed to expose defects in the interfaces and in the interactions between
integrated components or systems.
Incorrect or missing functions
Interface errors
Errors in data structures or external database access
Behavior or performance errors
Initialization and termination errors
9. #3 – Integration Tests
Analogy, during the process of manufacturing a ballpoint pen…
When two or more units are ready,
they are assembled and Integration Testing is performed.
For example, whether the cap fits into the body or not.
14. #3 – Integration Tests
Validation
Authentication (Laravel guards, Web, Api - Oauth)
Authorizations (Laravel Policies)
Database Storing
Pagination
Filters
Response (HTTP Code + message)
External API (no recommended)
What’s to test?
15. #4 – Unit Tests
The purpose is to validate that each unit of the software performs as designed.
A unit is the smallest testable part of any software
It usually has one or a few inputs and usually a single output
The smallest unit is a method, which may belong to a class.
Unit Testing is the first level of software testing
16. #4 – Unit Tests
Advantages
Unit testing increases confidence in changing/ maintaining code
Development is faster. How? …(GUI, Breakpoints)
The cost of fixing a defect detected during unit testing is lesser in comparison to that of
defects detected at higher levels.
Debugging is easy.
Codes are more reliable. Why? … (No comments)
17. #4 – Unit Tests
Mock - In unit tests, mock objects simulate the behaviour of real objects. They are
commonly utilised to offer test isolation, to stand in for objects which do not yet exist, or to
allow for the exploratory design of class APIs without requiring actual implementation up
front.
PHPUnit
Phony
Prophecy
Mockery
19. #4 – Unit Tests
Mocking Service - When testing Laravel applications, we may mock certain aspects of your
application so they are not actually executed during a given test. Laravel provides helpers
for mocking events, jobs, and facades out of the box.