CSC302H1 Lecture Notes - Lecture 12: Unit Testing
Document Summary
Documentation faults design docs or user manual. Defects vs. failures: defects = an error/mistake in program, failure = manisfestation of a detect, program defects. Snytax faults incorrect use of programming constructs. Failure to test for exceptions; ex. divide by 0. Precision faults mixed precision, oating point conversion, etc is wrong bounds checking. Stress faults ex. over owing buffers, lack of. Timing faults ex. processes fail to synchronize, then events happen in the wrong order. Throughput faults ex. performance lower than. Recovery faults incorrect recovery after another. Hardware faults hardware doesn t perform as required failure expected: defect detection effectiveness. Typical testing strategies = ~30 40% effective. Test-case first = ~20 60% effective. Daily smoke test = ~20 40% effective. Testing alone is 60 80% effective. Inspection, models, prototypes, system tests all important: quality is free. Debugging + re-testing = 50% of effort in traditional.