Kent Beck pointed out at his desired test properties, that tests should be:
- Behavioral - tests should be sensitive to change in the behavior of the code under test. If the behavior changes, the test result should change.
- Structure-insensitive - tests should not change their result if the structure of the code changes.
Making sure, that these properties hold, is very easy. I check that:
- When I add/remove behavior I must perform changes in the test-files as well
- When I change the structure, I don't touch the test files
These are powerful heuristics.
Comments
Post a Comment