This is a method of testing software that is part of the development process. Developers create tests to test each unit (objects or groups of related objects) as it is being written. At any stage, often prior to checking in
the code into a VCS
, the tests can be run and if any fails then the code has to be amended. As new code is written in the unit, new tests are added. This increases the developer's confidence in their software by catching bugs that might have been missed.
Unit testing is easier to implement with new code rather than be added to existing code.
Also Known As: Unit testing
Simple test frameworks such as Nunit and Cppunit simplify the creation and management of unit tests.