Write fewer tests! Model-based testing in React
summary
Proposes replacing manually written end‑to‑end tests with model‑based test generation using XState to model app states and transitions, wiring those abstract states to concrete assertions with React Testing Library and Jest, and swapping in Puppeteer for browser runs. Demonstrates a todo demo that auto‑generates 22 tests generated from the state graph, finds edge cases, and regenerates test suites instantly when the model changes, reducing maintenance and increasing user‑flow coverage.
AI-written summary · about
chapters (9)
- 0:00The challenge of testing
- 2:57Testing hierarchies
- 4:07Model-based testing introduction
- 7:14State machines and puzzles
- 8:53Defining abstract models
- 12:20Implementing automated tests
- 18:02Puppeteer and demo
- 21:22Benefits of model-driven testing
- 26:32The future of model-driven dev
related talks
27mWrite Fewer Tests! From Automation to Autogeneration
01h 00mTest Driving React Applications
32mEstablishing testing patterns with software design principles
30mTesting React Applications
10mTesting React Applications
53mTesting React Applications
24mUsing React Testing Library to Write Stronger Tests
32mHow to Improve Test Coverage to 80% with Generated Unit Tests and Stay Calm
