# 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.

## Why it is hard

- A generated implementation can satisfy a prompt while missing a user requirement.
- A locally working component may fail in the complete flow.
- A test authored from the same vague prompt can repeat the ambiguity.

## Plan the test around an observable outcome

1. Write the user-visible requirement before implementation.
2. Keep unit tests and code review for logic and security-sensitive changes.
3. Add a browser test for the completed user journey.
4. Inspect a failure without letting the agent weaken the requirement.

## Where Zerocheck fits

1. Describe the flow and expected outcome in the web app, or use the optional CLI MCP server.
2. Review the drafted YAML before adopting it into your repository.
3. Execute the exact test revision and inspect the returned result.
4. Use get_results to retrieve run details when working through MCP.

## Make the assertion independent of 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.

## How coding agents can use Zerocheck

The optional CLI exposes MCP tools to list, read, save, draft, verify and run repository tests. Saving changed YAML invalidates earlier verification. The browser run produces the result; a proposed test is not a passing test until that exact revision executes successfully.

## Pitfalls

- Do not treat an agent’s completion message as a browser test.
- Do not allow a changed assertion to inherit an earlier passing result.
- Do not mistake functional testing for a security review.

## Frequently asked questions

### Can a coding agent use Zerocheck?

Yes, through the optional CLI MCP server in a compatible client. Configure the project and authenticate first.

### Does a local agent workflow work offline?

No. Local runs use Zerocheck’s AI service and upload results and artifacts to the web app.

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

---
Canonical: https://tryzerocheck.com/guides/vibe-coding-testing/
Updated: 2026-09-14
