CLI: Run
The nouto run command executes all requests in a collection sequentially and reports the results.
nouto run <collection-file> [options]Options
Section titled “Options”| Option | Description | Default |
|---|---|---|
-e, --env <file> |
Environment file (Nouto JSON) | None |
-n, --env-name <name> |
Environment to activate by name | First in file |
--env-var <KEY=VALUE> |
Override a variable (repeatable) | None |
--env-file <file> |
Load variables from .env file |
None |
--folder <name-or-id> |
Run only a specific folder | Entire collection |
-d, --data <file> |
CSV or JSON data file for iterations | None |
-i, --iterations <n> |
Number of iterations | 1 |
--delay <ms> |
Delay between requests | 0 |
--timeout <ms> |
Per-request timeout | 30000 |
--stop-on-failure |
Stop on first failure | Off |
--parallel |
Run requests concurrently | Off |
-r, --reporter <type> |
Output format: cli, json, junit, html |
cli |
-o, --output <file> |
Write report to file (stdout if omitted) | stdout |
--reporter-json <file> |
Generate JSON report at path | None |
--reporter-junit <file> |
Generate JUnit XML report at path | None |
--reporter-html <file> |
Generate HTML report at path | None |
--reporter-skip-headers |
Omit headers from reports | Off |
--reporter-skip-request-body |
Omit request bodies from reports | Off |
--reporter-skip-response-body |
Omit response bodies from reports | Off |
--reporter-skip-body |
Omit both request and response bodies | Off |
--silent |
Suppress progress output | Off |
--verbose |
Show detailed request/response information | Off |
--insecure |
Disable SSL certificate verification | Off |
--cacert <file> |
Custom CA certificate file path | None |
--client-cert-config <file> |
Client certificate config JSON for mTLS | None |
--proxy <url> |
HTTP/HTTPS/SOCKS5 proxy URL | None |
--noproxy |
Disable all proxy settings | Off |
--disable-cookies |
Do not automatically handle cookies | Off |
--tags <tags> |
Only run requests with ALL specified tags (comma-separated) | None |
--exclude-tags <tags> |
Skip requests with ANY specified tags (comma-separated) | None |
Examples
Section titled “Examples”Basic run
Section titled “Basic run”nouto run api-tests.nouto.jsonWith environment
Section titled “With environment”nouto run api-tests.nouto.json \ --env environments.json \ --env-name StagingData-driven testing with CSV
Section titled “Data-driven testing with CSV”nouto run api-tests.nouto.json \ --data users.csv \ --iterations 3JUnit XML for CI/CD
Section titled “JUnit XML for CI/CD”nouto run api-tests.nouto.json \ --reporter junit \ --output test-results.xml \ --stop-on-failureHTML report
Section titled “HTML report”nouto run api-tests.nouto.json \ --reporter html \ --output report.htmlRun a specific folder
Section titled “Run a specific folder”nouto run api-tests.nouto.json --folder "Auth Tests"Variable override
Section titled “Variable override”nouto run api-tests.nouto.json \ --env-var baseUrl=https://staging.api.com \ --env-var token=$API_TOKENSSL and proxy
Section titled “SSL and proxy”nouto run api-tests.nouto.json \ --insecure \ --proxy http://proxy.corp:8080Client certificate (mTLS)
Section titled “Client certificate (mTLS)”nouto run api-tests.nouto.json \ --client-cert-config certs.jsonWhere certs.json contains:
{ "cert": "./client.pem", "key": "./client-key.pem", "passphrase": "optional"}Parallel execution
Section titled “Parallel execution”nouto run api-tests.nouto.json --parallelMultiple reporters
Section titled “Multiple reporters”nouto run api-tests.nouto.json \ --reporter-json results.json \ --reporter-junit results.xml \ --reporter-html report.htmlTag filtering
Section titled “Tag filtering”nouto run api-tests.nouto.json --tags smokenouto run api-tests.nouto.json --exclude-tags slow,experimentalGitHub Actions CI
Section titled “GitHub Actions CI”- name: Run API tests run: | pnpm install --frozen-lockfile pnpm run build:cli node packages/cli/dist/bin/cli.js run tests/api-tests.nouto.json \ --env tests/environments.json \ --env-name CI \ --env-var token=${{ secrets.API_TOKEN }} \ --reporter-junit results.xml \ --stop-on-failure
- name: Upload test results if: always() uses: actions/upload-artifact@v4 with: name: api-test-results path: results.xmlReporter Formats
Section titled “Reporter Formats”| Format | Description |
|---|---|
cli |
Color-coded terminal output with progress and summary |
json |
Full structured JSON with per-request details and assertions |
junit |
JUnit XML compatible with Jenkins, GitHub Actions, GitLab CI, Azure DevOps |
html |
Self-contained HTML report with summary and expandable request details |
Variable Resolution
Section titled “Variable Resolution”The CLI resolves variables with the following priority (highest to lowest):
--env-varoverrides- Data file row
- Active environment variables
- Collection/folder variables
- Global variables
.envfile variables (--env-file)- Dynamic variables (
{{$uuid.v4}},{{$timestamp.iso}}, etc.)
Scripts (nt.setVar()) update the environment between requests, enabling response chaining.
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 |
All requests passed |
1 |
One or more requests failed assertions or scripts |
2 |
Collection or data file not found |
3 |
Environment file not found or invalid |
4 |
Invalid collection format |
7 |
Other error |
