CSC 151 - Unit Testing
Most computer programmers strive to write clear, efficient, and correct code. It is (usually) easy to determine whether code is clear. With some practice and knowledge of the correct tools, one can determine how efficient code is. However, believe it or not, it is often difficult to determine whether code is correct. The gold standard of correctness is a formal proof that the procedure or program is correct. However, in order to prove a program or procedure correct, one must develop a rich mathematical toolkit and devote significant effort to writing the proof. Such effort is worth it for life-critical applications. However, for many programs, the effort and time required for a formal proof are often more than can be reasonably expected. There is also a disadvantage of formal proof: Code often changes and the proof must therefore also change. Why does code change? At times, the requirements of the code change (e.g., a procedure that was to do three related things is now expected to do
CSC 151 - Unit Testing Unit Testing Due Wednesday, 24 September 2025 --> Summary As you develop procedures and collections of procedures, you have a responsibility to make sure that they work correctly. One mechanism for checking your procedures is a comprehensive suite of tests. In this reading, we consider the design and use of tests. We also consider the testing facilities built into Scamper. Introduction Most computer programmers strive to write clear, efficient, and correct code. It is (usually) easy to determine whether code is clear. With some practice and knowledge of the correct tools
saved by
related reading
- Reading 2: Testingweb.mit.edu
- Software Engineering at Googleabseil.io
- Reading 3: Testingweb.mit.edu
- What if writing tests was a joyful experience?blog.janestreet.com
- Why Good Developers Write Bad Unit Tests · mtlynch.iomtlynch.io
- Your job is to deliver code you have proven to worksimonwillison.net
- The Joel Test: 12 Steps to Better Code – Joel on Softwarejoelonsoftware.com
- GitHub - mawrkus/js-unit-testing-guide: 📙 A guide to unit testing in Javascriptgithub.com
- Tao on “blue team” vs. “red team” LLMs | Hacker Newsnews.ycombinator.com
- The sad state of property-based testing librariesstevana.github.io
- Introduction to Property Based Testing | by Nicolas Dubien | Criteo Tech Blog | Mediummedium.com
- Crafting High Quality Unit Tests: Tips and Best Practicesmarclittlemore.com