Run one folder or one request in CI, not the whole collection
A collection grows. After a year it has 200 requests: smoke checks, slow reports, admin endpoints, a few experiments. Running all of it on every push makes the pipeline slow and noisy. Run the part that matters for that pipeline instead.
One folder
requestarium run-collection "Users API" --folder "Smoke" --env Staging
requestarium run-collection "Users API" --folder "Orders/Refunds" --env StagingNested folders are named by path. Folder scripts and folder auth still apply, and so do the collection's scripts, so the folder runs exactly as it would inside the full run.
One request
requestarium run "Users API/Auth/Login" --env Staging
requestarium run "Get user" --env Staging --var userId=42A bare name works when it's unique in your workspace. When two collections have a "Get user", use the full path, or the id from requestarium collections.
One request is handy as a health check before a deploy step, or to debug a failing request from the CI machine itself.
A suite across collections
When the checks you want live in several collections, make a test suite in Tests: pick requests or folders from any collection, in the order you need. Then:
requestarium run --suite "Release checks" --env StagingThe suite keeps the list in Requestarium, so adding a request to the release gate doesn't need a change to the pipeline file.
Lay out folders for CI
The --folder option works best when folders mean something to a pipeline:
| Folder | Runs | Time |
|---|---|---|
Smoke | every push | seconds |
Regression | merge to the main branch | a few minutes |
Slow | nightly | as long as it takes |
Manual | never in CI |
Put a request in one folder only. If a request is in both Smoke and Regression in spirit, keep it in Smoke and run Smoke in the regression job too:
requestarium run-collection "Users API" --folder Smoke --env Staging
requestarium run-collection "Users API" --folder Regression --env StagingLogin requests
If the folder relies on a token that the full run gets from a Login request elsewhere in the collection, running the folder alone fails with a 401. Two fixes:
- Move the login into the folder's (or the collection's) pre-request script, so every run gets its own token. See pre-request script examples.
- Or set the token from CI with
--env-var API_TOKENwhen your pipeline already has one.
With the GitHub Action
- uses: ./.github/actions/requestarium-run
with:
token: ${{ secrets.REQUESTARIUM_TOKEN }}
collection: Users API
folder: Smoke
environment: Staging