Judging AI-written tests
For engineers
Telling real tests from ones that pass for the wrong reason, with mutation thinking, honest mocks and tests agents cannot quietly weaken
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
An AI wrote a test that sets a mock to return 42, calls the mock, and asserts it got 42. What is wrong with it?
Check yourself · 2 of 5
In mutation testing, what does a surviving mutant tell you?
Check yourself · 3 of 5
Which dependency is the best candidate for a mock in a unit test?
Check yourself · 4 of 5
An agent was told to get CI green. Which change in its diff is the biggest warning sign?
Check yourself · 5 of 5
You want an assistant to write tests that can catch a wrong implementation. What should you give it?
Topics
- Tests that pass for the wrong reason4 min read · Tautologies, assertions on the mock, rubber-stamped snapshots and tests that copy the implementation's logic
- Mutation thinking: would this test catch a bug4 min read · Changing the code in your head, or with tools like Stryker, PIT or mutmut, to check that some test fails
- Over-mocking and fake test doubles5 min read · Mocks that replace the thing under test, drift from the real API or hide integration failures
- Agents that weaken tests to go green4 min read · Deleted assertions, skipped tests, loosened expected values and updated snapshots that turn a red build green without a fix
- Turning generated tests into real tests5 min read · Asking for behaviour-based cases, edges and failure paths, then checking each assertion against a planted bug
Start here
- The Practical Test Pyramid (martinfowler.com) (opens in a new tab)ArticleFree
Where unit, integration and end-to-end tests belong, and why test behaviour rather than implementation.
- Mocks Aren't Stubs (martinfowler.com) (opens in a new tab)ArticleFree
Defines mocks, stubs, fakes and spies, and the difference between state and behaviour verification.
- Stryker mutation testing (opens in a new tab)ToolFree
Mutation testing for JavaScript, TypeScript, C# and Scala: the tool that checks whether tests notice changed code.
Helps to know first
110 questions · last verified 2026-12