Builder13 min readBadge: Test Pilot

Test your app (and let AI write the tests)

Manual test plans, automated tests and CI: how to know your app works today and keeps working after the next AI change.

Why test when the AI wrote it?

Every change an AI makes can fix one thing and quietly break another. Tests are how you find out before your users do. They also make AI agents better: an agent that can run your tests can check its own work.

Start with a manual test plan

A list of the things a real person does, written as steps with an expected result:

  • 'New visitor signs up with email → lands on the dashboard with their name.'
  • 'Signed-out visitor opens /dashboard → is sent to sign in.'
  • 'User A cannot see User B's notes.'
  • Run it before every release. Ask AI to turn your app's features into a first draft of this list.

Three kinds of automated test

  • Unit tests check one small piece, like a function that calculates a price. Fast and many.
  • Integration tests check pieces together, like a server route plus the database.
  • End-to-end (e2e) tests drive a real browser like a user: click, type, check the page. Playwright and Cypress are popular.
  • Ask your coding agent: 'Write tests for this feature, including the empty, wrong and edge cases, and run them.'

Make tests run themselves: CI

Continuous integration (CI), such as GitHub Actions, runs your type check, tests and build on every pull request. A red check means don't merge. This is how teams (including this site) keep a main branch that always works.

Good habits

  • When you fix a bug, add a test that would have caught it.
  • Test the unhappy paths: empty forms, no internet, wrong password, someone else's data.
  • Don't let AI 'fix' a failing test by deleting or weakening it; ask why it fails.
  • Keep tests fast so people actually run them.

Key terms

Unit test
An automated check of one small piece of code, like a price function.
End-to-end (e2e) test
An automated test that drives a real browser like a user would.
Test plan
A list of steps a person follows with the expected result of each.
CI (continuous integration)
Automatic checks (tests, builds) that run on every push or pull request.
Regression
Something that used to work and broke after a change.
Bug
A mistake that makes software behave wrongly.
Pull request (PR)
A request to merge one branch into another, with review and checks.
See the full glossary

Try it

Your first safety net

  1. Write a five-line manual test plan for something you built.
  2. Ask a coding agent to turn two of those lines into automated tests and run them.
  3. Break the feature on purpose and watch a test fail.
  4. Fix it, see green, and commit the tests.

Ask an AI tutor about this guide

Copy a prompt into ChatGPT, Claude or Gemini to go deeper. Check what it tells you against the guide.

Study with an AI tutor: copy this whole guide with tutoring instructions, then paste it into your AI assistant.
  • Explain it like I'm 12
  • Quiz me (5 questions, one at a time)
  • Show me a real example for my situation
  • What do beginners get wrong?

Knowledge check

Five questions. Get 4 right to earn the Test Pilot badge. You can retake it as often as you like.

Question 1 of 5

What does an end-to-end test do?

Finished the Build safely guides? Take the Build safely track test for ten mixed questions.

My notes

Write what clicked, what confused you, and what you want to try. Saved in this browser only.

Learn it live

Digital Builders University runs small live workshops where you build something real with an instructor beside you, starting with Vibe Coding 101.

See workshops

Last reviewed November 25, 2026. AI tools change fast; check each tool’s own site for current features, plans and prices.