Difference between unit testing and component level testing

There are different levels of testing a programmer can do, the must read Code Complete differs the following types of tests: unit testing, component testing, integration testing, regression testing and system testing. The terms unit testing and component testing are quite confusing to most people.

Within unit testing you use stubs and mocks to test directly your code. The code is tested in isolation. Typical things you want to stub are hardware, networks or databases.

Component level testing is situated at a higher level. You remove the stubs and mocks and test your code against the real thing. So you remove the stubbed hardware interface and put a real device to the test.

Posted in TDD by Bruno at July 21st, 2013.
Tags: ,

Leave a Reply