Skip to main content

At a glance

  • Auth: every REST call sends Authorization: Bearer $CHECKSUM_API_KEY. Key location: Settings → Project Settings.
  • Async: POST /auto-generate returns 202 with batchId. Poll GET /auto-generate/batch/{batchId} every 10–30 s until allTerminal is true.
  • Cloud generation clones from the Git provider, so it only sees pushed commits.
  • PR-based generation always diffs against the PR head branch.
  • Output per flow: one *.checksum.md story + one *.checksum.spec.ts test on a new branch, delivered as a PR.

How generation works

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
Test Generation Flow

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.

Start generation

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.

Start generation from the REST API

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.
Only the first three fields are required:Checksum answers with 202 Accepted:
Keep the batchId to check on progress. links.session opens the live session in the web app if you want to watch.

Check on progress

Ask for the batch every 10–30 seconds until allTerminal is true. When it finishes, each session’s prUrl points to the new pull request.
GET
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.
Needs curl, jq, and the variables CHECKSUM_API_KEY, PR_NUMBER, REPO (owner/repo), and HEAD_BRANCH.

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.Next: poll GET /public-api/v1/auto-generate/batch/{batchId}.

GET https://api.checksum.ai/public-api/v1/auto-generate/batch/{batchId}

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.

What gets generated

For each flow, the agent writes two files to a new branch in your tests repository: 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.

Generation statuses

Each test flow in the web app shows where its generation stands: 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.

Review and merge

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.

Troubleshooting

envOverrides only accepts your application’s own variables. Names reserved by Checksum, including CI and anything starting with CHECKSUM_, are rejected.
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.
Cloud sessions clone from your Git provider. Push your commits, then trigger generation again.
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 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).

Detect Test Flows

Let the agent propose what to test.

Deep vs Standard

Trade speed for thoroughness.

Agent Sessions

Answer questions, approve plans, and track progress.