Unit testing increases confidence in maintaining or changing the code. Good unit tests also increase the detectability of defects that may arise when changing codes. The development of unit testing is faster. The test runs take very less time as there is no need of firing the GUI and providing all the inputs.
Additionally, fixing defects detected during unit testing costs lesser than in higher levels of testing (Craig & Jaskiel, 2002). Debugging at this level is easy since only the latest changes need to be debugged contrary to higher levels where changes made over the span of several days or weeks may need to be debugged (Software Testing).
There are limits to the number of scenarios and test data that a developer can use to verify the source code. This means that after exhausting all options the developer has no choice but to merge the code segment with other units (Software Testing).
Integration testing involves testing combined parts of an application to determine if they function correctly together. Integration testing is performed after unit testing and before system testing. Integration testing is necessary to identify faults in the interaction between integrated units. Test stubs and test drivers are useful in performing integration testing (Tutorials Point).
When manufacturing a ballpoint pen, the body, the cap, the clip and tail, the ballpoint, and the ink cartridge are unit tested separately. When the units are ready, they are assembled and integration testing is performed. For instance, one would test whether the cap fits into the body (Tutorials Point).
Big bang approach involves combining all or most of the units together and testing them together.