Incremental testing is one of the approaches used during the testing phase of integration testing. Integration testing is performed after unit testing.
Incremental testing uses several stubs and drivers to test the modules one by one. This helps us discover any errors and defects in our modules.
Incremental testing uses the following steps:
All modules are individually tested using unit tests.
Each module is combined and tested by incrementing it by one. For example, first, modules M1 and M2 are tested together.
Module M3 is added to the already tested M1 and M2 integration and then tested. Now, three modules are being tested together.
Module M4 is now incremented. Four modules are now tested together.
Similarly, all modules are incremented and tested for a successful integration together.
Top-down incremental integration: Top to bottom testing. Stubs easily replace any modules not available.
Bottom-up incremental integration: Top to bottom testing. Drivers easily replace any system components not available.
Functional incremental integration: Testing completed as per functionalities specified in the functional specification document.
There is significance provided to each module. Each and every module plays an important role in testing as they are incremented one by one.
The biggest advantage is how defects can be found in smaller modules, rather than re-working large files to denote the errors.