← All features

Data-driven runs

One request, every input

Put the inputs in a CSV or JSON file and name it at the top of the .http file. Run all then goes through the file once per row, with each row's columns as {{variables}}.

Four rows of new-users.csv, two requests each: every pass labelled with its row.

How it works

Users, products, edge cases

Each pass shows up as its own group, such as "row 2 of 4 (Grace Hopper, grace)", in the Run tab, on the terminal and in JUnit reports, so a failure points straight at the input that caused it.

  • CSV with a header row (quoted values can hold commas and new lines), or JSON, an array of objects.
  • A row's values win over the file's @variables and the environment; --var still overrides the row.
  • Sending one request on its own uses the first row, so its variables always have values.
  • In CI, reqjet run api/ --data cases.csv uses a data file for every file it runs.
api/signup.http
# @reqjet.data ./new-users.csv

### Sign up a user
# @reqjet.assert status == 201
POST {{baseUrl}}/users
Content-Type: application/json

{ "name": "{{name}}", "username": "{{username}}" }

── new-users.csv ──────────────────
name,username,email
Ada Lovelace,ada,ada@example.com
Grace Hopper,grace,grace@example.com
Reqjet logo

Try it on your own requests

Free for Windows, macOS and Linux, and it opens the .http files you already have.