Skip to content

Test a REST API in 5 minutes

The goal: start from an OpenAPI specification and end up with an automated test that checks a complete journey.

File ▸ Import (Ctrl+I), then the URL of your openapi.json.

Restorm builds the whole tree: one folder per tag, one request per operation, the typed parameters, the documentation, and the authentication headers pre-wired with their variables.

The tree produced by the OpenAPI import, ready to use: one folder per tag (pet, store, user) and one pre-filled request per operation, next to the environment folder's home sub-tab

If your API has no specification, paste a curl command — see Importing cURL commands.

Open the environment folder the import created. The base URL is already there; fill in the authentication variable the import prepared for you.

Create a second environment if you are testing several targets — the smartbar’s picker switches the whole folder in one go.

Open a request, click Send. The response appears: status, time, headers, body in a collapsible viewer.

If you have forgotten something, the resolved value shown under the URL field tells you so.

Right-click ▸ Add ▸ Scenario. The “create, read back, delete” journey:

Requête HTTP « POST /clients »
└─response──► Assert (eq, 201)
└─► Définir variable « clientId » ◄── sélecteur body.id
Requête HTTP « GET /clients/{id} »
└─response──► Assert (eq, 200)
└─► Validation schéma (le JSON Schema du client)
Requête HTTP « DELETE /clients/{id} »
└─response──► Assert (eq, 204)

All three requests use {{clientId}} in their URL: the run variable set at the first step is read by the following ones.

Chain them by wiring each assertion’s done port onto the next request’s in port — that is what guarantees the order.

Click Play. The log fills up; add a Log action after each step to trace what matters.

Wire a Throw action onto the else output of your critical assertions: that is what will fail the CI job.

Terminal window
RESTORM_TOKEN=rstk_… restorm \
--open ./api.restorm \
--run "Parcours client" \
--headless \
--out run.log

Exit code 0 if everything passes, 1 otherwise. See Headless execution and CI for the GitHub Actions and GitLab CI examples.