API regression testing and response comparison
Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. Download, no sign-up →
An API response changed after an update. Did the order total break, or did only the time and request ID change? Compare the same operation across releases and keep the assertions for the next run.
Prepare comparable runs
Keep the scenario, dataset rows and expected values. Run it against v1, then v2 under the same conditions. Checkcraft Pro history matches results by scenario and data row identity. Separately recreated scenarios may appear as additions and removals, so preserve their identity.
Record the response before the update
This JSON is an illustrative example, not a response from a customer system. The agreed total equals the sum of the two item amounts, so the baseline is 2000. Save the baseline run and release label. Changes to inputs, discounts or currency require a separate expected result.

{"orderId":"ORD-1042","requestId":"run-a","timestamp":"2026-10-10T09:00:00Z","items":[{"amount":1200},{"amount":800}],"total":2000}Compare the JSON response after the release
The second illustrative response changes requestId, timestamp and total. A new time and request ID are allowed in this example. A total of 2500 with unchanged items needs investigation. A difference from the old version alone is not proof of a defect; check the requirement.
{"orderId":"ORD-1042","requestId":"run-b","timestamp":"2026-10-11T09:00:00Z","items":[{"amount":1200},{"amount":800}],"total":2500}Exclude requestId and timestamp from comparison
In Pro, open run history and comparison and select two runs of the same scenario. Enter the paths below, separated by a comma, in the ignored-paths field and compare. These exclusions affect JSON value comparison. They do not disable saved assertions or hide a failed run. Keep separate assertions if the identifier or timestamp is itself part of a requirement.
$.requestId, $.timestampRead the changed field
For the two responses above, those exclusions leave $.total changing from 2000 to 2500. Check the sum assertion and save the comparison as HTML. Include the API versions, inputs and expected value in the bug report. Built-in history comparison requires Pro. The fixtures below demonstrate the separate task of rerunning a saved assertion and inspecting its result.
Account for arrays and response formats
JSON objects are compared by fields, while arrays are compared by index. Reordering an array can produce differences without changing its members. Decide whether order matters under the contract. This does not promise automatic matching by a business key. XML and other text are compared as a whole; JSON path exclusions do not apply.
Repeat after the fix
Rerun the same assertions on the corrected version. Changing the expected 2000 to 2500 merely to obtain a pass does not verify the fix. For operations creating orders or payments, arrange test data and cleanup before repeating POST requests. Response comparison does not remove write side effects.
Keep a regression set for the team
Postman, code-based tests and an AI-assisted script can also compare responses. Choose a workflow the team can reproduce and correlate with operation logs. Checkcraft Pro shared rule blocks are versioned, with explicit acceptance of updates. Export a CI/CD bundle for a pipeline and configure schedules in your CI system.
Repeat the sample
The quick experiment below runs in the test case editor. The screenshots show the detailed report available in HTTP run or Log run. For HTTP run, return the sample JSON or XML from a local mock and run the imported case against it, then open Results, Details and With structures. For Log run, load the sample into a log source, enable No request, run the case, then open Details and Detailed.
These are existing synthetic fixtures and captured text reports, not a customer deployment.

What API regression testing is
Regression testing answers one question: did the change break what used to work. For an API that means repeating checks after a release and comparing responses with what they were before.
| Kind | What runs | When |
|---|---|---|
| Full regression | All checks | Before a major release |
| Partial | Checks for changed and neighbouring endpoints | After a service change |
| Smoke | Main scenarios in minutes | After every deployment |
What to compare in responses
- Status code and Content-Type.
- The set of fields: nothing missing, nothing extra.
- Types: a number did not become a string.
- Values that must not change: totals, statuses, reference data.
- Response time: no noticeable growth.
Fields that change on every call (requestId, timestamp, tokens) are excluded, otherwise every run is red. Checking the field set is covered in required and extra JSON fields.
Comparing responses from the command line
# save the response before and after the release, dropping volatile fields
curl -s https://api.example.com/orders/5001 | jq 'del(.requestId, .timestamp)' > before.json
# ... deployment ...
curl -s https://api.example.com/orders/5001 | jq 'del(.requestId, .timestamp)' > after.json
diff before.json after.jsonFor arrays where order does not matter, sort elements before comparing, or a different order shows a false difference. To compare two JSON documents without a terminal, use online JSON compare.
How to put regression into CI
- Collect checks into a suite and run it on each commit or nightly.
- Save a JUnit report so CI shows failed checks.
- A failed regression stops the deployment.
- Review the suite monthly: drop stale checks, add bugs you found.
Setup is in API tests in Jenkins and GitLab CI and report formats in API test reports.
Key takeaways
- Regression checks that a change did not break what worked.
- Compare codes, field sets, types and stable values.
- Exclude volatile fields and sort order-free arrays.
- Run the suite in CI and stop the deployment on failure.
How to choose checks for regression
- Main money scenarios: create order, pay, refund.
- Endpoints changed in this release and their neighbours.
- Places where bugs were found before: every fixed bug becomes a check.
- Public APIs used by external clients: their responses must not break without a version.
Start with 10–20 checks that run in minutes and grow the suite as you find bugs. Check refusals separately, see negative API tests.
A contract as the base of regression
If the API has an OpenAPI or JSON Schema description, validating the response against the schema catches the most common breaks: a missing field, a changed type, a new required field.
{
"type": "object",
"required": ["orderId", "status", "total"],
"properties": {
"orderId": { "type": "integer" },
"status": { "enum": ["NEW", "PAID", "SHIPPED"] },
"total": { "type": "number", "minimum": 0 }
}
}A schema does not check values or calculations, so keep total and status checks next to it. Try a schema in the JSON Schema validator.
Regression of logs and neighbour services
After a release the response can stay the same while a neighbour service stops receiving events. So regression includes a log check by traceId: after the request the service log has the right record and no ERROR. This catches integration breaks that response comparison cannot see.
Frequently asked questions
What is API regression testing?
Re-checking an API after changes to make sure what worked still works.
How is regression different from a smoke test?
A smoke test covers a few main scenarios in minutes; regression covers all or all affected checks.
How do I avoid false failures when comparing responses?
Exclude fields like requestId and timestamp and sort arrays whose order does not matter.
Repeat this on your own API
Checkcraft is a desktop app that saves API response checks without code and shows what did not match. Start with a sample, then use your own sanitized data. Free runs on Windows and Linux with no time limit.
Download FreeDownload and first runNo sign-up or email needed, the archive is ready in a couple of minutes. See the edition limits.
Start with the linked example and compare its result with your own test requirement.