All Images

Introduction to Testing as a Design Tool


Figure 1

Cycle with three nodes: 'Red (write a failing test)', followed by 'Green (write just enough code to pass the test)', followed by 'Refactor (improve the code with tests intact)', then back to Red
Red-Green-Refactor cycle, liberally borrowed from a blog at https://khalilstemmler.com/

Why We Test: Verification and Validation


Parameterized Testing


Property-Based Testing


Testing and Design


Mocking and Isolation


Refactoring Legacy Code


Brittle Tests and Bugs


Co-Authoring with LLMs: AI and TDD


Summary and Next Steps