6. Testing Practice

Martin Fowler makes this easy for you. He says, "Whenever you are tempted to type something into a print statement or a debugger expression, write it as a test instead."

Here are a couple of the times that you will receive a reasonable return on your testing investment:

One word of caution about your tests: Once you get them running, make sure they stay running.

Ideally, you would run every test in your suite every time you change a method.

Practically, your suite will soon grow too large to run all the time. But make sure you run every test at least once a day: overnight, during lunch, during one of those long meetings…