Testing strategy when agents write tests
For engineers
Test design, coverage that means something and tests that pass for the wrong reason when agents write most of the tests
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
A test computes its expected value with the same formula the function uses. What is the main problem?
Check yourself · 2 of 5
A repository function is tested with a mocked database client that returns fixed rows. What bug can this test not catch?
Check yourself · 3 of 5
Which flow most deserves an end-to-end test?
Check yourself · 4 of 5
What does 90 % line coverage tell you?
Check yourself · 5 of 5
What defines a flaky test?
Topics
- Unit tests that pin real behaviour4 min read · Asserting on behaviour instead of restating the implementation, and spotting tautological or over-mocked tests that pass for the wrong reason
- Integration tests at real boundaries4 min read · Testing database, HTTP and queue boundaries with real or containerised dependencies, and deciding what is safe to fake
- End-to-end tests for critical user flows4 min read · A few stable browser or API tests on the flows that make or lose money, and how agents driving browsers keep them current
- Designing a risk-based test plan4 min read · Mapping each risk of a feature to a test level, listing edge cases first, and reading coverage numbers for what they do not prove
- Flaky tests, fixtures and determinism5 min read · Time, randomness, ordering, shared state and network calls that make tests flaky, and why agents tend to retry or skip them instead of fixing them
Start here
- The Practical Test Pyramid (martinfowler.com) (opens in a new tab)ArticleFree
Walks through unit, integration and end-to-end levels with code, and why to push tests to the lowest level that catches the bug.
- Software Engineering at Google (free online book) (opens in a new tab)BookFree
The testing chapters cover test size, flakiness and what a useful test suite looks like at scale.
- Playwright documentation (opens in a new tab)DocsFree
How to write and run browser tests with auto-waiting, the basis for stable end-to-end flows.
110 questions · last verified 2026-12