Created
August 14, 2017 19:03
-
-
Save donabrams/30eaa4b41dfd3ee3f32173c217c0a4bb to your computer and use it in GitHub Desktop.
Testing tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Choose your boundary | |
2. Identify state | |
3. Test *just* the boundary | |
4. Any test that will be maintained (non-TDD) should have a positive and negative test | |
5. Unit tests can be thrown away at will | |
6. DRY/inheritance is usually bad in test code, especially if stateful | |
7. Try to colocate data and code as much as possible | |
8. Make randomness and time explicit | |
9. It’s best to write tests FIRST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment