Saturday, December 15, 2012

Unit Testing Checklists

Unit Testing Checklists

I believe that unit testing is must if you want to write good code. Some programmers do not understand this and keep on underestimating the power of unit testing. Below are some of the unit testing checklists which you can read in order to have a better understanding of what’s there in unit tests.

A good unit test should have the following properties:

a. It should be automated and repeatable.
b. It should be easy to implement.
c. Once it’s written, it should remain for future use.
d. Anyone should be able to run it.
e. It should run at the push of a button.
f. It should run quickly. [Source: The Art of Unit Testing with Examples in .NET by Roy Osherove]

Below are some of the good unit test checklists on web:

1. Checklist for Unit & Unit Integration Testing [Link]
2. Good Unit Test Checklist [Link]
3. Unit Test Checklist [Link]
4. Unit Test Review Checklist - University of Michigan [Link]
5. Pragmatic Unit Testing: Summary [Link]
6. Unit Testing Checklist by Alexander [Link]
7. Checklists: Conducting Unit Tests [Link]