An agent tests your site: tasks with criteria and results saved to a file
A test that only exists in the conversation with the agent disappears when the conversation ends. Here, each task becomes an entry in a battery file, with the contract from lesson 5, and each run writes a result line. The dry-run robot runs without a model; in the optional step, your agent runs the same battery and a script checks the format.
1The battery file: contract + steps + what is expected
2The dry-run robot: roles and names from the tree, no model
3resultados/*.jsonl: one line per task
4The same test with your agent, checked by format
Goal: run a task battery against the site and write the result to a file, in the dry run and with your agent.
01 · From the battery to the result file
Click each block.
Click each block in the diagram to see what it does.
The dry run tells you whether the site works. The agent tells you whether an agent can use the site. Both write to a file.
02 · Reading the result
What counts as a passing test.
1. Expected × obtained
A task passes when it ends the way the file expects: ok with the proof seen, or parou at the right signal. Task t3 passed by stopping at the login.
The script exits with 0 only if all tasks ended as expected. You can put it in CI.
2. Agent: format only
The model's response changes with every run. The "done when" of the agent step checks structure: one JSON line per task and the status within three values. Lines outside the format are counted and ignored.
Comparing what the agent said with what the dry run saw is your own reading, not an automatic criterion.
3. Who tests whom
The test agent only observes and reports: it doesn't fix the site in the middle of the test. If it finds a failure, the line says where, and the fix comes later, with the same test running again.
Only against the kit or a site of your own.
In-depth evaluationFrozen battery, regression and agent evals belong to the LOOP-R Engineering Program (verification) and to course 5 of this program.
03 · The kit's battery, in the dry run
Three tasks: two that finish and one that has to stop.
File · kit/bateria.json
{
"site": "kit",
"tarefas": [
{
"id": "t1-horarios",
"objetivo": "Na página agendar.html, ver os horários livres de Revisão completa em 2026-11-03.",
"limites": "Só preencher e clicar em Ver horários. Não clicar em Agendar às… nem em Confirmar.",
"prova": { "texto": "2 horários livres para Revisão completa" },
"parada": "Pare se aparecer login, verificação ou confirmação. Pare depois de 10 ações.",
"espera": "ok",
"passos": [
{ "abrir": "agendar.html" },
{ "preencher": ["Seu nome", "Ana"] },
{ "escolher": ["Serviço", "Revisão completa"] },
{ "clicar": "Ver horários" }
]
},
{
"id": "t2-servicos",
"objetivo": "Na página inicial (index.html), achar quanto tempo leva a troca de pneu.",
"limites": "Só ler a página inicial. Não preencher nada.",
"prova": { "texto": "Troca de pneu: 20 minutos" },
"parada": "Pare se aparecer login, verificação ou confirmação. Pare depois de 10 ações.",
"espera": "ok",
"passos": [{ "abrir": "index.html" }]
},
{
"id": "t3-minha-conta",
"objetivo": "Na página conta.html, ver os meus agendamentos.",
"limites": "Não digitar e-mail nem senha. Não criar conta.",
"prova": { "texto": "Seus agendamentos" },
"parada": "Pare na tela de login e diga o que falta. Pare depois de 10 ações.",
"espera": "parar",
"passos": [{ "abrir": "conta.html" }]
}
]
}
Terminal · run the battery
cd ~/projetos/formacao-webmcp-navegador-v72/kit
node rodar-bateria.mjs bateria.json; echo "saída: $?"
head -n 1 resultados/bateria.jsonl
Example from the repository
Chromium 156.0.8078.4 (Playwright) · bateria: bateria.json · site: http://127.0.0.1:PORTA/ · espera: 3000 ms
✓ t1-horarios ok viu "2 horários livres para Revisão completa"
✓ t2-servicos ok viu "Troca de pneu: 20 minutos"
✓ t3-minha-conta parou login exigido (depois de "abrir")
3 tarefas · 3 como esperado (ok 2 · parou 1 · falhou 0) · resultados/bateria.jsonl
saída: 0
{"id":"t1-horarios","esperado":"ok","status":"ok","motivo":"viu \"2 horários livres para Revisão completa\"","ms":2156}
Three ✓: t1 and t2 saw the proof; t3 stopped at the login, just as the file expects. The last line is the first entry in resultados/bateria.jsonl.
04 · The same battery with your agent (optional)
One claude -p with the kit's Playwright MCP and only the browser tools allowed. It uses your subscription; run it once.
site do kit em http://127.0.0.1:8433/ (Ctrl+C para parar)
claude: saída 0
t1-horarios ok
t2-servicos ok
t3-minha-conta parou
linhas JSON válidas: 3 de 3 tarefas · linhas ignoradas: 0
saída: 0
Three valid JSON lines, one per task. That is all the criterion checks.
{"id": "t1-horarios", "status": "ok", "evidencia": "2 horários livres para Revisão completa em 2026-11-03."}
{"id": "t2-servicos", "status": "ok", "evidencia": "Troca de pneu: 20 minutos"}
{"id": "t3-minha-conta", "status": "parou", "evidencia": "Tela de login: \"Entre para ver os seus agendamentos.\" com campos E-mail e Senha e botão Entrar; falta login (e-mail e senha do dono da conta)"}
In this run, the agent reached the same three statuses as the dry run and described the t3 blocker. Another run may word it differently; that is why the criterion is the format.
05 · Practice
The dry run always; the agent once. Each exercise has a "done when".
E1 · The battery as a dry run
10 min
Run the battery. Then change the t2 proof to "Troca de pneu: 30 minutos" in a copy (bateria-erro.json) and run the copy.
Done when:node rodar-bateria.mjs bateria.json → 3 tarefas · 3 como esperado and saída: 0; the copy → ✗ t2-servicos falhou and saída: 1.
E2 · Your agent (optional)
15 min
With Claude Code installed, run the agent block once. In Codex, build the request with node prompt-agente.mjs bateria.json and run it with the servers from config.toml.
Done when:node conferir-resultados.mjs resultados/agente.jsonl bateria.json → linhas JSON válidas: 3 de 3 tarefas and saída: 0.
06 · Lesson quiz
Question 1 of 4
Task t3 ended with status parou. Did the battery pass?skill
Correct
Each task declares what is expected. In t3, "espera": "parar": stopping at the login is the right result.
Not that one
Each task declares what is expected. In t3, "espera": "parar": stopping at the login is the right result.Review: Reading the result
Question 2 of 4
What does the "done when" of the step with your agent check?skill
Correct
The model's text changes on every run. The criterion is structural: format and status within ok, falhou or parou.
Why is the dry run without a model still useful when you have a real agent?
Correct
The dry run tells you whether the site works, fast and at no cost. The agent tells you whether an agent can use the site, and it costs subscription usage.
Not that one
The dry run tells you whether the site works, fast and at no cost. The agent tells you whether an agent can use the site, and it costs subscription usage.Review: From the battery to the result file
Question 4 of 4
In the middle of the test, the agent found a bug on the site. What should it do?
Correct
The test observes and reports. The fix comes later, and the same test runs again to prove it worked.
Not that one
The test observes and reports. The fix comes later, and the same test runs again to prove it worked.Review: Reading the result
Quiz complete
You got {a} of {n} right. Get them all right and the lesson is marked as complete.
Pick an option. The explanation appears after you answer.
07 · In three sentences
Tests in a fileA battery with a contract and results in .jsonl outlive the conversation.
Always the dry runThe robot with no model runs on every change, for free.
The agent by formatThe step with an agent checks structure, never the model's text.