Tests are grouped together based on where they are added in SDLC or the by the level of of detailing they contain. In general, there are four levels of testing: unit testing, integration testing, system testing, and acceptance testing. The purpose of Levels of testing is to make software testing systematic and easily identify all possible test cases at a particular level.
These testing levels are designed to recognize missing areas and reconciliation between the development lifecycle states. In SDLC models there are characterized phases such as requirement gathering, analysis, design, coding or execution, testing, and deployment. All these phases go through the process of software testing levels.
Levels of Testing
A unit test is the smallest testable part of an application like functions, classes, procedures, interfaces. Unit testing is a method by which individual units of source code are tested to determine if they are fit for use.
Unit test is white box testing technique and it is conducted by developers.
Unit testing techniques:
- Basis path testing
- Control structure testing –
- Conditional testing
- Loops Coverage
- Mutation Testing
Advantages of Unit Testing
- Reduces Defects in the Newly developed features or reduces bugs when changing the existing functionality.
- Reduces Cost of Testing as defects are captured in very early phase.
- Improves design and allows better refactoring of code.
- Unit Tests, when integrated with build gives the quality of the build as well.
In Integration Testing, individual software modules are integrated logically and tested as a group.
Integration testing focuses on checking data communication amongst these modules.
Integrated Testing is white box testing technique
Integrated Testing is conducted by the developers.
Approaches of Integration Testing:
- Top Down Approach:
Another very significant integration testing approach, top-down integration allows the team to test the top levels of units first, after which lower level units are tested by them step-by-step. It requires stubs to stimulate the lower level units.
- Bottom Up Approach:
This approach of integration testing tests the bottom level units first and the upper/top level units. Bottom-up testing requires drivers to stimulate higher level units in the software.
- Sandwich Approach(Hybrid):
Also known as hybrid integration, sandwich integration testing is a combination of both top-down and bottom-up integration testing. This approach offers advantages of both of these integration testing techniques and helps testers eminently.
Advantages of Integration Testing
- Faster development, a confident level is high.
- Easy to integrate different modules.
- It is easy to test.
- Code coverage is high and easy to track.
- Provides major assistance in creating real-time use cases.
- Top-Down or Bottom-Up integration testing starts at early stages of software development and bugs are caught easily.
- Tests run faster than end to end testing.
- It easily finds system level issues like, broken database, integration mistakes and more.
In system testing the behavior of whole system/product is tested as defined by the scope of the development project or product. It may include tests based on risks and/or requirement specifications, business process, use cases, or other high level descriptions of system behavior, interactions with the operating systems, and system resources.
System testing is most often the final test to verify that the system to be delivered meets the specification and its purpose. System testing is carried out by specialists testers or independent testers.
System testing should investigate both functional and non-functional requirements of the testing.
System Testing focuses on the following aspects:
- User Interface Testing(GUI)
- Functional Testing
- Non-Functional Testing
- Usability Testing
Advantages of System Testing
- Verifies the system against the business, functional and technical requirements of the end users.
- It helps in getting maximum bugs before acceptance testing.
- System testing increases the confidence level of the team in the product before the product goes for acceptance testing.
- It is the first testing level in which the whole system is under test from end to end. So, it helps in finding important defects which, unit and integration testing could not detect.
- This testing phase uses the test environment which is similar to the real business environment or production environment. Consequently, it helps in boosting the confidence of users into the product.
- It is a black box testing hence testers do not need programming knowledge to perform it.
User Acceptance Testing
After the system test has corrected all or most defects, the system will be delivered to the user or customer for Acceptance Testing or User Acceptance Testing (UAT).
Acceptance testing is basically done by the user or customer although other stakeholders may be involved as well.
The goal of acceptance testing is to establish confidence in the system. Acceptance testing is most often focused on a validation type testing.
Advantages of User Acceptance Testing
- Validates that business requirements are met based on the in-scope user stories.
- This confirms that model builders correctly interpreted the business requirements.
- Reduces the risk of defects being identified in production.
- Fixing items in development rather than production is less costly and risky for the business.
- End users will gain skills and confidence while using the new system prior to going live.