Add an API test status badge to your README
The README of a service is the first place people look when something seems off. A small "API tests: passing" badge there answers the first question before anyone opens CI: did the last run of the contract tests pass?
Create the badge
Open the collection's Runs tab, or a saved suite in Tests, and choose Status badge ▸ Create badge. Then Copy Markdown:
Paste it at the top of the README, in a Confluence page, or anywhere that renders an image from a URL.
Make sure runs are saved
The badge reads the run history, so only saved runs move it. In CI, add --save-run:
- name: Contract tests
env:
REQUESTARIUM_TOKEN: ${{ secrets.REQUESTARIUM_TOKEN }}
run: requestarium run --suite "Orders/Contract" --env Staging --save-run --junit results.xmlRuns from the app's collection runner, from a trigger URL and from the Run API are saved anyway.
What the badge counts
- A collection badge follows runs of the whole collection, not of a single folder.
- A suite badge follows the last suite run. A suite that ran over several collections passes only when each of them passed.
Who can see what
The badge URL is secret but not private: anyone who has it sees the name and whether the last run passed, and nothing else. No request names, no URLs, no response data. The image itself carries no scripts or external resources.
If the README is public and the collection name is not something you want public, the image's label can be changed with a ?label= parameter on the URL:
Managing the badge:
- New link replaces the URL; the old one stops working at once.
- Turn off removes it. Old images in READMEs then show a grey "not found" badge.
- Creating and turning off a badge needs permission to edit collections. Anyone who can see the runs can copy it.
A small dashboard
A wiki page with one badge per service makes a cheap status board: each line is a service, each badge its smoke suite. When something turns red, the run history in Requestarium shows which requests failed, on which branch and commit.