Skip to main content
Checksum’s API tests aren’t a black box. Every test is standard Python written with pytest and committed to your repository, so you can open any test and read exactly what it does, edit it, and run it independently of Checksum.

Where the tests live

Generated tests are organized under a checksum/ directory in your repo:

What a generated test looks like

A test is a function whose docstring spells out the Journey, Steps, Payloads, and Assertions (the same summary you see on the API Tests page). The body drives the journey by calling utility functions and asserting the result of each step. Each test receives an authenticated HTTP client.

Journeys, not isolated requests

Testing an endpoint tells you it returns a 200. Testing a journey tells you your product actually works. A real user creates a resource, updates it, triggers a downstream effect, and expects the state to stay consistent throughout. Checksum chains those calls together so the bugs that only appear across a sequence get caught. Dynamic values are wired automatically. When a step creates a resource, the test captures the values the API returns (IDs, tokens, references) and passes them into later steps, so you never hardcode an ID. Generated data is uniquified per run (note the run_id above), which keeps tests stable instead of brittle against a single frozen database state.

Assertions

The agent derives assertions from what each step should produce:
  • Status codes the call is expected to return.
  • Response structure and field values in the body.
  • Cross-step persistence, verifying that state created in one step is correctly reflected in later steps (the same id comes back on retrieve, the updated email persists on re-fetch, and so on).
It covers happy paths and failure cases. Alongside the successful flow, the agent generates tests for invalid inputs, missing records, unauthorized requests, and mid-journey errors. Verifying that your API fails correctly matters as much as verifying that it succeeds.

Payloads

Request bodies for POST and PUT calls come from your spec: field names, types, constraints, and example values. Where your source provides examples the agent uses them; where it doesn’t, it generates values consistent with the field definitions.

Shared utility functions

Reusable setup, teardown, and helper logic lives in utility functions under checksum/utils/, which the tests import and call rather than duplicating in every test. A utility is just a small, readable function:
Cleanup runs in a try/finally using a utility (like delete_customer_if_present above), so a run never leaves state behind even if a step fails.

How they’re organized

Browse this on the API Tests page, or open the raw files in API Files.

You own the tests

Because the tests are plain pytest in your repo, they run anywhere pytest runs: locally during development or natively in your CI pipeline, like any other test. Edit them freely; the agent is aware of manual edits and flags an affected test for your review rather than silently overwriting your changes.

Next Steps