Women in Technology

Hear us Roar



Article:
  Top 12 Reasons to Write Unit Tests
Subject:   another reason to write tests
Date:   2003-04-27 11:09:46
From:   wrschneider99
"You're already doing most of the work anyway." Most programmers write ad hoc tests to some extent, to sanity check that new feature or new method. But these tests are generally not written to a standard framework so they can be run repeatably, at will.


It's only a little more work to take an ad hoc test and fit it into a framework so it can be re-run later.


Of course, that assumes your design is already good. Totally agree that testing forces you to improve your design. Since it's always easiest to test code that doesn't have to run in a container or through a GUI, testing encourages you to maintain layer separation.