- Last edited August 8, 2001 |
For an existing team, introducing test up-front can be fun. So someone in your team has written some classes without auto unit tests. What to do?
1. PaulS suggests pairing with them to write all the missing tests, take one method at a time and find a test to write. Resist the temptation to refactor or change any code (see FearFactor).
2. When your partner is comfortable all the tests cover all the paths through the code, version the lot. Then why not try deleting something you spot - remove an untested try-catch block, or "b" in "if a or b" where only "a" is tested! Run the tests - you may need to add a test or two!
- Last edited August 8, 2001 |