Library / Shipping & operations / Automated test
No. 136·noun·also called tests, unit test, test suite

Automated test

A small program that checks one thing your app should do and reports pass or fail in seconds, without you clicking through it.

SPECIMEN · DIAGRAM · STATES
Code changed
Tests run
All pass
Some fail
save or pushchecks holda check breaksfix it
Definition

What it is

An automated test is a small piece of code that checks one thing your app should do, like "an expired discount code is rejected", and reports pass or fail. A group of them is called a test suite, and running it takes seconds instead of an afternoon of clicking.

Tests are how you find out that an agent's change broke something that used to work. Ask for them where the logic matters: money, permissions, anything you'd hate to break quietly. Describe the behavior you want checked in plain words. Left alone, agents tend to write tests that just repeat what the code already does, which catches nothing.

Unit tests check small pieces in isolation. End-to-end tests drive a real browser through a flow like sign-up. Neither replaces using the app yourself once before you ship.

Say it like a builder

How to ask for it

Vague

“Make sure nothing breaks when you change stuff.”

Precise

“Add automated tests for the discount code logic: a valid code takes 10% off, an expired code shows an error and charges full price, and a code can't be used twice. Run them now and after every change, and tell me which fail.”

Why it works

"Make sure nothing breaks" has no checkable meaning, while "automated tests" with named behaviors gives the agent specific pass or fail conditions to run after every change.

In the wild

You've seen this in

  • GThe green check or red X next to a change on GitHub
  • T"12 passed, 1 failed" printed in the terminal after an agent runs the tests
  • AA browser window opening by itself and clicking through sign-up while an end-to-end test runs
Usage note

Often confused with