No Tests Yet Test

An instance of a "DontChangeTheCodeTest": the "No Tests Yet" Test.

Refactoring and UnitTesting large globs of untested, unrefactored code is generally recommended against. Odds are that you'll expend effort that you didn't need to expend, or, worse, break something you didn't mean to break.

Instead, go through all portions of the code that don't have automated unit tests, and point a DontChangeTheCodeTest at them (have the unit test complain if that untested code is changed at all). If a programmer goes to change that code, they'll be disappointed that it doesn't have a better suite of tests, but at least they won't accidentally break something without seeing a failing test.


CategoryTesting


EditText of this page (last edited March 15, 2011) or FindPage with title or text search