Integration testing (sometimes called integration and testing) is the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before validation testing.
Integration testing takes as its input modules that have been unit tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing.
Below are the different types of unit tests according to Wikipedia:
- Big-bang approach
- Most of the developed modules are coupled together to form a complete software or major part of the system and then used for integration testing.
- This method is very effective for saving time in the integration testing process. However, if the test cases and their results are not recorded properly, the entire integration process will be more complicated and time consuming.
- Bottom-up testing
- Is an approach to integration testing where the lowest level components are tested first, then next level until the topmost level is tested.
- This method helps to determine the levels of software developed. However this approach is useful only when all or most of the modules of the same development level are ready.
- Top-down testing
- Is an approach to integrated testing where the top integrated modules are tested and the branch of the module is tested step by step until the end of the related module.
- Sandwich testing
- Is an approach to combine top down testing with bottom up testing.
Integration Test vs. Unit Test
Integration tests may use one or more of real dependencies of the units they test. Unit tests should not have any real dependency. It should only test one unit at a time. They are fully isolated and run independent of other tests.
Popular integration testing frameworks or helper libraries in Java
- Selenium (for Java UI Testing)
- Spock Framework
- You can also make use of frameworks and libraries listed under unit testing: JUnit, TestNG, DBUnit, Spring Test, Mockito.