Changes between Version 117 and Version 118 of DeveloperGuidelinesTesting
- Timestamp:
- 08/15/11 18:29:18 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelinesTesting
v117 v118 66 66 Unit 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. 67 67 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 68 70 Pros: 69 71 * stability and reliability - vital for scaling developer teams due to the need for a stable trunk, … … 77 79 Cons: 78 80 * 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. 80 82 81 83 === Test Runner ===