Fork me on GitHub

The Commandments


Testing

  1. Test behaviour, not structure. Don’t be gentle, break it!
  2. Write down what you need to test before or at the same time as you write the code
  3. Look for difficult, unexpected cases too
  4. If it can’t be tested, it shouldn’t be there
  5. If there’s a test framework, use it. Aggressively replace/remove tests when things change
  6. If someone else finds a bug after you’ve said it works, kick yourself and improve your practice!