O'Reilly logo
  • Alexei Ershov thinks this is interesting:

A unit test is an automated piece of code that invokes the unit of work being tested, and then checks some assumptions about a single end result of that unit. A unit test is almost always written using a unit testing framework. It can be written easily and runs quickly. It’s trustworthy, readable, and maintainable. It’s consistent in its results as long as production code hasn’t changed.


Cover of The Art of Unit Testing, Second Edition: with examples in C#


unit test definition