Thursday, December 17, 2009

Unit Testing: Properties of Good Tests

Some more gems to remember from the Pragmatic Unit Testing book. Properties of good tests should be A-TRIP:
  • Automatic - unit tests need to be invoked and the results checked automatically
  • Thorough - need to test everything that is likely to break
  • Repeatable - every test should be able to run over and over again, in any order, and produce the same results
  • Independent - tests should be tightly focused, and independent from the environment and each other
  • Professional - tests must be written and maintained to the same professional standards as production code

No comments: