# API regression testing and response comparison

Source: https://checkcraft.ru/en/guides/api-regression-testing.html · updated 2026-11-24

Compare JSON API responses before and after a release, exclude requestId and timestamp in Checkcraft Pro, and repeat checks after a fix.

Practical workflow

Checkcraft is a desktop app for checking APIs and logs without code, with a free edition. [Download, no sign-up →](https://checkcraft.ru/en/download-checkcraft.html#free-download)

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.

Checkcraft · 11 October 2026

Get help with your first test →

## 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.

Repeating checks like this by hand? Checkcraft saves them and reruns them in one click. [Download Free →](https://checkcraft.ru/en/download-checkcraft.html#free-download)

```
{"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, $.timestamp
```

## Read 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.

[Test case](https://checkcraft.ru/examples/en/first-check.testcase.json) · [Passing JSON](https://checkcraft.ru/examples/en/first-check-valid.json) · [Failing JSON](https://checkcraft.ru/examples/en/first-check-broken.json) · [Passing report](https://checkcraft.ru/examples/en/first-check-valid-report.txt) · [Failing report](https://checkcraft.ru/examples/en/first-check-broken-report.txt)

Actual detailed HTTP run report with rules next to the checked values. Open the screenshot to see the full run screen.

## 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](https://checkcraft.ru/en/guides/json-required-extra-fields.html).

## 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.json
```

For 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](https://checkcraft.ru/en/guides/json-compare-online.html).

## 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](https://checkcraft.ru/en/guides/api-tests-in-jenkins.html) and report formats in [API test reports](https://checkcraft.ru/en/guides/api-test-reports.html).

## 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](https://checkcraft.ru/en/guides/api-conditional-negative-tests.html).

## 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](https://checkcraft.ru/en/guides/json-schema-validator.html).

## 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](https://checkcraft.ru/en/guides/trace-id.html): after the request the service log has the right record and no ERROR. This catches integration breaks that response comparison cannot see.

Next step

## 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 Free](https://checkcraft.ru/en/download-checkcraft.html#free-download) · [Download and first run](https://checkcraft.ru/en/download-checkcraft.html)

No sign-up or email needed, the archive is ready in a couple of minutes. See the [edition limits](https://checkcraft.ru/en/pricing.html).

## Continue with a related task

[How to write an API bug report a developer can reproduce](https://checkcraft.ru/en/guides/api-bug-report.html) · [API test reports in HTML, TXT and JUnit XML](https://checkcraft.ru/en/guides/api-test-reports.html) · [Run API tests in Jenkins and CI pipelines](https://checkcraft.ru/en/guides/api-tests-in-jenkins.html)

Start with the linked example and compare its result with your own test requirement.

Ask a person

## Get help with your first test

Tell us what you want to test or where you got stuck. We can help you start Checkcraft, choose an example and understand your first run. You can ask before downloading.

[Ask in Telegram](https://t.me/checkcraftchat)Send an email

The Telegram group is public: do not post passwords, tokens or confidential work data. A description of your task is enough to start.

You can also email us support@checkcraft.ru

Page card: /ai/pages/en/guides/api-regression-testing.md
