flâneur — a map of the web's best reading

Reading 2: Testing

web.mit.edu · 10,653 words · saved by 1 readers

Testing is an example of a more general process called validation. The purpose of validation is to uncover problems in a program and thereby increase your confidence in the program’s correctness. Validation includes: Here are some approaches that unfortunately don’t work well in the world of software. Exhaustive testing is infeasible. The space of possible test cases is generally too big to cover exhaustively. Imagine exhaustively testing a 32-bit floating-point multiply operation, a*b. There are 264 test cases! Haphazard testing (“just try it and see if it works”) is less likely to find bugs, unless the program is so buggy that an arbitrarily-chosen input is more likely to fail than to succeed. It also doesn’t increase our confidence in program correctness. Random or statistical testing doesn’t work as well for finding bugs in software, as it does for finding flaws in other kinds of engineered artifacts. Other engineering disciplines can test small random samples (e.g. 1% of hard driv

Reading 2: Testing Reading 2: Testing Software in 6.102 Safe from bugs Easy to understand Ready for change Correct today and correct in the unknown future. Communicating clearly with future programmers, including future you. Designed to accommodate change without rewriting. Objectives After today’s class, you should: understand the value of testing, and know the process of test-first programming; be able to judge a test suite for correctness, thoroughness, and size; be able to design a test suite for a function by partitioning its input space and choosing good test cases; be able to judge a te

Explore this link on the map →

saved by

related reading