# How to test changes written by coding agents

Give the agent an expected user outcome, then verify that outcome in a real browser. Code generation and browser verification are separate steps.

A coding agent will tell you it's finished when the code compiles and its own tests pass. That's useful, but those tests come from the same understanding of the task as the code. If the prompt was vague, the implementation and its tests can both miss what you meant.

Browser testing is a separate step, and it works best when the expected outcome comes from you.

## Write the outcome before the implementation

Ask for the customer outcome, such as a saved setting remaining visible after navigation. Avoid an assertion that merely checks the generated component exists. A browser pass should establish the requirement you intended, not the implementation detail the agent happened to choose.

```yaml
version: zerocheck/v1
name: Display name stays changed after a reload
steps:
  - Navigate to /settings/profile
  - Enter "Release Tester" into "Display name"
  - Click "Save"
  - Navigate to /settings/profile
  - Verify text "Release Tester" is visible
```

Keep unit tests and code review for logic and security-sensitive changes, since functional testing isn't a security review. Add a browser test where the requirement depends on the complete journey, because a component that works on its own can still fail in the full flow.

## Let the agent run the test

An agent can edit repository YAML and run it with the Zerocheck CLI, then read the exit code and the run record:

```bash
npx zerocheck run --json .zerocheck/latest-run.json
```

Exit 0 means every blocking test passed, 1 means a blocking test failed, and 2 means the run gave no verdict. A person has to approve the sign-in first, the CLI needs your instance to run, and there's no MCP server. See [using a coding agent](https://tryzerocheck.com/docs/mcp/) for a prompt to start from.

## Don't let it weaken the requirement

When a test fails, the agent should investigate without changing the expected outcome. Changing the YAML creates a new revision, so earlier results don't apply to it, and a proposed test isn't a passing test until that revision has run. An agent's completion message isn't a browser test.

If you'd rather not keep tests in a repository, describe the flow in the Zerocheck web app and review the result there instead.

## Frequently asked questions

### Can a coding agent use Zerocheck?

Yes, by running the optional CLI and reading its exit code and JSON run record. The CLI has no MCP server. Configure the project and have a person approve sign-in first.

### Does a local agent workflow work offline?

No. CLI runs need your instance, which makes every decision and model call and keeps the results and evidence.

Related: [Testing Changed User Flows](https://tryzerocheck.com/use-cases/change-aware-testing/)

---
Canonical: https://tryzerocheck.com/guides/vibe-coding-testing/
Updated: 2026-11-01
