Skip to content

Commit 33b6884

Browse files
committed
docs: add stepOptions to project configuration
The stepOptions feature was implemented in probitas.json but was missing from the Configuration.md documentation. This caused confusion about how to set default timeout and retry behavior at the project level. Added three documentation updates: - Configuration example showing stepOptions structure - Table entry for stepOptions in configuration options - Detailed section explaining stepOptions behavior and override precedence The documentation now aligns with the implementation in probitas/src/cli/types.ts and the example in probitas/assets/probitas.jsonc.
1 parent 2f153fd commit 33b6884

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

docs/configuration.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ The first file found is used. JSONC files support `//` and `/* */` comments.
3434
"maxFailures": 0,
3535
// Default timeout for scenarios
3636
"timeout": "30s",
37+
// Default step options for all scenarios
38+
"stepOptions": {
39+
"timeout": 30000,
40+
"retry": {
41+
"maxAttempts": 1,
42+
"backoff": "linear"
43+
}
44+
},
3745
// Default selectors for filtering scenarios
3846
"selectors": ["!tag:wip"]
3947
}
@@ -47,6 +55,7 @@ The first file found is used. JSONC files support `//` and `/* */` comments.
4755
| `maxConcurrency` | Maximum parallel scenario execution | unlimited (`0`) |
4856
| `maxFailures` | Maximum failures before stopping | unlimited (`0`) |
4957
| `timeout` | Default timeout for scenarios | `"30s"` |
58+
| `stepOptions` | Default step options (timeout, retry) | See [stepOptions](#stepOptions) |
5059
| `selectors` | Default selectors for filtering scenarios | `[]` |
5160

5261
\*Default exclude patterns:
@@ -70,6 +79,44 @@ Controls when the test runner stops execution:
7079
}
7180
```
7281

82+
### stepOptions
83+
84+
Set default timeout and retry behavior for all steps across all scenarios. These
85+
defaults can be overridden at the scenario level or individual step level.
86+
87+
```jsonc
88+
{
89+
"stepOptions": {
90+
// Default timeout for each step in milliseconds
91+
"timeout": 30000,
92+
// Default retry configuration for transient failures
93+
"retry": {
94+
// Maximum retry attempts (1 = no retry)
95+
"maxAttempts": 3,
96+
// Backoff strategy: "linear" or "exponential"
97+
"backoff": "exponential"
98+
}
99+
}
100+
}
101+
```
102+
103+
| Option | Description | Default |
104+
| ------------------- | ----------------------------------------------- | ---------- |
105+
| `timeout` | Step timeout in milliseconds | `30000` |
106+
| `retry.maxAttempts` | Maximum retry attempts (1 = no retry) | `1` |
107+
| `retry.backoff` | Backoff strategy: `"linear"` or `"exponential"` | `"linear"` |
108+
109+
These project-level defaults apply to all scenarios unless overridden. Override
110+
precedence (highest to lowest):
111+
112+
1. Individual step options (highest priority)
113+
2. Scenario-level `stepOptions`
114+
3. Project-level `stepOptions` (this setting)
115+
4. Framework defaults (lowest priority)
116+
117+
See [Scenario Options](#scenario-options) and [Step Options](#step-options) for
118+
how to override these defaults.
119+
73120
### Selectors
74121

75122
Selectors filter which scenarios to run. The format is `[!][type:]value`:

0 commit comments

Comments
 (0)