Test Patterns

12 thoughts
last posted Sept. 12, 2014, 9:50 p.m.

3 earlier thoughts

0

Unit Tests

The purpose of unit tests is to verify that you understand what an individual unit of your code does at the moment that you write it.

A "unit" is a function or a method; some part of your program that has a discrete amount of behavior.

That is the only purpose of a "pure" unit test, and it is possibly the most important aspect of testing, although not the only important aspect of testing.

As a labor-saving measure, you can have unit tests serve other purposes as well.

8 later thoughts