Checksum’s AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.
Every trigger starts an agent session, which runs this pipeline:
1 · PlanDeep mode only: interview + plan
→
2 · ImplementStory .checksum.md + test .checksum.spec.ts
→
3 · ReviewSelf-review for quality and correctness
→
4 · VerifyActually runs the tests against your environment
→
5 · DeliverPull request to your tests repo
The test generation pipeline, from trigger to pull request.
Checksum’s world model is built from real user-behavior patterns, and the agent reaches ~97% test accuracy. Generated tests include data setup and cleanup, selectors grounded in your source code, and a production-ready structure. Unlike local coding agents, Checksum runs in the cloud 24/7, generating and verifying tests autonomously at scale. You can start many sessions in parallel and come back to finished PRs.
Detect first for broad coverageTo cover a whole feature area, run detection first. You can then review and prioritize the proposed flows before any code is written. For one quick, targeted test, generate straight from a manual flow or a PR.
Pick where you want to start. Every option starts the same agent session and pipeline. They differ in what you give the agent and whether a PR opens automatically.
Use the API when a release bot, an internal tool, or a custom CI step should kick off test generation. You tell Checksum which pull request to cover. It replies right away with a batchId, works in the background, and opens a pull request in your tests repository when the tests are ready. Progress also appears as a single comment on the source PR, posted by Checksum, so your CI step doesn’t need to comment. To have a coding agent build this CI step for you, use CI Setup Prompts → Prompt 2.
The batch moves from pending to in_progress, then ends as completed or failed. It has the same shape as a healing batch, without the healing-only fields testRunId and sessions[].checksumTestId.
Example: a script that generates tests for a PR and waits for the result
Needs curl, jq, and the variables CHECKSUM_API_KEY, PR_NUMBER, REPO (owner/repo), and HEAD_BRANCH.
#!/usr/bin/env bashset -euo pipefailBASE="https://api.checksum.ai/public-api/v1"# 1. Start generation for the PRBATCH=$(curl -sf -X POST "$BASE/auto-generate" \ -H "Authorization: Bearer $CHECKSUM_API_KEY" -H "Content-Type: application/json" \ -d "$(jq -n --argjson pr "$PR_NUMBER" --arg repo "$REPO" --arg br "$HEAD_BRANCH" \ '{prNumber: $pr, repoName: $repo, branch: $br}')" | jq -r .batchId)echo "Started batch: $BATCH"# 2. Poll until every session is finisheduntil [[ "$(curl -sf "$BASE/auto-generate/batch/$BATCH" \ -H "Authorization: Bearer $CHECKSUM_API_KEY" | tee /tmp/batch.json | jq -r .allTerminal)" == "true" ]]; do sleep 30done# 3. Print each session's result and PR linkjq -r '.sessions[] | "\(.status) \(.prUrl // "no PR")"' /tmp/batch.json
POST https://api.checksum.ai/public-api/v1/auto-generate
Starts a generation agent session for a pull request. Opens a PR in the tests repository when finished. Progress is posted as one sticky comment on the source PR. Generates from a PR only: saved test flows require the web app, and description-only runs require MCP.
Header
Value
Authorization
Bearer $CHECKSUM_API_KEY
Content-Type
application/json
Body field
Type
Required
Description
prNumber
number
Yes
Pull request to generate tests for. Used as agent context and for the sticky progress comment.
repoName
string
Yes
Repository that hosts the PR, <owner>/<repo>. Must be connected in Git Integration.
branch
string
Yes
The PR’s head branch. The agent diffs against it.
metadata
object
No
Free-form key/value pairs forwarded to the agent as context.
envOverrides
object (string → string)
No
Per-session environment variables layered on the project environment. Keys named CI or starting with CHECKSUM_ are rejected with 400.
Response field (202)
Type
Description
batchId
string
Pass to GET /auto-generate/batch/{batchId}
sessionId
string
The generating agent session
links.session
string (URL)
Live session in the web app
Error
Cause
Fix
400
Reserved key in envOverrides (CI, CHECKSUM_*)
Pass only application variables, e.g. BASE_URL
401
Missing or invalid API key
Send Authorization: Bearer $CHECKSUM_API_KEY. Verify with GET /me.
Next: poll GET /public-api/v1/auto-generate/batch/{batchId}.
GET https://api.checksum.ai/public-api/v1/auto-generate/batch/{batchId}
Path parameter
Type
Description
batchId
string
From POST /auto-generate
Response field (200)
Type
Description
batchId
string
The batch being reported
status
enum
pending (not started), in_progress (at least one session running), completed (all sessions succeeded), failed (one or more sessions failed)
totalSessions
number
Sessions in the batch
completedCount
number
Sessions that finished successfully
failedCount
number
Sessions that failed
allTerminal
boolean
true once every session has finished. Stop polling.
sessions[].sessionId
string
Agent session ID
sessions[].status
string
Session state, e.g. running, completed
sessions[].prUrl
string | null
Tests-repo PR URL once opened, otherwise null
Unlike a healing batch, a generation batch has no testRunId and no sessions[].checksumTestId.Polling rule: every 10–30 seconds until allTerminal is true. On failed, open links.session from the start response.
If the Checksum GitHub App is installed on a repository, anyone with write access can ask for tests right on the pull request. Comment:
/checksum generate
Add instructions on the same line to steer the agent:
/checksum generate focus on the new SSO login flow and error states
Checksum reacts with 👀 while it starts, 🚀 once the session is running, or 👎 if it can’t start (usually missing permissions or the app isn’t installed). Progress goes in one sticky comment that is updated in place, so the thread stays tidy. The agent always works from the PR’s head branch, so feature-branch PRs get tests for the right code.
Automation welcomeBots and automation accounts work just like teammates. PRs opened by Dependabot, Renovate, or your own release bot can get generated tests. Any bot account with write access can post /checksum generate, or call POST /auto-generate, to start the agent whenever you need it.
Enabled by Checksum Checksum can turn on automatic generation for every non-draft PR. It works the same as /checksum generate, without anyone commenting. Draft PRs are skipped. Ask your Checksum team to enable it for your project.
Reference for AI: /checksum generate
Item
Value
Syntax
/checksum generate [free-text instructions on the same line] as a PR comment
Requirement
Checksum GitHub App installed on the repository (Git Integration)
Requirement
Commenter (person or bot account) has write access to the repository
Target code
Always the PR head branch. Checksum fetches the head ref from GitHub.
Progress
One sticky PR comment, edited in place
Output
A PR in the tests repository
Automatic variant
Auto-generate on PR open: non-draft PRs only, enabled per project by Checksum
Reaction
Meaning
👀
Command received, session starting
🚀
Session started successfully
👎
Command rejected (missing permissions, or the app isn’t installed)
With the Checksum MCP server connected, you can ask Claude Code, Cursor, or VS Code for tests in plain English:
Generate Checksum tests for PR 142 in acme/web on branch feature/checkout.
Give your agent a pull request (number, repository, and branch) and Checksum opens a PR with the tests. If you ask twice for the same PR, it joins the run already in progress. Or describe a flow, such as “the login flow with an invalid password”, and the tests stay in the session for you to review without a PR. Or target specs you already have, such as a collection or the flows detection just found, and Checksum generates tests for exactly those. For a description or targeted run, ask for a PR up front, or once you’ve reviewed the session. Your agent can also point a run at a preview deployment, switch on Deep mode, report progress, and pass along follow-up instructions while the run is going.
Push firstCloud generation checks out your repo from your Git provider, so it only sees pushed commits. Commit and push before you ask. The Claude Code plugin does this for you.
Reference for AI: checksum_test_generate
MCP server: https://api.checksum.ai/public-api/mcp (Streamable HTTP). Tool: checksum_test_generate. Returns a batchId (a sessionId for a targeted run). It changes things: it starts a billable cloud run and can open a PR.
Input
Required
Behavior
PR number + repository + branch
All three together, or one of the options below
Generates for the PR and opens a PR with the tests. A repeat request for the same PR joins the run in progress.
extraInstructions
Instead of a PR
Describes the flow to cover. Tests stay in the session unless autoCreatePR is true.
userStoryIds and/or collectionNames
Instead of a PR
Targeted generation for exactly those specs. Can’t be combined with a PR. Returns a sessionId.
codeRepoNames, repoBranches
No
Which connected code repositories (and branches) a targeted run reads
autoCreatePR
No
true opens a PR when a description or targeted run finishes
deepMode
No
true for Deep mode: the session pauses for plan approval (checksum_session_approve). Default: Standard
envOverrides
No
Points the run at another environment, e.g. a preview deployment
Related tool
Use
checksum_session_status
Progress, the agent’s latest messages, changed files, and prUrl. Poll until the run finishes.
Once the Checksum Slack app is installed (Notifications & Slack), mention it in a thread in a channel it’s been invited to:
@checksum add E2E coverage for the new checkout discount flow
Checksum reads the whole thread, not just your message, and uses it as the agent’s instructions. The bot replies with a link to follow the session. If the thread includes pull-request context, the tests arrive as a PR; otherwise they wait in the session for you to review. Mention the bot in a thread rather than a top-level message, and be specific: “Add tests for guest checkout with an expired card” works much better than “add tests.”
Beta The Checksum Capture Chrome extension turns one walkthrough of your app into a batch of tests. Click through the flow you want covered, and talk through it if you like. Checksum hands the recording to the agent, which starts a generation session from it.It’s not a 1:1 recorder like Playwright’s codegen, which turns each click into one line of one test. Checksum treats your recording as training material for the agent. The agent learns the flow, the screens, and what you care about, then writes the tests it implies. When you split the recording into flows, one recording can produce 10, 20, 30 or more tests, depending on what you ask for and how deep and broad the flow is.
Open the extension and paste your project’s API key, which you’ll find on the Settings page in the Checksum web app. The key tells Checksum which project the recording and the generated tests belong to.
3
Go to your app
In the same browser, go straight to the page of your app where the flow starts.
4
Set up the session
Name the session, then choose how the agent should turn your recording into tests:
Exactly what I recorded (one test): one test that follows your walkthrough.
Split into flows (one test per flow): the agent breaks the recording, and your narration, into separate flows and writes a test for each. This is how one recording becomes a batch of tests.
To talk while you record, turn on Record microphone narration. Chrome asks for microphone access the first time.
5
Record and click through
Start recording and use the app the way a user would. The extension captures your actions from the page’s DOM as you go. If you turned on narration, talk the agent through what matters (see below).
6
Stop, and let the agent generate
When you stop, the recording is sent to Checksum and an agent session starts generating tests from it.
7
Review and open a PR
The generated tests appear on the session’s page in the Checksum web app. Review them there, then open a pull request to your tests repository from the session when you’re ready.
Narration is the best way to tell the agent things it can’t learn from clicks alone. Use it to:
Call out edge cases: “An expired card should show an error here, not a spinner.”
State assertions: “After saving, the total at the top should update and the badge should say Draft.”
Share app knowledge: requirements, business rules, or behavior that a user wouldn’t notice, such as “Only admins see this tab” or “This field is required for EU customers.”
Ask for variations: “There are four plan types and two billing periods. Capture every combination.” The agent expands the one path you showed into a test for each variation.
Say how much you wantWith Split into flows, the size of the batch follows your ask. One quiet walkthrough gives a focused set of tests. Narrating variations, roles, and error cases gives the agent the breadth to write many more.
Reference for AI: Checksum Capture Chrome extension
Connected to a project with the project’s API key, found on the Settings page of the web app (API keys)
Session setup
Session name · output mode: Exactly what I recorded (one test) or Split into flows (one test per flow) · optional Record microphone narration
Captures
User actions from the DOM while recording, plus optional microphone narration
Output
Starts a generation agent session that uses the recording as context. “Exactly what I recorded” gives one test. “Split into flows” gives a batch, one test per flow (often 10–30+).
Delivery
Tests stay on the agent session page in the web app. No PR is opened automatically: open one from the session.
Not
A 1:1 action-to-code recorder (unlike Playwright codegen)
Narration uses
Edge cases, assertions, requirements and app knowledge, and requests to cover variations or combinations
Select a collection and find the test flow(s) you want. You can select several flows in one collection and generate them together.
3
Click Generate
Choose Standard or Deep mode (see Deep vs Standard). Standard is the default.
4
Watch or walk away
An agent session starts. Standard sessions finish without any input from you. Deep sessions wait for you to approve the plan first. The flow’s status updates as the agent works.
Test Generation: a collection's flows with per-flow Generate actions.
For each flow, the agent writes two files to a new branch in your tests repository:
File
Purpose
*.checksum.md
The story: a human-readable spec with frontmatter, data setup, data cleanup, and numbered steps with verifications. It is the source of truth for what the test does.
*.checksum.spec.ts
The test: Playwright TypeScript using Checksum fixtures. Pure Playwright underneath, so you can run it anywhere.
The branch is named like ChecksumAI-generated-test-20260315143022, and the PR description explains the flow being covered. See Story & Test Format for both file formats.
Each test flow in the web app shows where its generation stands:
Status
Meaning
Idle
No generation in progress for this flow
Queued
Generation is queued and will start shortly
Running
The agent is planning, implementing, or reviewing
Verifying
The agent is executing the tests to prove they pass
Completed
Tests are generated and the PR is ready
Failed
Generation hit an error. Open the session for details.
Aborted
Generation was cancelled
Edited
The generated tests were manually edited afterward
PR Merged
You merged the generated-tests PR
PR Closed
You closed the PR without merging
API and MCP callers see the equivalent state on the batch (pending → in_progress → completed / failed) and on each session. See Agent Sessions for the session lifecycle.
Generated tests arrive as a normal pull request. Checksum’s agent behaves like another developer on your team. By default, nothing reaches your main branch without your review. If you turn on auto-merge, Checksum’s PRs merge without a human review and the steps below are optional.
1
Read the PR
Review the story file first, since it’s the fastest way to confirm the agent understood the flow. Then review the test code.
2
Run it yourself (optional)
Check out the branch and run npx checksumai test -g "<test title>". See Running Tests.
3
Request changes
Edit the files directly, or re-trigger generation with more specific instructions. A flow you edit shows the Edited status.
4
Merge
Once merged, the tests join your suite and are covered by auto-maintenance.
envOverrides only accepts your application’s own variables. Names reserved by Checksum, including CI and anything starting with CHECKSUM_, are rejected.
Tests were generated but no PR was opened
Checksum opens a PR only when it knows the pull request number, repository, and branch. Slack mentions without PR context, MCP runs from a description or targeted specs (without autoCreatePR), and Chrome extension recordings leave the tests in the session. Open the session and create the PR from there (PR Eligible state), ask your coding agent to call checksum_session_create_pr, or re-run against a PR.
The tests cover old code
Cloud sessions clone from your Git provider. Push your commits, then trigger generation again.
/checksum generate got a 👎 reaction
The commenter needs write access, and the Checksum GitHub App must be installed on that repository. Check Settings → Git Integration for an Active status.
The session failed with "application unreachable"
The agent couldn’t load your environment URL. Check that the URL in Environments is correct and up. If the environment is behind a VPN or firewall, confirm Checksum’s IP addresses are allowlisted (see Security & Access).
Answer questions, approve plans, and track progress.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Checksum AI","colors":{"primary":"#4b47ff","light":"#7b78ff","dark":"#3631c2"},"favicon":"https://mintcdn.com/checksum/wZyd4JkJxoxMAP-8/favicon.svg?fit=max\u0026auto=format\u0026n=wZyd4JkJxoxMAP-8\u0026q=85\u0026s=ae163ffdd590aeab0b119c3f7b57a6e7","navbar":{"primary":{"type":"button","label":"Get Started","href":"https://checksum.ai/request-demo"}},"footer":{"links":[{"header":"Support","items":[{"label":"support@checksum.ai","href":"mailto:support@checksum.ai"},{"label":"Checksum web app","href":"https://app.checksum.ai"}]}]},"fonts":{"family":"Google Sans"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"checksum","hasAudioNarration":false,"actualSubdomain":"checksum","customDomains":["checksum.ai"],"gitSource":{"type":"github","owner":"checksum-ai","repo":"checksumai-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ad65bd3dd9cbc8cb861264e","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"E2E Testing","count":26},{"language":"default","tag":"API Testing","count":13},{"language":"default","tag":"Test Generation","count":6},{"language":"default","tag":"Create \u0026 Review","count":5},{"language":"default","tag":"Test Execution","count":5},{"language":"default","tag":"Managing Your Project","count":4},{"language":"default","tag":"Run \u0026 Monitor","count":3},{"language":"default","tag":"Maintenance \u0026 Monitoring","count":3},{"language":"default","tag":"Integrations","count":3},{"language":"default","tag":"Start Here","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#topbar-cta-button>a>span:first-child{border-radius:10rem;background-color:#4b47ff;transition:background-color 0.3s cubic-bezier(0.165, 0.84, 0.44, 1)}#topbar-cta-button>a:hover>span:first-child{background-color:#3631c2;opacity:1}#topbar-cta-button>a{padding:0.5rem 1.375rem}#topbar-cta-button>a svg{display:none}#topbar-cta-button>a>div{margin-right:0}#topbar-cta-button>a>div>span{font-weight:500;letter-spacing:0}.part{display:flex;align-items:center;gap:14px;margin:56px 0 8px;padding:16px 20px;border-radius:16px;border:1px solid rgb(224 224 230);background:rgb(245 245 250 / 0.5)}.part .part-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;flex:none;font:700 13px ui-monospace, SFMono-Regular, Menlo, monospace;color:#4b47ff;background:rgb(75 71 255 / 0.1)}.part.ui .part-icon{color:#166534;background:#f0fdf4}.part.bg .part-icon{color:rgb(82 82 87);background:rgb(114 114 119 / 0.12);font-family:inherit}.part .part-title{font-weight:600;font-size:16px;line-height:22px;color:rgb(25 24 30)}.part .part-sub{font-size:14px;line-height:20px;color:rgb(114 114 119)}.dark .part{border-color:rgb(255 255 255 / 0.12);background:rgb(255 255 255 / 0.03)}.dark .part .part-icon{color:#7b78ff;background:rgb(123 120 255 / 0.12)}.dark .part.ui .part-icon{color:#86efac;background:rgb(22 101 52 / 0.15)}.dark .part.bg .part-icon{color:rgb(160 160 166);background:rgb(255 255 255 / 0.06)}.dark .part .part-title{color:rgb(224 224 230)}.flow{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;margin:20px 0 28px}.flow .node{flex:1 1 110px;border:1px solid rgb(224 224 230);border-radius:12px;padding:10px 12px;font-size:13px;line-height:19px}.flow .node b{display:block;font-size:14px;color:rgb(25 24 30);font-weight:600;margin-bottom:2px}.flow .node span{color:rgb(82 82 87)}.flow .node code{font-size:12px;padding:1px 5px}.flow .arrow{align-self:center;color:rgb(114 114 119)}.dark .flow .node{border-color:rgb(255 255 255 / 0.12)}.dark .flow .node b{color:rgb(224 224 230)}.dark .flow .node span{color:rgb(160 160 166)}.pill{display:inline-block;font-weight:600;font-size:12px;line-height:18px;padding:1px 8px;border-radius:8px;white-space:nowrap;vertical-align:1px;background:rgb(114 114 119 / 0.1);color:rgb(82 82 87)}.pill.app{background:rgb(75 71 255 / 0.1);color:#4b47ff}.pill.api{background:rgb(37 99 235 / 0.1);color:#2563eb}.pill.agent{background:rgb(147 51 234 / 0.1);color:#9333ea}.pill.cs{background:rgb(234 88 12 / 0.1);color:#ea580c}.pill.git{background:rgb(22 163 74 / 0.1);color:#16a34a}.dark .pill{color:rgb(160 160 166)}.dark .pill.app{color:#7b78ff}.endpoint{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0;padding:8px 12px 8px 8px;border:1px solid rgb(12 12 17 / 0.1);border-radius:12px;font:14px/20px ui-monospace, SFMono-Regular, Menlo, monospace;color:rgb(25 24 30)}.endpoint code{background:none!important;border:0!important;padding:0!important;font:inherit;color:inherit;font-weight:500}.endpoint .method{font:700 12px/1 inherit;font-family:inherit;padding:5px 8px;border-radius:8px;letter-spacing:.02em}.endpoint .method.get{color:#16a34a;background:rgb(22 163 74 / 0.12)}.endpoint .method.post{color:#2563eb;background:rgb(37 99 235 / 0.12)}.endpoint .method.put{color:#ea580c;background:rgb(234 88 12 / 0.12)}.endpoint .method.delete{color:#dc2626;background:rgb(220 38 38 / 0.12)}.dark .endpoint{border-color:rgb(255 255 255 / 0.1);color:rgb(224 224 230)}.ai-ref>details.accordion{border:1px dashed rgb(75 71 255 / 0.35)!important;background:rgb(75 71 255 / 0.03)!important}.dark .ai-ref>details.accordion{border-color:rgb(123 120 255 / 0.35)!important;background:rgb(123 120 255 / 0.05)!important}.ai-ref{margin:8px 0 32px}"}],"page":{"pagePath":"generate-tests","slug":"/generate-tests","pageMetadata":{"title":"Generate Tests","description":"Checksum's AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.","href":"/generate-tests"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Checksum’s AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,Frame,Heading,OptimizedImage,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`at-a-glance`,children:`At a glance`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Start from`}),_jsx(_components.th,{children:`What you do`}),_jsx(_components.th,{children:`What you get`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`#start-generation-from-the-rest-api`,children:`REST API`})}),_jsxs(_components.td,{children:[`Send a PR’s number, repo, and branch to `,_jsx(_components.code,{children:`POST /auto-generate`})]}),_jsx(_components.td,{children:`A PR with tests`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`#ask-from-a-pull-request`,children:`Pull request`})}),_jsxs(_components.td,{children:[`Comment `,_jsx(_components.code,{children:`/checksum generate`})]}),_jsx(_components.td,{children:`A PR with tests`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`#ask-your-coding-agent-mcp`,children:`Coding agent (MCP)`})}),_jsx(_components.td,{children:`Ask in plain English`}),_jsx(_components.td,{children:`A PR, or tests to review in the session`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`#mention-@checksum-in-slack`,children:`Slack`})}),_jsxs(_components.td,{children:[`Mention `,_jsx(_components.code,{children:`@checksum`}),` in a thread`]}),_jsx(_components.td,{children:`A PR when the thread has PR context`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`#generate-from-a-collection`,children:`Web app`})}),_jsxs(_components.td,{children:[`Click `,_jsx(_components.strong,{children:`Generate`}),` on saved test flows`]}),_jsx(_components.td,{children:`A PR with tests`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`#record-a-walkthrough-with-the-chrome-extension`,children:`Chrome extension`})}),_jsx(_components.td,{children:`Record yourself clicking through a flow, optionally narrating`}),_jsx(_components.td,{children:`One test, or a batch split into flows, to review in the session`})]})]})]}),`\n`,_jsx(`div`,{className:`ai-ref`,children:_jsxs(Accordion,{title:`Reference for AI: generation at a glance`,icon:`robot`,id:`reference-for-ai-generation-at-a-glance`,children:[_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Interface`}),_jsx(_components.th,{children:`Entry point`}),_jsx(_components.th,{children:`Input`}),_jsx(_components.th,{children:`Opens a PR`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`REST API`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST https://api.checksum.ai/public-api/v1/auto-generate`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`prNumber`}),` + `,_jsx(_components.code,{children:`repoName`}),` + `,_jsx(_components.code,{children:`branch`}),` (head)`]}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`REST API (poll)`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`GET https://api.checksum.ai/public-api/v1/auto-generate/batch/{batchId}`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`batchId`})}),_jsx(_components.td,{children:`n/a`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`GitHub`}),_jsxs(_components.td,{children:[`PR comment `,_jsx(_components.code,{children:`/checksum generate [instructions]`})]}),_jsx(_components.td,{children:`PR diff + instructions`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Automatic`}),_jsx(_components.td,{children:`Auto-generate on PR open (enabled by Checksum, non-draft PRs)`}),_jsx(_components.td,{children:`PR diff`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`MCP`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`checksum_test_generate`})}),_jsxs(_components.td,{children:[`PR (number + repo + branch), `,_jsx(_components.code,{children:`extraInstructions`}),`, or existing specs (`,_jsx(_components.code,{children:`userStoryIds`}),` / `,_jsx(_components.code,{children:`collectionNames`}),`)`]}),_jsxs(_components.td,{children:[`PR-based runs by default; others with `,_jsx(_components.code,{children:`autoCreatePR`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Slack`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`@checksum \u003crequest>`}),` in a thread`]}),_jsx(_components.td,{children:`Thread conversation`}),_jsx(_components.td,{children:`With PR context only`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Web app`}),_jsx(_components.td,{children:`Test Generation → Generate`}),_jsx(_components.td,{children:`Saved test flows`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Chrome extension`}),_jsx(_components.td,{children:`Checksum Capture (Beta): record a walkthrough`}),_jsx(_components.td,{children:`Recorded DOM actions + optional voice narration`}),_jsx(_components.td,{children:`From the session, on demand`})]})]})]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Auth: every REST call sends `,_jsx(_components.code,{children:`Authorization: Bearer $CHECKSUM_API_KEY`}),`. Key location: `,_jsx(_components.strong,{children:`Settings → Project Settings`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Async: `,_jsx(_components.code,{children:`POST /auto-generate`}),` returns `,_jsx(_components.code,{children:`202`}),` with `,_jsx(_components.code,{children:`batchId`}),`. Poll `,_jsx(_components.code,{children:`GET /auto-generate/batch/{batchId}`}),` every 10–30 s until `,_jsx(_components.code,{children:`allTerminal`}),` is `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsx(_components.li,{children:`Cloud generation clones from the Git provider, so it only sees pushed commits.`}),`\n`,_jsxs(_components.li,{children:[`PR-based generation always diffs against the PR `,_jsx(_components.strong,{children:`head`}),` branch.`]}),`\n`,_jsxs(_components.li,{children:[`Output per flow: one `,_jsx(_components.code,{children:`*.checksum.md`}),` story + one `,_jsx(_components.code,{children:`*.checksum.spec.ts`}),` test on a new branch, delivered as a PR.`]}),`\n`]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`how-generation-works`,children:`How generation works`}),`\n`,_jsxs(_components.p,{children:[`Every trigger starts an `,_jsx(_components.a,{href:`/agent-sessions`,children:`agent session`}),`, which runs this pipeline:`]}),`\n`,_jsxs(`div`,{className:`flow`,children:[_jsxs(`div`,{className:`node`,children:[_jsx(`b`,{children:`1 · Plan`}),_jsx(`span`,{children:`Deep mode only: interview + plan`})]}),_jsx(`div`,{className:`arrow`,children:`→`}),_jsxs(`div`,{className:`node`,children:[_jsx(`b`,{children:`2 · Implement`}),_jsxs(`span`,{children:[`Story `,_jsx(`code`,{children:`.checksum.md`}),` + test `,_jsx(`code`,{children:`.checksum.spec.ts`})]})]}),_jsx(`div`,{className:`arrow`,children:`→`}),_jsxs(`div`,{className:`node`,children:[_jsx(`b`,{children:`3 · Review`}),_jsx(`span`,{children:`Self-review for quality and correctness`})]}),_jsx(`div`,{className:`arrow`,children:`→`}),_jsxs(`div`,{className:`node`,children:[_jsx(`b`,{children:`4 · Verify`}),_jsx(`span`,{children:`Actually runs the tests against your environment`})]}),_jsx(`div`,{className:`arrow`,children:`→`}),_jsxs(`div`,{className:`node`,children:[_jsx(`b`,{children:`5 · Deliver`}),_jsx(`span`,{children:`Pull request to your tests repo`})]})]}),`\n`,_jsx(Frame,{caption:`The test generation pipeline, from trigger to pull request.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_generation_flow.svg?fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=f434cc464ee382b45bf6f51c6f684088`,alt:`Test Generation Flow`,\"data-og-width\":`860`,width:`860`,\"data-og-height\":`210`,height:`210`,\"data-path\":`images/test_generation_flow.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_generation_flow.svg?w=280\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=af4b4d8cb44bb7ec50eeb5fb0c1ad31b 280w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_generation_flow.svg?w=560\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=108919795f8a158bbffa268459d69275 560w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_generation_flow.svg?w=840\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=87e2bf5f6dbf9e6d2c3f70525a7de79d 840w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_generation_flow.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=0025978812ca2f534b8f6cc80c6f3db1 1100w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_generation_flow.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=ee51ea1efaf87e5d3d2ef6c3b66b25f9 1650w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_generation_flow.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=814cb747e0e0872ca08b8d0102212bcd 2500w`})}),`\n`,_jsx(_components.p,{children:`Checksum’s world model is built from real user-behavior patterns, and the agent reaches ~97% test accuracy. Generated tests include data setup and cleanup, selectors grounded in your source code, and a production-ready structure. Unlike local coding agents, Checksum runs in the cloud 24/7, generating and verifying tests autonomously at scale. You can start many sessions in parallel and come back to finished PRs.`}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Detect first for broad coverage`})}),_jsxs(_components.p,{children:[`To cover a whole feature area, run `,_jsx(_components.a,{href:`/detect-tests`,children:`detection`}),` first. You can then review and prioritize the proposed flows before any code is written. For one quick, targeted test, generate straight from a manual flow or a PR.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`start-generation`,children:`Start generation`}),`\n`,_jsx(_components.p,{children:`Pick where you want to start. Every option starts the same agent session and pipeline. They differ in what you give the agent and whether a PR opens automatically.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`REST API`,id:`rest-api`,\"data-child-heading-ids\":`[\"start-generation-from-the-rest-api\",\"check-on-progress\",\"post-https%3A%2F%2Fapi-checksum-ai%2Fpublic-api%2Fv1%2Fauto-generate\",\"get-https%3A%2F%2Fapi-checksum-ai%2Fpublic-api%2Fv1%2Fauto-generate%2Fbatch%2F%7Bbatchid%7D\"]`,children:[_jsx(Heading,{level:`3`,id:`start-generation-from-the-rest-api`,children:`Start generation from the REST API`}),_jsxs(_components.p,{children:[`Use the API when a release bot, an internal tool, or a custom CI step should kick off test generation. You tell Checksum which pull request to cover. It replies right away with a `,_jsx(_components.code,{children:`batchId`}),`, works in the background, and opens a pull request in your tests repository when the tests are ready. Progress also appears as a single comment on the source PR, posted by Checksum, so your CI step doesn’t need to comment. To have a coding agent build this CI step for you, use `,_jsx(_components.a,{href:`/ci-setup-prompts#prompt-2-test-generation-when-a-pr-opens`,children:`CI Setup Prompts → Prompt 2`}),`.`]}),_jsxs(`div`,{className:`endpoint`,children:[_jsx(`span`,{className:`method post`,children:`POST`}),_jsx(`code`,{children:_jsx(_components.a,{href:`https://api.checksum.ai/public-api/v1/auto-generate`,children:`https://api.checksum.ai/public-api/v1/auto-generate`})})]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.checksum.ai/public-api/v1/auto-generate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$CHECKSUM_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prNumber\": 42,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"repoName\": \"acme-co/webapp\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"branch\": \"feature/checkout-redesign\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": { \"triggeredBy\": \"release-bot\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"envOverrides\": { \"BASE_URL\": \"https://preview.example.com/pr-42/\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(_components.p,{children:`Only the first three fields are required:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What it’s for`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`prNumber`}),`, `,_jsx(_components.code,{children:`repoName`}),`, `,_jsx(_components.code,{children:`branch`})]}),_jsxs(_components.td,{children:[`The pull request to cover: its number, its repository (`,_jsx(_components.code,{children:`owner/repo`}),`), and its `,_jsx(_components.strong,{children:`head`}),` branch`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`metadata`})}),_jsx(_components.td,{children:`Optional context for the agent, such as who triggered the run`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`envOverrides`})}),_jsxs(_components.td,{children:[`Optional variables for this run only, typically a preview URL like `,_jsx(_components.code,{children:`{\"BASE_URL\": \"https://pr-42.preview.example.com\"}`})]})]})]})]}),_jsxs(_components.p,{children:[`Checksum answers with `,_jsx(_components.code,{children:`202 Accepted`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"batchId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"batch-abc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sess-xyz\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"links\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"session\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.checksum.ai/...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Keep the `,_jsx(_components.code,{children:`batchId`}),` to check on progress. `,_jsx(_components.code,{children:`links.session`}),` opens the live session in the web app if you want to watch.`]}),_jsx(Heading,{level:`4`,id:`check-on-progress`,children:`Check on progress`}),_jsxs(_components.p,{children:[`Ask for the batch every 10–30 seconds until `,_jsx(_components.code,{children:`allTerminal`}),` is `,_jsx(_components.code,{children:`true`}),`. When it finishes, each session’s `,_jsx(_components.code,{children:`prUrl`}),` points to the new pull request.`]}),_jsxs(`div`,{className:`endpoint`,children:[_jsx(`span`,{className:`method get`,children:`GET`}),_jsx(`code`,{children:`https://api.checksum.ai/public-api/v1/auto-generate/batch/{batchId}`})]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.checksum.ai/public-api/v1/auto-generate/batch/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BATCH_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$CHECKSUM_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"batchId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"batch-abc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"in_progress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"totalSessions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completedCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"failedCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"allTerminal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sessions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"sessionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sess-xyz\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"running\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"prUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`The batch moves from `,_jsx(_components.code,{children:`pending`}),` to `,_jsx(_components.code,{children:`in_progress`}),`, then ends as `,_jsx(_components.code,{children:`completed`}),` or `,_jsx(_components.code,{children:`failed`}),`. It has the same shape as a `,_jsx(_components.a,{href:`/auto-healing#follow-healing-progress`,children:`healing batch`}),`, without the healing-only fields `,_jsx(_components.code,{children:`testRunId`}),` and `,_jsx(_components.code,{children:`sessions[].checksumTestId`}),`.`]}),_jsxs(Accordion,{title:`Example: a script that generates tests for a PR and waits for the result`,id:`example-a-script-that-generates-tests-for-a-pr-and-waits-for-the-result`,children:[_jsxs(_components.p,{children:[`Needs `,_jsx(_components.code,{children:`curl`}),`, `,_jsx(_components.code,{children:`jq`}),`, and the variables `,_jsx(_components.code,{children:`CHECKSUM_API_KEY`}),`, `,_jsx(_components.code,{children:`PR_NUMBER`}),`, `,_jsx(_components.code,{children:`REPO`}),` (`,_jsx(_components.code,{children:`owner/repo`}),`), and `,_jsx(_components.code,{children:`HEAD_BRANCH`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`#!/usr/bin/env bash`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`set`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -euo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pipefail`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BASE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.checksum.ai/public-api/v1\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Start generation for the PR`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BATCH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sf`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/auto-generate\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$CHECKSUM_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -n`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --argjson`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pr \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PR_NUMBER`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`--arg`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` repo \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REPO`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`--arg`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` br \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HEAD_BRANCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{prNumber: $pr, repoName: $repo, branch: $br}')\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .batchId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Started batch: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Poll until every session is finished`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`until`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [[ `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/auto-generate/batch/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$CHECKSUM_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` tee`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /tmp/batch.json `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .allTerminal)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"true\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]]; `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`do`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` sleep`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 30`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`done`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Print each session's result and PR link`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`jq`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '.sessions[] | \"\\\\(.status) \\\\(.prUrl // \"no PR\")\"'`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /tmp/batch.json`})]}),`\n`]})})})]}),_jsx(`div`,{className:`ai-ref`,children:_jsxs(Accordion,{title:`Reference for AI: generation REST API`,icon:`robot`,id:`reference-for-ai-generation-rest-api`,children:[_jsxs(Heading,{level:`4`,id:`post-https%3A%2F%2Fapi-checksum-ai%2Fpublic-api%2Fv1%2Fauto-generate`,children:[`POST `,_jsx(_components.code,{children:`https://api.checksum.ai/public-api/v1/auto-generate`})]}),_jsx(_components.p,{children:`Starts a generation agent session for a pull request. Opens a PR in the tests repository when finished. Progress is posted as one sticky comment on the source PR. Generates from a PR only: saved test flows require the web app, and description-only runs require MCP.`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Bearer $CHECKSUM_API_KEY`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]})]})]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Body field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prNumber`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Pull request to generate tests for. Used as agent context and for the sticky progress comment.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`repoName`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Repository that hosts the PR, `,_jsx(_components.code,{children:`\u003cowner>/\u003crepo>`}),`. Must be connected in Git Integration.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`branch`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`The PR’s head branch. The agent diffs against it.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`metadata`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Free-form key/value pairs forwarded to the agent as context.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`envOverrides`})}),_jsx(_components.td,{children:`object (string → string)`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Per-session environment variables layered on the project environment. Keys named `,_jsx(_components.code,{children:`CI`}),` or starting with `,_jsx(_components.code,{children:`CHECKSUM_`}),` are rejected with `,_jsx(_components.code,{children:`400`}),`.`]})]})]})]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Response field (202)`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`batchId`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Pass to `,_jsx(_components.code,{children:`GET /auto-generate/batch/{batchId}`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sessionId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`The generating agent session`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`links.session`})}),_jsx(_components.td,{children:`string (URL)`}),_jsx(_components.td,{children:`Live session in the web app`})]})]})]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Error`}),_jsx(_components.th,{children:`Cause`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`Reserved key in `,_jsx(_components.code,{children:`envOverrides`}),` (`,_jsx(_components.code,{children:`CI`}),`, `,_jsx(_components.code,{children:`CHECKSUM_*`}),`)`]}),_jsxs(_components.td,{children:[`Pass only application variables, e.g. `,_jsx(_components.code,{children:`BASE_URL`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Missing or invalid API key`}),_jsxs(_components.td,{children:[`Send `,_jsx(_components.code,{children:`Authorization: Bearer $CHECKSUM_API_KEY`}),`. Verify with `,_jsx(_components.a,{href:`/authentication#check-that-your-key-works`,children:_jsx(_components.code,{children:`GET /me`})}),`.`]})]})]})]}),_jsxs(_components.p,{children:[`Next: poll `,_jsx(_components.code,{children:`GET /public-api/v1/auto-generate/batch/{batchId}`}),`.`]}),_jsxs(Heading,{level:`4`,id:`get-https%3A%2F%2Fapi-checksum-ai%2Fpublic-api%2Fv1%2Fauto-generate%2Fbatch%2F%7Bbatchid%7D`,children:[`GET `,_jsx(_components.code,{children:`https://api.checksum.ai/public-api/v1/auto-generate/batch/{batchId}`})]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Path parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`batchId`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`From `,_jsx(_components.code,{children:`POST /auto-generate`})]})]})})]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Response field (200)`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`batchId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`The batch being reported`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{children:`enum`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pending`}),` (not started), `,_jsx(_components.code,{children:`in_progress`}),` (at least one session running), `,_jsx(_components.code,{children:`completed`}),` (all sessions succeeded), `,_jsx(_components.code,{children:`failed`}),` (one or more sessions failed)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`totalSessions`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Sessions in the batch`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completedCount`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Sessions that finished successfully`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failedCount`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Sessions that failed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`allTerminal`})}),_jsx(_components.td,{children:`boolean`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` once every session has finished. Stop polling.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sessions[].sessionId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Agent session ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sessions[].status`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Session state, e.g. `,_jsx(_components.code,{children:`running`}),`, `,_jsx(_components.code,{children:`completed`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sessions[].prUrl`})}),_jsx(_components.td,{children:`string | null`}),_jsxs(_components.td,{children:[`Tests-repo PR URL once opened, otherwise `,_jsx(_components.code,{children:`null`})]})]})]})]}),_jsxs(_components.p,{children:[`Unlike a healing batch, a generation batch has no `,_jsx(_components.code,{children:`testRunId`}),` and no `,_jsx(_components.code,{children:`sessions[].checksumTestId`}),`.`]}),_jsxs(_components.p,{children:[`Polling rule: every 10–30 seconds until `,_jsx(_components.code,{children:`allTerminal`}),` is `,_jsx(_components.code,{children:`true`}),`. On `,_jsx(_components.code,{children:`failed`}),`, open `,_jsx(_components.code,{children:`links.session`}),` from the start response.`]})]})})]}),_jsxs(Tab,{title:`Pull request`,id:`pull-request`,\"data-child-heading-ids\":`[\"ask-from-a-pull-request\",\"auto-generate-when-a-pr-opens\"]`,children:[_jsx(Heading,{level:`3`,id:`ask-from-a-pull-request`,children:`Ask from a pull request`}),_jsx(_components.p,{children:`If the Checksum GitHub App is installed on a repository, anyone with write access can ask for tests right on the pull request. Comment:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`/checksum generate`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(_components.p,{children:`Add instructions on the same line to steer the agent:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`/checksum generate focus on the new SSO login flow and error states`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`Checksum reacts with 👀 while it starts, 🚀 once the session is running, or 👎 if it can’t start (usually missing permissions or the app isn’t installed). Progress goes in `,_jsx(_components.strong,{children:`one sticky comment`}),` that is updated in place, so the thread stays tidy. The agent always works from the PR’s `,_jsx(_components.strong,{children:`head branch`}),`, so feature-branch PRs get tests for the right code.`]}),_jsxs(Tip,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Automation welcome`})}),_jsxs(_components.p,{children:[`Bots and automation accounts work just like teammates. PRs opened by Dependabot, Renovate, or your own release bot can get generated tests. Any bot account with write access can post `,_jsx(_components.code,{children:`/checksum generate`}),`, or call `,_jsx(_components.code,{children:`POST /auto-generate`}),`, to start the agent whenever you need it.`]})]}),_jsx(Heading,{level:`4`,id:`auto-generate-when-a-pr-opens`,children:`Auto-generate when a PR opens`}),_jsxs(_components.p,{children:[_jsx(`span`,{className:`pill cs`,children:`Enabled by Checksum`}),` Checksum can turn on automatic generation for every `,_jsx(_components.strong,{children:`non-draft`}),` PR. It works the same as `,_jsx(_components.code,{children:`/checksum generate`}),`, without anyone commenting. Draft PRs are skipped. Ask your Checksum team to enable it for your project.`]}),_jsx(`div`,{className:`ai-ref`,children:_jsxs(Accordion,{title:`Reference for AI: /checksum generate`,icon:`robot`,id:`reference-for-ai-checksum-generate`,children:[_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Item`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Syntax`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`/checksum generate [free-text instructions on the same line]`}),` as a PR comment`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Requirement`}),_jsxs(_components.td,{children:[`Checksum GitHub App installed on the repository (`,_jsx(_components.a,{href:`/git-integration`,children:`Git Integration`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Requirement`}),_jsxs(_components.td,{children:[`Commenter (person or bot account) has `,_jsx(_components.strong,{children:`write`}),` access to the repository`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Target code`}),_jsxs(_components.td,{children:[`Always the PR `,_jsx(_components.strong,{children:`head branch`}),`. Checksum fetches the head ref from GitHub.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Progress`}),_jsx(_components.td,{children:`One sticky PR comment, edited in place`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Output`}),_jsx(_components.td,{children:`A PR in the tests repository`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Automatic variant`}),_jsx(_components.td,{children:`Auto-generate on PR open: non-draft PRs only, enabled per project by Checksum`})]})]})]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Reaction`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`👀`}),_jsx(_components.td,{children:`Command received, session starting`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`🚀`}),_jsx(_components.td,{children:`Session started successfully`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`👎`}),_jsx(_components.td,{children:`Command rejected (missing permissions, or the app isn’t installed)`})]})]})]})]})})]}),_jsxs(Tab,{title:`Coding agent (MCP)`,id:`coding-agent-mcp`,\"data-child-heading-ids\":`[\"ask-your-coding-agent-mcp\"]`,children:[_jsx(Heading,{level:`3`,id:`ask-your-coding-agent-mcp`,children:`Ask your coding agent (MCP)`}),_jsxs(_components.p,{children:[`With the `,_jsx(_components.a,{href:`/coding-agents#mcp-server-connect-and-use`,children:`Checksum MCP server`}),` connected, you can ask Claude Code, Cursor, or VS Code for tests in plain English:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Generate Checksum tests for PR 142 in acme/web on branch feature/checkout.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`Give your agent a `,_jsx(_components.strong,{children:`pull request`}),` (number, repository, and branch) and Checksum opens a PR with the tests. If you ask twice for the same PR, it joins the run already in progress. Or `,_jsx(_components.strong,{children:`describe a flow`}),`, such as “the login flow with an invalid password”, and the tests stay in the session for you to review without a PR. Or `,_jsx(_components.strong,{children:`target specs you already have`}),`, such as a collection or the flows `,_jsx(_components.a,{href:`/detect-tests`,children:`detection`}),` just found, and Checksum generates tests for exactly those. For a description or targeted run, ask for a PR up front, or once you’ve reviewed the session. Your agent can also point a run at a preview deployment, switch on `,_jsx(_components.a,{href:`/generation-modes`,children:`Deep mode`}),`, report progress, and pass along follow-up instructions while the run is going.`]}),_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Push first`})}),_jsxs(_components.p,{children:[`Cloud generation checks out your repo from your Git provider, so it only sees `,_jsx(_components.strong,{children:`pushed`}),` commits. Commit and push before you ask. The Claude Code plugin does this for you.`]})]}),_jsx(`div`,{className:`ai-ref`,children:_jsxs(Accordion,{title:`Reference for AI: checksum_test_generate`,icon:`robot`,id:`reference-for-ai-checksum-test-generate`,children:[_jsxs(_components.p,{children:[`MCP server: `,_jsx(_components.code,{children:`https://api.checksum.ai/public-api/mcp`}),` (Streamable HTTP). Tool: `,_jsx(_components.code,{children:`checksum_test_generate`}),`. Returns a `,_jsx(_components.code,{children:`batchId`}),` (a `,_jsx(_components.code,{children:`sessionId`}),` for a targeted run). It changes things: it starts a billable cloud run and can open a PR.`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Input`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`PR number + repository + branch`}),_jsxs(_components.td,{children:[`All three together, `,_jsx(_components.strong,{children:`or`}),` one of the options below`]}),_jsx(_components.td,{children:`Generates for the PR and opens a PR with the tests. A repeat request for the same PR joins the run in progress.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`extraInstructions`})}),_jsx(_components.td,{children:`Instead of a PR`}),_jsxs(_components.td,{children:[`Describes the flow to cover. Tests stay in the session unless `,_jsx(_components.code,{children:`autoCreatePR`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`userStoryIds`}),` and/or `,_jsx(_components.code,{children:`collectionNames`})]}),_jsx(_components.td,{children:`Instead of a PR`}),_jsxs(_components.td,{children:[`Targeted generation for exactly those specs. Can’t be combined with a PR. Returns a `,_jsx(_components.code,{children:`sessionId`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`codeRepoNames`}),`, `,_jsx(_components.code,{children:`repoBranches`})]}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Which connected code repositories (and branches) a targeted run reads`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`autoCreatePR`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` opens a PR when a description or targeted run finishes`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`deepMode`})}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`true`}),` for Deep mode: the session pauses for plan approval (`,_jsx(_components.code,{children:`checksum_session_approve`}),`). Default: Standard`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`envOverrides`})}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Points the run at another environment, e.g. a preview deployment`})]})]})]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Related tool`}),_jsx(_components.th,{children:`Use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`checksum_session_status`})}),_jsxs(_components.td,{children:[`Progress, the agent’s latest messages, changed files, and `,_jsx(_components.code,{children:`prUrl`}),`. Poll until the run finishes.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`checksum_session_prompt`})}),_jsx(_components.td,{children:`Send a follow-up instruction to a running session`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`checksum_session_approve`}),` / `,_jsx(_components.code,{children:`checksum_session_answer`})]}),_jsx(_components.td,{children:`Approve a deep-mode plan / answer the agent’s questions`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`checksum_session_create_pr`})}),_jsx(_components.td,{children:`Open the PR for a finished session that didn’t open one`})]})]})]}),_jsx(_components.p,{children:`Precondition: commits must be pushed. The cloud run clones from the Git provider.`})]})})]}),_jsxs(Tab,{title:`Slack`,id:`slack`,\"data-child-heading-ids\":`[\"mention-%40checksum-in-slack\"]`,children:[_jsxs(Heading,{level:`3`,id:`mention-@checksum-in-slack`,children:[`Mention `,_jsx(_components.code,{children:`@checksum`}),` in Slack`]}),_jsxs(_components.p,{children:[`Once the Checksum Slack app is installed (`,_jsx(_components.a,{href:`/notifications-and-slack#slack-@checksum-bot`,children:`Notifications \u0026 Slack`}),`), mention it in a thread in a channel it’s been invited to:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`@checksum add E2E coverage for the new checkout discount flow`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.p,{children:[`Checksum reads the `,_jsx(_components.strong,{children:`whole thread`}),`, not just your message, and uses it as the agent’s instructions. The bot replies with a link to follow the session. If the thread includes pull-request context, the tests arrive as a PR; otherwise they wait in the session for you to review. Mention the bot in a `,_jsx(_components.strong,{children:`thread`}),` rather than a top-level message, and be specific: “Add tests for guest checkout with an expired card” works much better than “add tests.”`]})]}),_jsxs(Tab,{title:`Chrome extension`,id:`chrome-extension`,\"data-child-heading-ids\":`[\"record-a-walkthrough-with-the-chrome-extension\",\"what-to-say-while-you-record\"]`,children:[_jsx(Heading,{level:`3`,id:`record-a-walkthrough-with-the-chrome-extension`,children:`Record a walkthrough with the Chrome extension`}),_jsxs(_components.p,{children:[_jsx(`span`,{className:`pill cs`,children:`Beta`}),` The `,_jsx(_components.strong,{children:`Checksum Capture`}),` Chrome extension turns one walkthrough of your app into a `,_jsx(_components.strong,{children:`batch of tests`}),`. Click through the flow you want covered, and talk through it if you like. Checksum hands the recording to the agent, which starts a generation session from it.`]}),_jsxs(_components.p,{children:[`It’s not a 1:1 recorder like Playwright’s codegen, which turns each click into one line of one test. Checksum treats your recording as `,_jsx(_components.strong,{children:`training material for the agent`}),`. The agent learns the flow, the screens, and what you care about, then writes the tests it implies. When you split the recording into flows, one recording can produce 10, 20, 30 or more tests, depending on what you ask for and how deep and broad the flow is.`]}),_jsxs(Steps,{children:[_jsx(Step,{title:`Install the extension`,children:_jsxs(_components.p,{children:[`Add `,_jsx(_components.a,{href:`https://chromewebstore.google.com/detail/checksum-capture-beta/pnooemkcjngfobcfkmfpmoglbocjiadi`,children:`Checksum Capture (Beta)`}),` to Chrome from the Chrome Web Store.`]})}),_jsx(Step,{title:`Connect it to your project`,children:_jsxs(_components.p,{children:[`Open the extension and paste your project’s API key, which you’ll find on the `,_jsx(_components.strong,{children:`Settings`}),` page in the `,_jsx(_components.a,{href:`https://app.checksum.ai`,children:`Checksum web app`}),`. The key tells Checksum which project the recording and the generated tests belong to.`]})}),_jsx(Step,{title:`Go to your app`,children:_jsx(_components.p,{children:`In the same browser, go straight to the page of your app where the flow starts.`})}),_jsxs(Step,{title:`Set up the session`,children:[_jsx(_components.p,{children:`Name the session, then choose how the agent should turn your recording into tests:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Exactly what I recorded (one test):`}),` one test that follows your walkthrough.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Split into flows (one test per flow):`}),` the agent breaks the recording, and your narration, into separate flows and writes a test for each. This is how one recording becomes a batch of tests.`]}),`\n`]}),_jsxs(_components.p,{children:[`To talk while you record, turn on `,_jsx(_components.strong,{children:`Record microphone narration`}),`. Chrome asks for microphone access the first time.`]})]}),_jsx(Step,{title:`Record and click through`,children:_jsx(_components.p,{children:`Start recording and use the app the way a user would. The extension captures your actions from the page’s DOM as you go. If you turned on narration, talk the agent through what matters (see below).`})}),_jsx(Step,{title:`Stop, and let the agent generate`,children:_jsxs(_components.p,{children:[`When you stop, the recording is sent to Checksum and an `,_jsx(_components.a,{href:`/agent-sessions`,children:`agent session`}),` starts generating tests from it.`]})}),_jsx(Step,{title:`Review and open a PR`,children:_jsx(_components.p,{children:`The generated tests appear on the session’s page in the Checksum web app. Review them there, then open a pull request to your tests repository from the session when you’re ready.`})})]}),_jsx(Heading,{level:`4`,id:`what-to-say-while-you-record`,children:`What to say while you record`}),_jsx(_components.p,{children:`Narration is the best way to tell the agent things it can’t learn from clicks alone. Use it to:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Call out edge cases:`}),` “An expired card should show an error here, not a spinner.”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`State assertions:`}),` “After saving, the total at the top should update and the badge should say Draft.”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Share app knowledge:`}),` requirements, business rules, or behavior that a user wouldn’t notice, such as “Only admins see this tab” or “This field is required for EU customers.”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Ask for variations:`}),` “There are four plan types and two billing periods. Capture every combination.” The agent expands the one path you showed into a test for each variation.`]}),`\n`]}),_jsxs(Tip,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Say how much you want`})}),_jsxs(_components.p,{children:[`With `,_jsx(_components.strong,{children:`Split into flows`}),`, the size of the batch follows your ask. One quiet walkthrough gives a focused set of tests. Narrating variations, roles, and error cases gives the agent the breadth to write many more.`]})]}),_jsx(`div`,{className:`ai-ref`,children:_jsx(Accordion,{title:`Reference for AI: Checksum Capture Chrome extension`,icon:`robot`,id:`reference-for-ai-checksum-capture-chrome-extension`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Item`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Name`}),_jsx(_components.td,{children:`Checksum Capture (Beta), a Chrome extension`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Install`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://chromewebstore.google.com/detail/checksum-capture-beta/pnooemkcjngfobcfkmfpmoglbocjiadi`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Auth`}),_jsxs(_components.td,{children:[`Connected to a project with the project’s API key, found on the `,_jsx(_components.strong,{children:`Settings`}),` page of the web app (`,_jsx(_components.a,{href:`/authentication#your-api-key`,children:`API keys`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Session setup`}),_jsxs(_components.td,{children:[`Session name · output mode: `,_jsx(_components.strong,{children:`Exactly what I recorded (one test)`}),` or `,_jsx(_components.strong,{children:`Split into flows (one test per flow)`}),` · optional `,_jsx(_components.strong,{children:`Record microphone narration`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Captures`}),_jsx(_components.td,{children:`User actions from the DOM while recording, plus optional microphone narration`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Output`}),_jsxs(_components.td,{children:[`Starts a generation agent session that uses the recording as context. “Exactly what I recorded” gives one test. “Split into flows” gives a `,_jsx(_components.strong,{children:`batch`}),`, one test per flow (often 10–30+).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Delivery`}),_jsx(_components.td,{children:`Tests stay on the agent session page in the web app. No PR is opened automatically: open one from the session.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Not`}),_jsx(_components.td,{children:`A 1:1 action-to-code recorder (unlike Playwright codegen)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Narration uses`}),_jsx(_components.td,{children:`Edge cases, assertions, requirements and app knowledge, and requests to cover variations or combinations`})]})]})]})})})]}),_jsxs(Tab,{title:`Collection`,id:`collection`,\"data-child-heading-ids\":`[\"generate-from-a-collection\"]`,children:[_jsx(Heading,{level:`3`,id:`generate-from-a-collection`,children:`Generate from a collection`}),_jsxs(Steps,{children:[_jsx(Step,{title:`Open Test Generation`,children:_jsxs(_components.p,{children:[`In `,_jsx(_components.a,{href:`https://app.checksum.ai`,children:`app.checksum.ai`}),`, choose `,_jsx(_components.strong,{children:`Test Generation`}),` in the sidebar.`]})}),_jsx(Step,{title:`Pick flows`,children:_jsx(_components.p,{children:`Select a collection and find the test flow(s) you want. You can select several flows in one collection and generate them together.`})}),_jsx(Step,{title:`Click Generate`,children:_jsxs(_components.p,{children:[`Choose `,_jsx(_components.strong,{children:`Standard`}),` or `,_jsx(_components.strong,{children:`Deep`}),` mode (see `,_jsx(_components.a,{href:`/generation-modes`,children:`Deep vs Standard`}),`). Standard is the default.`]})}),_jsx(Step,{title:`Watch or walk away`,children:_jsx(_components.p,{children:`An agent session starts. Standard sessions finish without any input from you. Deep sessions wait for you to approve the plan first. The flow’s status updates as the agent works.`})})]}),_jsx(Frame,{caption:`Test Generation: a collection's flows with per-flow Generate actions.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_page.png?fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=132dd2eea8f7c3c6d173ab3d266a3b32`,alt:`Test Generation page with a test flow and the Generate button`,\"data-og-width\":`1165`,width:`1165`,\"data-og-height\":`946`,height:`946`,\"data-path\":`images/test_page.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_page.png?w=280\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=de1b6c24ff2052b5998a5525909495b3 280w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_page.png?w=560\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=deff11f77961b4d4b7efa7087879dc37 560w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_page.png?w=840\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=23e6375377c8c830301eaaeb95fb8071 840w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_page.png?w=1100\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=c74a5cbfe70ab71387643103820e66ed 1100w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_page.png?w=1650\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=e2107db353513bd902c13bc132c6d632 1650w, https://mintcdn.com/checksum/jreTwWrmFV2djRX_/images/test_page.png?w=2500\u0026fit=max\u0026auto=format\u0026n=jreTwWrmFV2djRX_\u0026q=85\u0026s=ce0878eb0006e6d0c61cf63bec462dda 2500w`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`what-gets-generated`,children:`What gets generated`}),`\n`,_jsx(_components.p,{children:`For each flow, the agent writes two files to a new branch in your tests repository:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`File`}),_jsx(_components.th,{children:`Purpose`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`*.checksum.md`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`story`}),`: a human-readable spec with frontmatter, data setup, data cleanup, and numbered steps with verifications. It is the source of truth for what the test does.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`*.checksum.spec.ts`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.strong,{children:`test`}),`: Playwright TypeScript using Checksum fixtures. Pure Playwright underneath, so you can run it anywhere.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The branch is named like `,_jsx(_components.code,{children:`ChecksumAI-generated-test-20260315143022`}),`, and the PR description explains the flow being covered. See `,_jsx(_components.a,{href:`/story-and-test-format`,children:`Story \u0026 Test Format`}),` for both file formats.`]}),`\n`,_jsx(Heading,{level:`2`,id:`generation-statuses`,children:`Generation statuses`}),`\n`,_jsx(_components.p,{children:`Each test flow in the web app shows where its generation stands:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Idle`})}),_jsx(_components.td,{children:`No generation in progress for this flow`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Queued`})}),_jsx(_components.td,{children:`Generation is queued and will start shortly`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Running`})}),_jsx(_components.td,{children:`The agent is planning, implementing, or reviewing`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Verifying`})}),_jsx(_components.td,{children:`The agent is executing the tests to prove they pass`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Completed`})}),_jsx(_components.td,{children:`Tests are generated and the PR is ready`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Failed`})}),_jsx(_components.td,{children:`Generation hit an error. Open the session for details.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Aborted`})}),_jsx(_components.td,{children:`Generation was cancelled`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Edited`})}),_jsx(_components.td,{children:`The generated tests were manually edited afterward`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`PR Merged`})}),_jsx(_components.td,{children:`You merged the generated-tests PR`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`PR Closed`})}),_jsx(_components.td,{children:`You closed the PR without merging`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`API and MCP callers see the equivalent state on the batch (`,_jsx(_components.code,{children:`pending`}),` → `,_jsx(_components.code,{children:`in_progress`}),` → `,_jsx(_components.code,{children:`completed`}),` / `,_jsx(_components.code,{children:`failed`}),`) and on each session. See `,_jsx(_components.a,{href:`/agent-sessions#session-lifecycle`,children:`Agent Sessions`}),` for the session lifecycle.`]}),`\n`,_jsx(Heading,{level:`2`,id:`review-and-merge`,children:`Review and merge`}),`\n`,_jsxs(_components.p,{children:[`Generated tests arrive as a normal pull request. Checksum’s agent behaves like another developer on your team. By default, `,_jsx(_components.strong,{children:`nothing reaches your main branch without your review`}),`. If you turn on auto-merge, Checksum’s PRs merge without a human review and the steps below are optional.`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Read the PR`,children:_jsx(_components.p,{children:`Review the story file first, since it’s the fastest way to confirm the agent understood the flow. Then review the test code.`})}),_jsx(Step,{title:`Run it yourself (optional)`,children:_jsxs(_components.p,{children:[`Check out the branch and run `,_jsx(_components.code,{children:`npx checksumai test -g \"\u003ctest title>\"`}),`. See `,_jsx(_components.a,{href:`/running-tests`,children:`Running Tests`}),`.`]})}),_jsx(Step,{title:`Request changes`,children:_jsxs(_components.p,{children:[`Edit the files directly, or re-trigger generation with more specific instructions. A flow you edit shows the `,_jsx(_components.strong,{children:`Edited`}),` status.`]})}),_jsx(Step,{title:`Merge`,children:_jsxs(_components.p,{children:[`Once merged, the tests join your suite and are covered by `,_jsx(_components.a,{href:`/auto-maintenance`,children:`auto-maintenance`}),`.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`The API returned 400 for envOverrides`,id:`the-api-returned-400-for-envoverrides`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`envOverrides`}),` only accepts your application’s own variables. Names reserved by Checksum, including `,_jsx(_components.code,{children:`CI`}),` and anything starting with `,_jsx(_components.code,{children:`CHECKSUM_`}),`, are rejected.`]})}),_jsx(Accordion,{title:`Tests were generated but no PR was opened`,id:`tests-were-generated-but-no-pr-was-opened`,children:_jsxs(_components.p,{children:[`Checksum opens a PR only when it knows the pull request number, repository, and branch. Slack mentions without PR context, MCP runs from a description or targeted specs (without `,_jsx(_components.code,{children:`autoCreatePR`}),`), and Chrome extension recordings leave the tests in the session. Open the session and create the PR from there (`,_jsx(_components.strong,{children:`PR Eligible`}),` state), ask your coding agent to call `,_jsx(_components.code,{children:`checksum_session_create_pr`}),`, or re-run against a PR.`]})}),_jsx(Accordion,{title:`The tests cover old code`,id:`the-tests-cover-old-code`,children:_jsx(_components.p,{children:`Cloud sessions clone from your Git provider. Push your commits, then trigger generation again.`})}),_jsx(Accordion,{title:`/checksum generate got a 👎 reaction`,id:`checksum-generate-got-a-reaction`,children:_jsxs(_components.p,{children:[`The commenter needs write access, and the Checksum GitHub App must be installed on that repository. Check `,_jsx(_components.strong,{children:`Settings → Git Integration`}),` for an `,_jsx(_components.strong,{children:`Active`}),` status.`]})}),_jsx(Accordion,{title:`The session failed with \"application unreachable\"`,id:`the-session-failed-with-application-unreachable`,children:_jsxs(_components.p,{children:[`The agent couldn’t load your environment URL. Check that the URL in `,_jsx(_components.a,{href:`/environments`,children:`Environments`}),` is correct and up. If the environment is behind a VPN or firewall, confirm Checksum’s IP addresses are allowlisted (see `,_jsx(_components.a,{href:`/security-and-access#network-access`,children:`Security \u0026 Access`}),`).`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Detect Test Flows`,icon:`magnifying-glass`,href:`/detect-tests`,children:_jsx(_components.p,{children:`Let the agent propose what to test.`})}),_jsx(Card,{title:`Deep vs Standard`,icon:`layer-group`,href:`/generation-modes`,children:_jsx(_components.p,{children:`Trade speed for thoroughness.`})}),_jsx(Card,{title:`Agent Sessions`,icon:`robot`,href:`/agent-sessions`,children:_jsx(_components.p,{children:`Answer questions, approve plans, and track progress.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate Tests","description":"Checksum's AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.","href":"/generate-tests"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[20356,20398,"(`div`,{className:`endpoint`,children:_j"],[20448,20543,""]]},"mdxExtracts":{"tableOfContents":[{"title":"At a glance","slug":"at-a-glance","depth":2,"children":[]},{"title":"How generation works","slug":"how-generation-works","depth":2,"children":[]},{"title":"Start generation","slug":"start-generation","depth":2,"children":[{"title":"Start generation from the REST API","slug":"start-generation-from-the-rest-api","depth":3,"children":[],"tabId":"rest-api"},{"title":"Check on progress","slug":"check-on-progress","depth":4,"children":[],"tabId":"rest-api"},{"title":"Ask from a pull request","slug":"ask-from-a-pull-request","depth":3,"children":[],"tabId":"pull-request"},{"title":"Auto-generate when a PR opens","slug":"auto-generate-when-a-pr-opens","depth":4,"children":[],"tabId":"pull-request"},{"title":"Ask your coding agent (MCP)","slug":"ask-your-coding-agent-mcp","depth":3,"children":[],"tabId":"coding-agent-mcp"},{"title":"Mention @checksum in Slack","slug":"mention-@checksum-in-slack","depth":3,"children":[],"tabId":"slack"},{"title":"Record a walkthrough with the Chrome extension","slug":"record-a-walkthrough-with-the-chrome-extension","depth":3,"children":[],"tabId":"chrome-extension"},{"title":"What to say while you record","slug":"what-to-say-while-you-record","depth":4,"children":[],"tabId":"chrome-extension"},{"title":"Generate from a collection","slug":"generate-from-a-collection","depth":3,"children":[],"tabId":"collection"}]},{"title":"What gets generated","slug":"what-gets-generated","depth":2,"children":[]},{"title":"Generation statuses","slug":"generation-statuses","depth":2,"children":[]},{"title":"Review and merge","slug":"review-and-merge","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"checksum","siteName":"Checksum AI","title":"Generate Tests - Checksum AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-30T21:31:47.702Z","originalFileLocation":"generate-tests.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Checksum\u0026#x27;s AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Checksum AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate Tests - Checksum AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Checksum\u0026#x27;s AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Checksum AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://checksum.ai/docs/generate-tests\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://checksum.mintlify.site/docs/_mintlify/api/og/v2?division=Test+Generation\u0026amp;title=Generate+Tests\u0026amp;description=Checksum%27s+AI+agent+writes+production-ready+Playwright+tests+for+you+and+delivers+them+as+a+pull+request.+You+can+start+it+from+your+own+tooling+with+the+REST+A\u0026amp;theme=c85aea844d07e0308e4277b6\u0026amp;signature=e9113c8b13b7fcdb449b3509f07c60a3dc9a92b892a13abd5930a734bca28ab9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate Tests - Checksum AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Checksum\u0026#x27;s AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://checksum.mintlify.site/docs/_mintlify/api/og/v2?division=Test+Generation\u0026amp;title=Generate+Tests\u0026amp;description=Checksum%27s+AI+agent+writes+production-ready+Playwright+tests+for+you+and+delivers+them+as+a+pull+request.+You+can+start+it+from+your+own+tooling+with+the+REST+A\u0026amp;theme=c85aea844d07e0308e4277b6\u0026amp;signature=e9113c8b13b7fcdb449b3509f07c60a3dc9a92b892a13abd5930a734bca28ab9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/checksum/pmzJ8ZJkJQJFdXVv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Checksum AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4b47ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://checksum.ai/docs/generate-tests\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/generate-tests.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://checksum.ai/#organization\",\"name\":\"Checksum AI\",\"url\":\"https://checksum.ai\"},{\"@type\":\"WebSite\",\"@id\":\"https://checksum.ai/docs#website\",\"name\":\"Checksum AI\",\"url\":\"https://checksum.ai/docs\",\"publisher\":{\"@id\":\"https://checksum.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://checksum.ai/docs/generate-tests#webpage\",\"url\":\"https://checksum.ai/docs/generate-tests\",\"name\":\"Generate Tests\",\"description\":\"Checksum's AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.\",\"dateModified\":\"2026-09-30T21:31:47.702Z\",\"isPartOf\":{\"@id\":\"https://checksum.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://checksum.ai/docs/generate-tests#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://checksum.ai/docs/generate-tests#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Test Generation\",\"item\":\"https://checksum.ai/docs/test-generation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate Tests\",\"item\":\"https://checksum.ai/docs/generate-tests\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://checksum.ai/docs/generate-tests#article\",\"headline\":\"Generate Tests\",\"name\":\"Generate Tests\",\"description\":\"Checksum's AI agent writes production-ready Playwright tests for you and delivers them as a pull request. You can start it from your own tooling with the REST API, from a pull request comment, from your coding agent, from Slack, from the web app, or by recording a walkthrough with the Chrome extension. Wherever you start it, the agent plans, writes, reviews, and runs the tests before handing them over.\",\"url\":\"https://checksum.ai/docs/generate-tests\",\"mainEntityOfPage\":{\"@id\":\"https://checksum.ai/docs/generate-tests#webpage\"},\"dateModified\":\"2026-09-30T21:31:47.702Z\",\"publisher\":{\"@id\":\"https://checksum.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://checksum.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Checksum AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Checksum AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/generate-tests.md","siteName":"Checksum AI","nav":{"global":null,"tabs":[{"tab":"E2E Testing","groups":[{"group":"Start Here","pages":[{"title":"Checksum AI: E2E Testing Platform","sidebarTitle":"Overview","href":"/overview"},{"title":"Onboarding \u0026 Proof of Value","href":"/onboarding"},{"title":"Key Concepts \u0026 Glossary","href":"/concepts"}]},{"group":"Managing Your Project","pages":[{"title":"Environments \u0026 Test Users","href":"/environments"},{"title":"Git Integration","href":"/git-integration"},{"title":"Test Repository \u0026 Config","href":"/test-repository"},{"title":"API Keys \u0026 Authentication","href":"/authentication"}]},{"group":"Test Generation","pages":[{"title":"How Test Generation Works","href":"/test-generation"},{"title":"Detect Test Flows","description":"Detection is the first step in the Checksum workflow. You don't have to write test specifications by hand. Checksum's AI agent analyzes your application and identifies the user flows most worth testing. When you generate tests from the REST API, MCP, a pull request, or Slack, the agent detects and generates in the same session. You can also run detection on its own from the web app, review the flows it finds, and generate from them.","href":"/detect-tests"},{"title":"Generate Tests","href":"/generate-tests"},{"title":"Deep vs Standard Modes","description":"Every Checksum pipeline (detection, generation, and healing) runs in one of two modes. Standard is fast and direct. Deep interviews you, builds a knowledge base of your app, and plans before it implements. The mode sets how thorough the agent is and how much input it needs from you.","href":"/generation-modes"},{"title":"Story \u0026 Test Format","href":"/story-and-test-format"},{"title":"Agent Sessions","href":"/agent-sessions"}]},{"group":"Test Execution","pages":[{"title":"Running Tests","href":"/running-tests"},{"title":"CI/CD Integration","href":"/ci-integration"},{"title":"CI Setup Prompts for AI Agents","href":"/ci-setup-prompts"},{"title":"Sharding","href":"/sharding"},{"title":"Results, Reports \u0026 Traces","href":"/results-and-reports"}]},{"group":"Maintenance \u0026 Monitoring","pages":[{"title":"Auto-Maintenance \u0026 Recovery","href":"/auto-maintenance"},{"title":"Auto-Healing","href":"/auto-healing"},{"title":"Feature Health Dashboard","href":"/health-dashboard"}]},{"group":"Integrations","pages":[{"title":"Coding Agents \u0026 MCP","href":"/coding-agents"},{"title":"Notifications \u0026 Slack","href":"/notifications-and-slack"},{"title":"Issue Tracker Sync","href":"/issue-tracker-sync"}]},{"group":"Security \u0026 Admin","pages":[{"title":"Security \u0026 Access","href":"/security-and-access"},{"title":"Microsoft Entra ID SSO","href":"/sso-entra"}]}]},{"tab":"API Testing","pages":[{"title":"API Testing","href":"/api-testing"}]}]},"basePath":"","title":"Generate Tests - Checksum AI","buildId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","deploymentId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-BI-0LlZX.js","DynamicMarkdown-JYyBNlrJ.js","zoom-image-lightbox-hIK1nklX.js","lightbox-handle-r17bVUz3.js"]}