Skip to content
Checkcraft
Practical workflow

Validate API status codes, headers and response time

Get help with your first test →

A visible response is not yet a repeatable test. Status, headers and content can fail independently.

Checkcraft ·

Prepare an HTTP run

Create a request to a test API or mock and select its test cases. Status and headers come from response metadata. A JSON document pasted for analysis does not include that metadata.

Assert the status

Use the HTTP status assertion with the contract value. Reading a resource may return 200 while creating one may require 201. Treat all 2xx values as equivalent only when the contract allows it.

Assert headers and content

Use the response header assertion for Content-Type, accounting for permitted charset parameters. Use the JSON response field assertion for a business value. Frontend and backend contracts may distinguish the string "2" from the number 2.

Set a time threshold

A response time assertion compares milliseconds against your limit. The 1000 ms example is not a universal SLA. Network and environment affect duration. A single request cannot establish throughput or load behavior.

expected status = 200
Content-Type contains application/json
response time <= 1000 ms

Check browser-specific behavior

Desktop success does not prove that a browser will allow the same call under CORS. Inspect browser console errors, cookies and the environment separately. This helps distinguish API behavior from frontend restrictions.

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.

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

No account required. We will reply by email. This is a support request, not a newsletter subscription.