unit-testingtestingtddintegration-testingregression-testing

What is the difference between Unit, Integration, Regression and Acceptance Testing?


Is there anyone that can clearly define these levels of testing as I find it difficult to differentiate when doing TDD or unit testing. Please if anyone can elaborate how, when to implement these?


Solution

  • Briefly:

    Unit testing - You unit test each individual piece of code. Think each file or class.

    Integration testing - When putting several units together that interact you need to conduct Integration testing to make sure that integrating these units together has not introduced any errors.

    Regression testing - after integrating (and maybe fixing) you should run your unit tests again. This is regression testing to ensure that further changes have not broken any units that were already tested. The unit testing you already did has produced the unit tests that can be run again and again for regression testing.

    Acceptance tests - when a user/customer/business receive the functionality they (or your test department) will conduct Acceptance tests to ensure that the functionality meets their requirements.

    You might also like to investigate white box and black box testing. There are also performance and load testing, and testing of the "'ilities" to consider.