AI testing: what it is, how it works, and where it fails
What AI testing means in 2026: AI-written test code, self-healing scripts, and agents that test in a real browser. How each works and when to skip it.
"AI testing" is at least four different jobs wearing one label. One writes Playwright or Cypress from a prompt, and you still own the file. One records a click-path and uses a model to patch selectors when the DOM shifts. One is an agent that opens a real browser and runs the check itself. One is testing a product whose output is itself a model. This page names all four, then stays with the agent.
AI testing is using machine learning models to write, run, or maintain software tests. The newest form is an agent that opens a real browser and tests a flow you describe in plain English.
Below: how a run works, what it catches, where another tool is the honest choice, how the same check sits in CI and next to a coding agent, and what a run costs. Why an agent reports bugs a selector never asserted is in why AI QA agents find bugs your scripts miss.
The four kinds of AI testing
AI that writes test code
You describe a flow. The tool emits Playwright or Cypress. You review the locators, commit the file, and own every line after that. The next run is your test runner executing that file. When a button is renamed, you update the file. This is assisted authoring. You can pin a timeout, assert an exact string, and fail the build on that assertion. You also inherit every selector the generator was confident about. Read the file before you trust it.
Self-healing record-and-replay
You click through the product once. The tool stores that sequence. When a selector misses on a later run, a model looks for a replacement element and patches the recording. The recording is still the test. Healing changes the locator. A button that moved inside the same dialog is the case it handles. A checkout that gained a step, or a toast that now sits behind a banner, is a change of meaning, and the recording still does the old clicks. Where that repair stops is in what self-healing tests actually mean.
Agents that run the test
You write the intent in plain English. An agent opens a real Chromium browser, reads the rendered page, acts, and checks the result. Monito is this kind of tool. You keep the prompt. When the behavior you care about changes, you change the sentence. A class-name change has nothing to patch, because the prompt never named the element.
The agent stays inside the check you wrote. A separate mode, Discovery, proposes additional cases for you to review. Accepting a draft turns it into a saved check. Until you accept it, it is only a proposal.
Testing AI features
The fourth meaning is the product under test. A chat reply, a generated summary, an agent that books a meeting. The output changes between runs, so an assertion that expects one sentence fails on a correct answer. You write properties: the reply rendered, it stayed on the topic you asked about, the control after it worked.
That job is testing non-deterministic AI apps. Evaluating the agent as a system, with its own success criteria, is AI agent evaluation. Both are real work. "Did the signup form still accept a valid email" is the other three kinds.
| Kind | What you write | What you maintain | What you get back | Where it breaks |
|---|---|---|---|---|
| AI-written test code | A prompt that becomes a script | The generated Playwright or Cypress file | A test file in the repo | The UI changes and the script still names the old elements |
| Self-healing record-and-replay | A recording of the clicks | The recording. Healing patches selectors | A replay of those steps | The check was never recorded, or the flow changed rather than the locator |
| Agent in a real browser | The intent, in plain English | The prompt, when the intended behavior changes | A session with screenshots, network, console, and a verdict | You need a byte-identical gate, or the site blocks automated browsers |
| Testing an AI feature | Invariants about the output | Those invariants | A judgment of properties, with the same kind of evidence | You need one exact string, or the model itself is the system under test |
How an agent-run AI test works
Four steps, on every Monito run.
1. You write the check in plain English. A tight prompt is a regression check. Include the negative inputs you care about. The password-reset check:
Test the password reset flow.
1. Go to /login and click "Forgot password".
2. Submit with no email — expect a validation error.
3. Submit a valid email — expect a confirmation message.
4. Confirm the same message shows whether or not the account exists
(no account enumeration).The confirmation step, as a single expectation you can paste into a terminal:
npx -y @monitodev/cli check https://staging.example.com/login "Forgot password shows a confirmation message for any email" --jsonmonito check <url> "<expectation>" --json waits for the verdict. Human text goes to stderr. JSON includes the run id, the status, the cause when there is one, the credits charged, and a report URL. Exit 0 means passed. Exit 1 means failed or error. An error is not a product verdict. The check could not verify the scenario. That is a different outcome from the app failing the check. The fields and the exit codes are in the check command.
A check runs once. Saving it, with monito check save or the MCP save_check tool, keeps the history under a name. Saving does not create a schedule and does not start another run.
2. The agent opens a real browser. The run uses Chromium and the rendered page: HTML, CSS, JavaScript, and the responses the app returned. The same run stays in Chromium. It does not open Safari, Firefox, or WebKit, and it does not drive a native app or call your API on its own.
3. It looks, acts, and looks again. The agent reads the page, chooses the next action toward the expectation, performs it, and reads the result before the next step. A flow it has not been given as a script can still be tested. A console error or a failed request can show up in the report when your sentence only mentioned a confirmation message. The AI agents guide covers how a coding agent reads that reasoning back.
If "confirmation message" could be a toast, a banner, or a new page, say which one. A vague sentence becomes a path choice. Tighten the sentence the way you would tighten a bug report.
4. You get a session. Every run has a page at https://www.monito.dev/session/<id> with screenshots, the network log, console messages, and a verdict with reasons. A failure includes what was expected, what happened, and the steps that got there. The CLI lists the same events with monito session view and monito session events. See session.
What AI testing catches well
The checks that pay off are the ones a suite leaks because nobody wrote the assertion.
- Validation gaps. A form accepts an empty email, a 300-character name, or a password that passes signup and then fails login.
- Edge cases. Unicode in a field, a double submit, the back button in the middle of a flow, the same email used twice.
- Console and network failures. An unhandled exception on load, a 4xx or 5xx the UI swallows, a missing script that leaves a control on screen and dead.
- Broken states. A path that dead-ends, a spinner that never resolves, a success state that never appears.
Two shapes show up in checks our team has run against pages that were only read, with no account created and no payment submitted. The products stay unnamed.
A pricing call-to-action on a marketing homepage went to a 404. The homepage rendered. The failure was one click later.
A navigation link pointed at an element id that was not in the document. The click ran, the URL stayed put, and the console was quiet. The screenshot before the click and the screenshot after it were the same viewport.
A person finds either of those in a minute. A script reports them when the assertion was written, and stays quiet when it was not.
Where AI testing is the wrong tool
An agent covers a wide surface in a browser. These jobs already have a better tool.
- Pixel-perfect visual diffs. A two-pixel shift or a swapped color token belongs in a visual-diff tool. An agent walks past a change that does not affect the task you described.
- A CI gate that must be byte-identical. The agent reasons on each run, so two passing runs can click in a different order. When the gate must fail on one condition and stay quiet otherwise, write a scripted assertion. A thin Playwright suite for those flows, plus an agent for the surrounding surface, is a normal setup.
- Compliance-grade, versioned evidence. A session is a record of one run. An auditor who wants a code-reviewed suite is asking for the script in version control.
- API-only checks and native mobile. With no browser UI, use an API test or a device framework.
- Load testing. Concurrency and a latency target under controlled traffic are a load test. One browser session does not produce that number.
- Pages that block automated browsers. Headless browsers get blocked by bot protection (Cloudflare Turnstile, 403s). A 403 in a test run is not automatically a bug. Read the status and the response before you file it as a product defect. An error is not a product verdict.
The scope that holds up is a wide surface, checked in Chromium, that still works after the markup moves.
AI testing in CI and in coding-agent workflows
CI runs checks you have already saved. The job that waits for a verdict and fails the build is the CI guide. On GitHub, the binding is a short-lived OIDC token. The repository does not hold a long-lived Monito key. The steps and the generated workflow are on GitHub Actions. The CLI exits 1 when a scenario failed or errored, and that exit fails the job. Open the session before you treat the red job as a defect in the app. Which checks belong on the pull request is the subject of continuous integration testing.
A coding agent runs the same check without a workflow file. The hosted MCP server is https://www.monito.dev/api/mcp. The tools in the loop are check, wait_for_run, get_run, get_screenshot, and save_check. The agent calls check with a URL and an expectation, then reads the verdict. On a failure it calls get_run for the bug report, the failed requests, and the console messages, and get_screenshot for one image from that evidence. If the wait ends while the run is still going, wait_for_run resumes that run id. The agent edits the code and calls check again. save_check stores a check you want to repeat. It does not start a run.
Which calls spend credits is on MCP tools. Client setup is MCP, Claude Code, and Cursor. The hosted server checks deployed URLs. A localhost URL needs the local MCP server (monito mcp) or the CLI.
What it costs
A Monito test run costs one credit. Discovery proposes additional cases and costs more than one run. If Monito caused the error, you don't pay: credits held for that run return to the balance. A run that finds a bug in your app still uses credits.
A standard test is 1 credit, an Advanced test is 10, and Discovery is 20. Pro is $79/month for 700 credits. Team is $199/month for 1,800 credits. Managed is $750/month, limited to 10 teams, and includes the Team allowance. 50 free test credits every month. Your balance refills to 50 on the 1st of each month (UTC), counting credits reserved by running tests. Unused credits are not added again; purchased credits are kept. Your signup credits count as the first month. Free includes one daily schedule. Verify your email to receive monthly refills. The onboarding wizard does not charge its first run. Pricing.Plan details are on pricing. How to weigh a testing tool's price against the maintenance it leaves you is in cheap AI testing tools.
FAQ
What is AI testing?
AI testing is using machine learning models to write, run, or maintain software tests. The newest form is an agent that opens a real browser and tests a flow you describe in plain English. The same label also covers generated Playwright or Cypress, self-healing recorded scripts, and testing an AI feature whose output changes between runs.
Is AI testing reliable enough for CI?
An agent-run check is reliable enough to fail a job when a flow you described breaks. The session keeps screenshots, the network log, console messages, and a verdict with reasons, which is what you read when the job goes red. Two runs of the same prompt are not the same sequence of clicks, so a gate that must fail on one exact condition still belongs in a scripted assertion. On the Monito CLI, exit 0 means passed and exit 1 means failed or error. An error is not a product verdict.
Does AI testing replace Playwright?
Playwright remains the tool for a check that must fail on one exact condition every time. AI that writes test code still hands you a Playwright or Cypress file to maintain. An agent that drives the browser covers flows you describe in plain English, and it can take a different path on two runs. A thin scripted suite for the pinned flows, plus an agent for the rest, is a normal setup.
What is the difference between AI testing and testing AI?
AI testing uses models to write, run, or maintain tests of your software. Testing AI means checking a feature whose output is not a fixed string, such as a chat reply or an agent action. The assertion is about properties of that output: it rendered, it stayed on the asked topic, the control after it worked. Those are different jobs.
How much does AI testing cost?
On Monito, a standard test run costs one credit. Discovery, which proposes additional cases, costs more than one run. The Free plan includes 50 test credits every month. Pro and Team include a larger monthly allowance. If Monito caused the error, you don't pay for that run. A run that finds a bug in your app still uses credits. Current prices are on the pricing page.
Run a check
Run your first test. The Free plan includes 50 test credits every month. The command and the exit codes are the check command.
Related posts
- How to test Stripe checkout without code
- How to test a web app without writing code
- Natural language test automation