Get your API key

Beginner · 5 lessons · 41 min

Testing with AI

Make the AI prove its work. Plain-English rules become automatic tests that catch what breaks before your users do.

Who it's for

Anyone building an app with an AI agent who is tired of "fixed one thing, broke another". No coding needed: the AI writes the tests, you write the rules and read the results.

What you'll build

A real test suite for one app (unit tests for its money rules with Vitest, end-to-end tests for its main journeys with Playwright) and an AGENTS.md testing rule the AI follows in every chat.

Why this course

In the 2025 Stack Overflow survey, 66% of developers said their top AI frustration is code that is "almost right, but not quite", and more of them distrust AI accuracy (46%) than trust it (33%). Vibe coders describe agents that fix one thing and break two more, and agents have been caught editing or weakening tests to make them pass. Beginners need a simple way to catch this.

Take first: Prompting for AI coding, Build your first web MVP

Lessons in this course

  1. 1Why AI-written code needs testsWhy agents break working features, what a test is, the two kinds you will use, and who does what: you write rules, the AI writes tests. 7 min Free
  2. 2From plain-English rules to test casesWrite acceptance criteria as Given / When / Then with real numbers, find the edge cases, and save them in ACCEPTANCE.md. 8 min Log in to open
  3. 3Unit tests with VitestLet the AI install Vitest and turn each rule into a test, then read pass and fail output: which test, expected vs received. 9 min Log in to open
  4. 4End-to-end tests with PlaywrightA robot browser clicks through your app's main journeys. Set up Playwright, record a journey, and read the UI mode and HTML report. 9 min Log in to open
  5. 5Tests before and after every changeThe red, fix, green, commit loop, an AGENTS.md testing rule, asking for evidence, and spotting an AI that deletes or skips tests. 8 min Log in to open
Next upControl your AI costsKnow what a prompt costs in rupees, pick the right model for each job, and never get a surprise bill.