GuideIntermediate

Reviewing AI-Generated Tests

Develop the judgment to critically review tests written by an AI (Copilot, Claude, Cursor, and similar tools). AI generates tests fast and plausibly, but they can be tautological (they always pass, they prove nothing), test the implementation instead of the behavior, forget edge and error cases, have weak assertions that produce false greens, or use unrealistic data and misleading names. This guide teaches how to spot each of these defects, apply a systematic review checklist, and decide, with judgment, which test is trustworthy, which needs strengthening, and which needs rewriting. It closes with a capstone project: review a Reservo suite that was "generated by AI" with defects of several types, mark each one with its category, fix it, and deliver a review report along with the corrected suite.

64
lessons
8
modules
English · Spanish
available in
Yes
certificate
Free
access
NIEVA

Outcomes

What you'll be able to do

  • Recognize the tautological test: the one that can never fail because it asserts on the output of the same code that produced it
  • Distinguish tests that verify behavior from tests that verify implementation (internal calls, execution order, private attributes)
  • Detect the edge and error cases AI tends to forget when it only covers the happy path
  • Identify weak assertions and false greens: `assert result is not None`, partial assertions, tests with no real `assert`
  • Detect unrealistic test data (magic numbers, impossible values) and test names that don't describe what they actually verify
  • Apply a systematic checklist to review any AI-generated suite: can it fail? does it test behavior? does it cover edges? is the assertion strong? is the data honest?
  • Review and fix a complete AI-generated suite as a capstone project, delivering a review report

Before you start

What you need to bring

It's for you if...

  • Devs using Copilot, Claude, Cursor, or another AI tool to generate tests who need judgment to review them
  • Teams that adopted AI-generated tests and want to avoid false greens in their suite
  • Devs who already know how to write tests with pytest and want to specifically build the reviewer skill

Requirements and materials

  • Knowledge of pytest and TDD (or the Testing Fundamentals & TDD Guide completed)
  • Basic familiarity with `unittest.mock`
  • Experience using an AI code-generation tool (Copilot, Claude, Cursor, etc.)

Content

The syllabus, module by module

Open any of them to see its lessons.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!