Testing checklist
Every rule in the testing playbook, by chapter, required rules first. Each links to its own page with how we built it and how to check it. This is a lot to check. An Expert can check it for you.
Test strategy
- Required TST-1 Test what would hurt to break
- Recommended TST-2 Keep most tests small and fast
- Recommended TST-3 Ship tests in the same change
- Recommended TST-57 Test both states of every live flag
Unit tests
- Recommended TST-4 Test behaviour through the public interface
- Recommended TST-5 Fake the clock and the network in unit tests
- Recommended TST-6 Test the edges and the errors
- Recommended TST-7 Arrange, act and assert
- Recommended TST-8 Give each test one reason to fail
- Recommended TST-9 Keep unit tests fast
- Recommended TST-10 Check rules that hold for any input with property tests
- Recommended TST-11 Test rules with several conditions as a table
- Recommended TST-49 Test sequences of actions against a simple model
- Recommended TST-50 Test times at the daylight saving changes
Integration and contract tests
- Required TST-12 Test against the same database engine
- Required TST-16 Test how your code handles each outside service failing
- Recommended TST-13 Fake only what you do not own
- Recommended TST-14 Check the contract between services
- Recommended TST-15 Check that outside services still match your fakes
End-to-end and browser tests
- Required TST-17 Test every critical journey end to end
- Required TST-20 Run browser tests against the production build
- Recommended TST-18 Find elements the way people do
- Recommended TST-19 Wait for the page to be ready instead of sleeping
- Recommended TST-21 Test in more than one browser and size
- Recommended TST-22 Smoke test every deploy
- Recommended TST-23 Keep a trace of every failed browser test
- Recommended TST-48 Sign in once and keep the saved session out of git
Test data and environments
- Required TST-26 Keep a staging environment with generated data
- Required TST-58 Make the test setup refuse production
- Recommended TST-24 Build test data with factories
- Recommended TST-25 Give each test its own data
Flaky and slow tests
- Recommended TST-27 Find hidden order dependencies
- Recommended TST-28 Quarantine flaky tests with an owner
- Recommended TST-29 Find flaky tests before they merge
- Recommended TST-30 Keep the suite within a time budget
- Recommended TST-56 Run the tests a change affects on every pull request
- Recommended TST-59 Give every test its own time limit
Test quality
- Recommended TST-31 Prove the tests catch bugs
- Recommended TST-32 Treat coverage as a floor
- Recommended TST-33 Make every test able to fail
- Recommended TST-34 Review tests like code
- Recommended TST-35 Keep snapshot tests small and reviewed
- Recommended TST-52 Turn deprecation warnings into test failures
- Recommended TST-60 Fail the run when fewer tests run than before
- Recommended TST-64 Make sure tests an agent wrote do not just repeat the code
Performance tests
- Required TST-54 Prove one request cannot stall the site
- Recommended TST-36 Test load against a budget
- Recommended TST-53 Run load tests from a written runbook
- Recommended TST-51 Hold normal load for hours to find leaks
- Recommended TST-61 Catch speed regressions on every pull request
Security and robustness
- Recommended TST-39 Fuzz every parser of untrusted input
- Recommended TST-62 Run the tests with a race detector
- Recommended TST-63 Break the services you depend on in a test environment
Output comparison
- Recommended TST-40 Build the same input to the same bytes
- Recommended TST-41 Write a manifest of the whole output
- Recommended TST-42 Prove a refactor changes nothing
- Recommended TST-43 Explain every difference in an intended change
- Recommended TST-44 Mask volatile parts narrowly
- Recommended TST-45 Compare the live system before and after each deploy
- Recommended TST-47 Keep the previous release's manifest
- Optional TST-46 Compare environments with the same release
Related playbooks
Show the badge on your project
When your project passes every Required rule, you can show this badge on your site or in your README. It links to this checklist, so anyone can run the same checks.
<a href="https://agentwranglers.se/playbook/testing/checklist"><img src="https://agentwranglers.se/badge.svg" alt="Checked against the Agent Wranglers testing playbook" width="214" height="20"></a>
[](https://agentwranglers.se/playbook/testing/checklist)
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/testing/checklist">Agent Wranglers testing playbook</a>. In code you write, add a comment next to it with the same link.