Last updated at 12:12 pm UTC on 11 September 2006
If the behavior isn't tested, then it is legacy code.
Goals of testing:
- Find bugs – if the test can't find a bug, it's not worth creating.
- Assume there are bugs – focus on finding them, instead of trying to prove they don't exist.
- Stabilze existing code with as little change as possible.
- Once a class is covered by test, refactor it.
- Find bug
- Document bug with a test
- Fix bug
- Verify with test
Things to test for:
- Inputs (test sets, boundaries)
- Outputs/State changes (expected)