Difference between Unit Test, Regression, Integration, System and Acceptance
Based on the intended objective and the level of software considered in the individual testing activities, the following types differ:
- Unit Test (or Unit Test);
- Regression Test (or Regression Test);
- Integration Test (or Integration Test);
- System Test (or System Test);
- Acceptance Test (or Acceptance test both Alpha Testing and Beta Testing).
The development models, based on the current project phase, use different types of testing.
The Unit Tests or literally Test of Units is the activity aimed at determining the correctness and completeness, with respect to the requirements, of a program seen as a single module.
Recognized as a standardized model by IEEE (1008-1987), it is composed of the following activities:
- Planning of the approach, resources and timescales envisaged;
- Identification of the characteristics to be tested;
- Determination of the test set;
- Test execution;
- Check if other tests are needed;
- Evaluation of results.
The concept of unit or isolation of the module requires particular attention for references to services deriving from external components. They are simulated through the use of “Stubs” or “Drivers” to “replace” or “pilot” the control flow of the single test inherent to the context being tested. Other simulation techniques include the “Mock” or “Fake” of the data used to not access the external systems and be able to test only the unit of source code, simulating the value of the data that is normally provided by the external system.
Each time a software module is updated, the new version must maintain the functionality of the previous one. A regression test considers the case of verification of this compatibility through the execution of the two programs (old and new) on the same data (possibly converted to the new format) and the subsequent comparison of the results.
Regression tests can be done at the individual module level or on the entire test suite.
This type of test verifies the functional correctness in the iteration between multiple modules. Below are several techniques for testing the integration between the modules:
- Assemble the modules together incrementally;
- Assemble producers before consumers where the verification of the former provides the
- latter with a flow of control (calls) and flow of already correct data;
- Assemble all the modules and test the system as a unit (also called “Big Bang Test”, literally “big burst test”).
Every single integration test normally refers to an operational flow of the application.
By system we mean the complete software application, put into operation and reached the goal of the project. The system test is aimed at testing particular global properties of it. We can therefore distinguish:
- Stress test: to verify the properties of the system in overload conditions;
- Robustness test: to verify the properties of the system when the processed data are incorrect;
- Safety test: to verify the safety properties of the system.
The Acceptance Tests are part of the last phase before commissioning. Based on data provided by the user, a special version of the software called “Alpha Testing” is tested. Subsequently it is possible to release in production or use a second methodology, which can be used at each release. It consists in putting into production a version of the program called “Beta Testing”, available for a few end users who will carry out the acceptance activity using the system at an advantageous price to report any problems. In this second case, after the corrections reported, the new version will be released to all end users. This second methodology is adopted when the amount of end users is high and the system is very complex.