Test Kitchen: A Recipe for Good Tests
summary
Claim: tests must inspire confidence and be automated, fast, deterministic and isolated. Concrete practices: run unit tests in watch and CI on branch and main, run tests in parallel, mock slow dependencies and mock timers for determinism, isolate side effects by injecting utilities, extract business logic for unit testing, use fast environments like jsdom and tools such as Cypress and Testing Library for higher-level flows, reset globals between tests, and favor behavioral assertions over peeking at internals.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 1:53Confidence
- 2:55Automation
- 3:50When should automated tests run
- 4:45When should automated tests not run
- 5:07How to make tests fast
- 6:06Test tools
- 6:31Tests should be behavioral
- 6:52Test from the consumer perspective
- 7:28Testing a counter component
- 8:05Testing behavior
- 8:54Testing properties
- 10:35Testing example
- 11:20Testing tips
- 12:33Testing random numbers
- 12:49Extracting business logic
- 13:08Race conditions
- 13:25Failures
- 13:39Specific Tests
- 13:55Split Test Cases
- 15:14Reading Tests
- 15:50Short Tests
- 16:02Extract Test Functions
- 16:28Test Library
- 17:11Visual Regression Tests
- 17:43Hacky Tests
- 18:09Permit
- 18:47Predictive
- 19:15What tests do you need
related talks
31mWriting (Really) Good Tests
01h 07mProperties of Unit Tests
11mNeed For Tests: Most Wanted
26mTesting the Tricky Stuff
57mAdvanced Testing Techniques: Tips from the trenches
47mThe Valley of Success
42mUse testing to Develop Better Software Faster
25mTest Craftsmanship: Clean code practices for Test Automation
