Test units in isolation. This comes from module specifications, visibility of code details, and tests the behaviour of single modules.

These tests run fast and help us localize problems. If something isn’t really a unit test, but it fulfils these requirements, its close enough to be considered one.

Choosing Test Cases

  • Not all test cases are significant
  • It is impossible to test everything
  • When choosing a representative from a class of tests, choose the test most likely to fail

Furthermore, test inheritance applies where tests that apply to all base classes need to apply to those that inherit from that class.

We need to test:

  • Valid inputs
  • Invalid inputs
  • Edited inputs
  • Input timing variations
  • Combination testing