Skip to main content

Resume Execution

The resume flag allows Rumour to pick up where it left off after a partial failure. On every run, Rumour saves execution state (passed nodes and extracted runtime variables) to a .rumour/state.json file. On the next run with -r, it restores that state and skips already-passed nodes.

Enabling Resume

CLI Flag

rumour run ./requests/ -r
# or
rumour run ./requests/ --resume

Collection Config File

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

How It Works

First run — Rumour executes all nodes and writes state on completion or failure:

<target-dir>/.rumour/state.json

The state file captures:

  • All passed node IDs
  • All runtime variables extracted during the session (e.g., user_id, access_token)
  • Identity/persona contexts

Resume run — With -r, Rumour:

  1. Loads state.json
  2. Restores all previously extracted runtime variables
  3. Skips all nodes in the passed_nodes set
  4. Executes only the remaining (failed or not-yet-run) nodes

Fresh start — Delete .rumour/state.json to reset and re-run everything from scratch.

State File Location

<path-argument>/.rumour/state.json

For example, rumour run ./api/ writes state to ./api/.rumour/state.json.

For .suite.toml files, state is written next to the suite file:

<suite-file-parent>/.rumour/state.json
tip

Add .rumour/ to .gitignore to avoid committing execution state:

.rumour/

Example

Two-step workflow: a POST that creates a resource (extracts created_post_id), followed by a GET.

File Layout

config_examples/06_resume_execution/
├── workspace.env.toml
├── step1_create.toml
└── step2_get.toml

workspace.env.toml

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

step1_create.toml

name = "step1_create_post"

[request]
method = "POST"
url = "{{base_url}}/posts"

[headers]
Content-Type = "application/json"

[body]
type = "json"
raw = '{"title":"My Post","body":"Testing resume","userId":1}'

[assert]
status = 201

[extract]
created_post_id = "id"

step2_get.toml

name = "step2_get_posts"

[request]
method = "GET"
url = "{{base_url}}/posts/{{created_post_id}}"

[assert]
status = 200

First Run

rumour run ./config_examples/06_resume_execution/ -v
~/workspace/testing main ❯ rumour run ./config_examples/06_resume_execution/ -v
POST http://localhost:4000/api/v2/posts
Header: Content-Type: application/json
URL: http://localhost:4000/api/v2/posts
Body (json): {"title":"My Post","body":"Testing resume","userId":1}
✓ SUCCESS: /home/bugsfounder/workspace/testing/config_examples/06_resume_execution/step1_create.toml (2ms)
GET http://localhost:4000/api/v2/posts/1
URL: http://localhost:4000/api/v2/posts/1
✓ SUCCESS: /home/bugsfounder/workspace/testing/config_examples/06_resume_execution/step2_get.toml (0ms)
✓ /home/bugsfounder/workspace/testing/config_examples/06_resume_execution/ → PASS (2 Pass, 0 Fail, 0 Skip)
╭──────────────────────────────────────────────────────────────────────────╮
│ RUMOUR EXECUTION REPORT │
├──────────────────────────────────────────────────────────────────────────┤
│ Total Requests: 2
│ Successful: 2
│ Failed: 0
│ Skipped: 0
│ Success Rate: 100.0% │
│ Total Time: 4ms │
╰──────────────────────────────────────────────────────────────────────────╯

✓ Successful Requests:
- /home/bugsfounder/workspace/testing/config_examples/06_resume_execution/step1_create.toml [201] [3ms]
- /home/bugsfounder/workspace/testing/config_examples/06_resume_execution/step2_get.toml [200] [1ms]

State is now saved to ./config_examples/06_resume_execution/.rumour/state.json.

Resume Run

rumour run ./config_examples/06_resume_execution/ -r -v
~/workspace/testing main ❯ rumour run ./config_examples/06_resume_execution/ -r -v
✓ /home/bugsfounder/workspace/testing/config_examples/06_resume_execution/ → PASS (2 Pass, 0 Fail, 0 Skip)
╭──────────────────────────────────────────────────────────────────────────╮
│ RUMOUR EXECUTION REPORT │
├──────────────────────────────────────────────────────────────────────────┤
│ Total Requests: 2
│ Successful: 2
│ Failed: 0
│ Skipped: 0
│ Success Rate: 100.0% │
│ Total Time: 0ms │
╰──────────────────────────────────────────────────────────────────────────╯

✓ Successful Requests:
- /home/bugsfounder/workspace/testing/config_examples/06_resume_execution/step1_create.toml [0ms]
- /home/bugsfounder/workspace/testing/config_examples/06_resume_execution/step2_get.toml [0ms]
note

Since both nodes had already passed and their state is loaded from state.json, Rumour skipped both requests entirely, completing the execution in 0ms while retaining successful execution marks for the report.

Explanation

  • First Run: Both request files are executed sequentially. The POST request succeeds, extracting the created_post_id variable from the JSON response (id). Next, step2_get.toml runs, dynamically resolving its URL to http://localhost:4000/api/v2/posts/1 by consuming the extracted variable. At the end of the run, the successful execution states and extracted variables are written to .rumour/state.json.
  • Resume Run (-r): Rumour loads the state file, detects that both step1_create.toml and step2_get.toml are in the set of passed nodes, and restores the session context. Since all nodes in the workflow are already marked as passed, both requests are skipped, and the entire run completes in 0ms with the successful states preserved.

Limitations

  • Resume is effective for directory and suite runs. Single-file runs (rumour run request.toml) do not produce state files.
  • If a .toml file changes between runs, its old state.json entry still marks it as passed. Delete state.json to force a full re-run after modifying a request.