Unit Tests Are Confidence Assets and Specifications
A unit test is software which verifies the correct behaviour of another small piece (a unit) of software.
Whenever a software developer writes some code, she thinks that it is correct. The developer is confident in the code. However, confidence is not an asset of a software development project.
There is a way to create an asset from that confidence. Create a unit test.
A unit test is a confidence asset. It proves that the developer's code is correct. It continues to assure the correctness in the course of frequent changes to the software system.
That is the first major function of unit tests. Here is their second: Unit tests document the intended behaviour of the software.
So, a unit test has two values: it is a confidence asset, and a specification.
- Robin's blog
- Login to post comments