API test runner

Input
Output

API Test Runner

Write your checks once, as plain lines like status 2xx, time < 800 or $.id exists, and run them against a list of requests or a Postman collection. The requests go out from your browser one after another, and the report shows which passed and why the others failed.

Example: three endpoints after a deploy

A plain list of three requests and the checks for them. With these responses from the server, the list and the order pass, and the health check fails because it took longer than allowed:

Requests

[
  {
    "name": "Health",
    "url": "https://api.example.com/health"
  },
  {
    "name": "List orders",
    "url": "https://api.example.com/v1/orders?page=1"
  },
  {
    "name": "Get order",
    "url": "https://api.example.com/v1/orders/ORD-20419"
  }
]

Checks

status 2xx
time < 1000
[List orders] $.orders.length >= 1
[Get order] $.status == "paid"
[Get order] $.total > 0

Output

Requests: 2 of 3 requests passed
✕ GET Health · 200 · 1840 ms
    ✕ time < 1000: time (ms) is 1840
✓ GET List orders · 200 · 120 ms
✓ GET Get order · 200 · 95 ms

How do I use the API test runner?

  1. Paste a list of requests, [{"method": "GET", "url": "https://…"}], or a Postman collection.
  2. Write the checks in the second box, one per line; [request name] limits a line to one request.
  3. Press Run and read the report, or show it as JUnit XML for your CI.

What does the API test runner do?

  • Status, time, headers, JSONPath values and JSON Schema checks
  • Requests sent one after another, only when you press Run
  • A report with the reason for every failure, as text or JUnit XML

When to use the API test runner

After a deploy, before a release, or when a partner says your API is broken, you want a quick answer to one question: does every endpoint still answer the way it should? Writing a test project for that takes an afternoon. Here you list the requests, write a few checks and press Run, from any browser, without installing anything.

Each line is one rule: status 2xx or status == 201, time < 800 for milliseconds, header content-type contains json, a JSONPath value such as $.id exists, $.total > 0, $.status == "paid" or $.items.length >= 1, a pattern with matches /…/, a type with is integer, or a whole JSON Schema with schema {…}. A rule applies to every request, or to one when it starts with [request name]. Every failure says what came back instead, and Show: JUnit XML gives a file that GitHub Actions, GitLab and Jenkins read as a test report.

Frequently asked questions

Which APIs can it test?
Any API that allows requests from other websites (CORS), as public and test APIs usually do. Requests go out from your browser, without cookies; an API that refuses them is reported as not reachable. For a private API, enable CORS for your own origin, or use it on localhost.
Can I test the same rules on one request?
Yes. API request has the same Checks box under its response, which runs the rules every time you press Send.
Is my data uploaded?
No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.

More JSON tools

Bracely has 104 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.1 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram