Interview Questions

How Often Should You Run Your JUnit Tests?

JUnit Questions and Answers

(Continued from previous question...)

How Often Should You Run Your JUnit Tests?

Run all your unit tests as often as possible, ideally every time the code is changed. Make sure all your unit tests always run at 100%. Frequent testing gives you confidence that your changes didn't break anything and generally lowers the stress of programming in the dark.

For larger systems, you may just run specific test suites that are relevant to the code you're working on.

Run all your acceptance, integration, stress, and unit tests at least once per day (or night).

If you're using Eclipse, be sure to check out David Saff's continuous testing plug-in.

(Continued on next question...)

Other Interview Questions