← Back to Blog
Tutorial·6 min read·May 18, 2026

Run your API tests in CI with rosty-cli

R

Rostyman Team

May 18, 2026

Rostyman ships with a command-line runner called rosty-cli. It bundles with the desktop app — no separate install needed. Point it at a collection file and it runs every request, executes your test scripts, and outputs results as JUnit XML, JSON, or plain text. No GUI, no cloud account, no special CI plugin required.

Getting started in 60 seconds

Export your collection from Rostyman as a .rostyman file, then run:

rosty-cli run my-collection.rostyman --env staging

That's the whole command. The runner loads the collection, resolves environment variables, executes every request in order, runs the post-response scripts, and prints a pass/fail summary. Exit code is non-zero on any test failure — CI-friendly by default.

Output formats

The --reporter flag selects the output format. junit emits a standard JUnit XML file that GitHub Actions, GitLab CI, CircleCI, and Jenkins all know how to parse and display as test results. json gives you structured output for custom dashboards. The default pretty-prints a human-readable summary to stdout.

rosty-cli run collection.rostyman --reporter junit --output results.xml

Environments and variables

The --env flag selects a named environment from the collection. You can also override individual variables inline:

rosty-cli run collection.rostyman --env staging --var baseUrl=https://api-staging.example.com

Variable resolution follows the same priority order as the desktop app: vault > environment > globals > collection variables. Scripts that call rm.environment.set() during a run are respected — a token fetched in request 1 is available in request 2.

Data-driven runs

Pass a CSV or JSON file with the --data flag and the runner iterates the collection once per row, substituting column values as variables. Useful for testing the same endpoint with a set of known inputs:

rosty-cli run collection.rostyman --data test-cases.csv

In GitHub Actions

A minimal workflow step looks like this:

- run: rosty-cli run tests/api-collection.rostyman --env ci --reporter junit --output test-results/api.xml

Pair it with the standard JUnit report upload action and your test results show up directly in the Actions UI — pass/fail per request, with assertion details on failure. No third-party service, no API key for a CI integration, no cloud execution. The runner is just a binary running on your CI machine.

What the test scripts can do

The scripting API in rosty-cli is identical to the desktop app — the same rm.test(), rm.expect(), and Chai BDD assertions that work in the GUI work in CI. If a test passes locally, it passes in CI. The runner also supports the full Chai BDD assertion library: expect(data).to.have.property('id').that.is.a('number') and the rest of the chain work exactly as you'd expect.

Try Rostyman free

No account required. Works on Windows, macOS, and Linux.

Download Free