Skip to main content

Parallel Execution

Parallel execution mode runs independent request nodes concurrently using the workflow's dependency graph to determine which nodes can safely execute at the same time. Dependent nodes (e.g., a GET that needs an ID extracted by a prior POST) are still scheduled in the correct order.

Enabling Parallel Execution

CLI Flag

rumour run ./requests/ -p
# or
rumour run ./requests/ --parallel

Collection Config File

# api.config.toml
[config]
parallel = true

Concurrency Limit

Default: 20 concurrent requests. Override with -c:

# Limit to 5 concurrent requests
rumour run ./requests/ -p -c 5

# Raise to 50 concurrent requests
rumour run ./requests/ -p -c 50

Setting -c above 20 also automatically scales the HTTP connection pool size.

How Dependency Scheduling Works

Rumour builds a directed acyclic graph (DAG) before execution:

  1. Independent nodes — no declared dependencies — are dispatched immediately in parallel.
  2. Dependent nodes — those that use variables extracted by other nodes — wait for their producers to complete.
  3. Level-based scheduling: all nodes at the same dependency depth run concurrently; the next depth level starts only when the previous level finishes.
Level 0 (concurrent): get_post1.toml get_post2.toml get_user1.toml
Level 1 (sequential): create_order.toml (depends on user_id from Level 0)
Level 2 (sequential): get_order.toml (depends on order_id from Level 1)

Interactions

ModeEffect on Parallel
-i (interactive)Forces sequential — prompts require deterministic order
--stepForces sequential — step mode requires one node at a time
-c (concurrency)Controls max simultaneous requests

Example

Three fully independent GET requests — no dependencies — run concurrently.

File Layout

config_examples/05_parallel_execution/
├── workspace.env.toml
├── get_post1.toml
├── get_post2.toml
└── get_user1.toml

workspace.env.toml

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

get_post1.toml

name = "parallel_user_2"

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

[assert]
status = 200

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

get_post2.toml

name = "parallel_user_3"

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

[assert]
status = 200

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

get_user1.toml

name = "parallel_user_1"

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

[assert]
status = 200

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

Run

rumour run ./config_examples/05_parallel_execution/ -p -v

Output

~/workspace/testing main ❯ rumour run ./config_examples/05_parallel_execution/ -p -v
GET http://localhost:4000/api/v2/users/1
GET http://localhost:4000/api/v2/users/2
GET http://localhost:4000/api/v2/users/3
URL: http://localhost:4000/api/v2/users/3
URL: http://localhost:4000/api/v2/users/2
URL: http://localhost:4000/api/v2/users/1
✓ SUCCESS: /home/bugsfounder/workspace/testing/config_examples/05_parallel_execution/get_post2.toml (2ms)
✓ SUCCESS: /home/bugsfounder/workspace/testing/config_examples/05_parallel_execution/get_post1.toml (3ms)
✓ SUCCESS: /home/bugsfounder/workspace/testing/config_examples/05_parallel_execution/get_user1.toml (4ms)
✓ ./config_examples/05_parallel_execution/ → PASS (3 Pass, 0 Fail, 0 Skip)
╭──────────────────────────────────────────────────────────────────────────╮
│ RUMOUR EXECUTION REPORT │
├──────────────────────────────────────────────────────────────────────────┤
│ Total Requests: 3
│ Successful: 3
│ Failed: 0
│ Skipped: 0
│ Success Rate: 100.0% │
│ Total Time: 8ms │
╰──────────────────────────────────────────────────────────────────────────╯

✓ Successful Requests:
- /home/bugsfounder/workspace/testing/config_examples/05_parallel_execution/get_post2.toml [200] [6ms]
- /home/bugsfounder/workspace/testing/config_examples/05_parallel_execution/get_post1.toml [200] [7ms]
- /home/bugsfounder/workspace/testing/config_examples/05_parallel_execution/get_user1.toml [200] [8ms]

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

Explanation

When running with parallel execution enabled (-p / --parallel):

  • All three independent requests (get_post1.toml, get_post2.toml, and get_user1.toml) are dispatched concurrently.
  • The verbose log output shows that the GET calls are initiated simultaneously before their URLs are individually printed.
  • The finish order is non-deterministic, and the entire suite completes within milliseconds of each other.
caution

In parallel mode, variables extracted by one node are stored in thread-safe concurrent storage and are immediately visible to other nodes. However, if two nodes extract the same variable key concurrently, the last writer wins. Design collections so that variable extraction paths do not conflict.

Combining with Other Flags

# Parallel + healing + concurrency limit
rumour run ./tests/ -p -H -c 10

# Parallel + auto-cleanup
rumour run ./tests/ -p -C

# Parallel + verbose + JUnit output (CI/CD)
rumour run ./tests/ -p -v --junit results.xml