Skip to main content

Collection Config Files

Rumour uses collection config files to apply shared settings — headers, query parameters, variables, and execution flags — to all requests in a directory and its subdirectories. This eliminates repetition across individual request files.

File Names​

Rumour recognizes the following collection config filenames:

FilenameNotes
*.config.tomlPreferred format. Any name ending in .config.toml (e.g., auth.config.toml).
collection.tomlLegacy standard name.
_collection.tomlLegacy underscore-prefixed name.
collection.env.tomlLegacy env-style name.

Multiple .config.toml files in the same directory are loaded in alphabetical order and merged cumulatively.

Supported Sections​

A config file is a TOML file with four optional top-level sections:

# auth/auth.config.toml

[headers]
Authorization = "Bearer {{access_token}}"
X-API-Version = "2"

[params]
debug = "true"
format = "json"

[variables]
base_url = "http://localhost:4000/api/v2"
timeout = "30"

[config]
parallel = true
heal = false
hard_heal = false
auto_cleanup = false
resume = false

# Requests that should NOT receive the headers/params/variables above:
exclude_files = ["health.toml", "*_public.toml"]

[headers]​

Inherited by every request in the directory. Request-level headers override collection-level headers with the same name.

[params]​

Query parameters injected into every request URL.

[variables]​

Variables injected into the variable scope. These provide baseline values and have lower priority than directory .env.toml files, request [variables], and CLI -V overrides. See Variable Precedence for the full priority stack.

[config]​

Execution behaviour flags for the whole collection:

KeyCLI EquivalentDefaultDescription
parallel-pfalseRun non-dependent nodes concurrently
heal-HfalseEnable soft self-healing
hard_heal-XfalseEnable 404 resource reconstruction
auto_cleanup-CfalseDelete created resources after run
resume-rfalseResume from previous execution state
note

CLI flags always take precedence over [config] values in collection files when both are provided.

exclude_files​

A top-level array of file name patterns. Any request whose filename matches a pattern will not inherit the headers, params, or variables from this config file. See Config Exclusions for full details and pattern syntax.

Directory Scoping & Cascading​

Config files cascade from the workspace root down to the target directory. A config in a parent directory applies to all child directories unless overridden by a closer config.

project/
├── workspace.env.toml # base_url = "http://localhost:4000/api/v2"
├── project.config.toml # Applied to all requests in project/
└── auth/
├── auth.config.toml # Applied to auth/ only — merged with parent
└── requests/
└── get_post.toml # Inherits from both project.config.toml + auth.config.toml

Example​

Let's set up a test workspace to see collection configs in action against our mock server.

First, initialize a workspace and scaffold a new auth collection using the CLI:

rumour init config_examples
cd config_examples
rumour new auth -y

This will automatically generate the directory structure and the configuration files. Update the generated files to match the layout below:

File Layout​

config_examples/
├── workspace.env.toml
├── config_examples.config.toml
└── auth/
├── auth.config.toml
└── requests/
└── get_post.toml

workspace.env.toml​

base_url = "http://localhost:4000/api/v2"

config_examples.config.toml​

[headers]
X-App-Version = "{{app_version}}"
Accept = "application/json"

[variables]
api_env = "production"
app_version = "3.0"

auth/auth.config.toml​

[headers]
X-Auth-Service = "true"

[variables]
service = "auth"

auth/requests/get_post.toml​

name = "verify_config_inheritance"

[request]
method = "GET"
url = "{{base_url}}/users/1"

[assert]
status = 200

[assert.json."id"]
equal = 1

[assert.json."username"]
contains = "dev_lead"

Run​

$ rumour run ./auth/requests/ -v

Output​

$ rumour run ./auth/requests/ -v

GET http://localhost:4000/api/v2/users/1
Header: Accept: application/json
Header: X-Auth-Service: true
Header: X-App-Version: 3.0
URL: http://localhost:4000/api/v2/users/1
✓ SUCCESS: ./auth/requests/get_post.toml (10ms)

╭──────────────────────────────────────────────────────────────────────────╮
│ RUMOUR EXECUTION REPORT │
├──────────────────────────────────────────────────────────────────────────┤
│ Total Requests: 1 │
│ Successful: 1 │
│ Failed: 0 │
│ Skipped: 0 │
│ Success Rate: 100.0% │
│ Total Time: 33ms │
╰──────────────────────────────────────────────────────────────────────────╯

✓ Successful Requests:
- ./auth/requests/get_post.toml [200] [10ms]

Actionable Recommendations:
→ Run with --json to export this report for your CI/CD pipeline.

get_post.toml inherits X-App-Version and Accept from config_examples.config.toml, as well as X-Auth-Service and service from auth/auth.config.toml — avoiding any duplication across individual requests.