Changes between Version 117 and Version 118 of DeveloperGuidelinesTesting


Ignore:
Timestamp:
08/15/11 18:29:18 (10 years ago)
Author:
Mike A
Comment:

Added perhaps the most important testing maxim

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelinesTesting

    v117 v118  
    6666Unit tests test the system at the level of units of source code a.k.a. code blocks. Not to be confused with functional or acceptance/customer tests; unit tests verify rather than validate.
    6767
     68'''Remember: don't write tests to prove your code works, write tests to ''show when and where it fails''; a successful test is one that ''uncovers'' a bug.'''
     69
    6870Pros:
    6971 * stability and reliability - vital for scaling developer teams due to the need for a stable trunk,
     
    7779Cons:
    7880 * it takes time to develop and maintain the tests - unit tests are not a free lunch,
    79  * sloppy tests are as bad or worse than sloppy code - unit tests are not a silver bullet or a free lunch,
     81 * testing requires discipline - sloppy tests can be as bad or worse than sloppy code - false positives waste time, false negatives waste even more time. However, in most cases, any test that runs the code is better than no test at all.
    8082
    8183=== Test Runner ===