Last updated: Mar 25, 26 00:28 UTC | Permalink
3 - When Have I Written Enough Tests?
Learning Objectives:
After this lecture, you will be able to:
- Explain how TypeScript types and documented preconditions influence what tests you need to write
- Explain the difference between the
anyandunknowntypes in TypeScript - Understand the structure of a simple Express server incorporating Zod validation
- Explain what code coverage is, and how different measures differ, including statements, branches, functions, and lines
- Explain the benefits of mutation testing
Important Dates:
- Individual Project 1 Due Wednesday, January 21 by 11am (EST)
Lecture Slides:
- Trusting Typescript (Or Not) Slides PDF, PPT
- Code Coverage & Mutation Testing Slides PDF, PPT
Activities
Tutorials
Resources
- Working with JSON
- Zod documentation
- Software Engineering at Google: “Testing”
- StrykerJS - Mutation Testing Tool
- Are mutants a valid substitute for real faults in software testing?
- Go Testing By Example, by Rob Pike — source of the “Coverage is no substitute for thought” quote from the slides with a lot of good and general advice about testing