Home > Articles > Programming

  • Print
  • + Share This
From the author of

What Tests Should We Add?

What tests should be added in response to a design change? I use a simple rule:

Consider adding the tests you would have added if you had created the new design via test-driven development.

This means that you'll ask yourself, "What test would have caused me to write this line of code?" This will force you to consider each statement and why it's there. Then add tests you feel you need to adequately test the public interface of the classes involved.

  • + Share This
  • 🔖 Save To Your Account