@@ -5,15 +5,36 @@ all available options and common configuration patterns.
55
66## Project Configuration
77
8- Configure Probitas CLI defaults in a ` probitas.json ` file in your project root:
8+ Configure Probitas CLI defaults in a configuration file in your project root.
99
10- ``` json
10+ ### Configuration File Names
11+
12+ Probitas looks for configuration files in this priority order:
13+
14+ 1 . ` probitas.json ` - Standard JSON format
15+ 2 . ` probitas.jsonc ` - JSON with comments (recommended)
16+ 3 . ` .probitas.json ` - Hidden JSON format
17+ 4 . ` .probitas.jsonc ` - Hidden JSON with comments
18+
19+ The first file found is used. JSONC files support ` // ` and ` /* */ ` comments.
20+
21+ ### Configuration Options
22+
23+ ``` jsonc
1124{
25+ // Glob patterns for scenario file discovery
1226 " includes" : [" probitas/**/*.probitas.ts" ],
27+ // Glob patterns to exclude from discovery
1328 " excludes" : [" **/*.skip.probitas.ts" ],
29+ // Output reporter (list, json)
1430 " reporter" : " list" ,
31+ // Maximum parallel scenario execution (0 = unlimited)
1532 " maxConcurrency" : 4 ,
33+ // Maximum failures before stopping (0 = unlimited)
34+ " maxFailures" : 0 ,
35+ // Default timeout for scenarios
1636 " timeout" : " 30s" ,
37+ // Default selectors for filtering scenarios
1738 " selectors" : [" !tag:wip" ]
1839}
1940```
@@ -23,10 +44,26 @@ Configure Probitas CLI defaults in a `probitas.json` file in your project root:
2344| ` includes ` | Glob patterns for scenario file discovery | ` ["probitas/**/*.probitas.ts"] ` |
2445| ` excludes ` | Glob patterns to exclude from discovery | ` [] ` |
2546| ` reporter ` | Output reporter: ` list ` , ` json ` | ` "list" ` |
26- | ` maxConcurrency ` | Maximum parallel scenario execution | unlimited |
47+ | ` maxConcurrency ` | Maximum parallel scenario execution | unlimited (` 0 ` ) |
48+ | ` maxFailures ` | Maximum failures before stopping | unlimited (` 0 ` ) |
2749| ` timeout ` | Default timeout for scenarios | ` "30s" ` |
2850| ` selectors ` | Default selectors for filtering scenarios | ` [] ` |
2951
52+ ### maxFailures
53+
54+ Controls when the test runner stops execution:
55+
56+ - ` 0 ` (default): Run all scenarios regardless of failures
57+ - ` 1 ` : Fail-fast mode - stop immediately on first failure
58+ - ` n ` : Stop after n failures
59+
60+ ``` jsonc
61+ {
62+ // Fail-fast: stop on first failure
63+ " maxFailures" : 1
64+ }
65+ ```
66+
3067### Selectors
3168
3269Selectors filter which scenarios to run. The format is ` [!][type:]value ` :
@@ -50,7 +87,7 @@ This runs scenarios with `api` tag AND without `slow` tag.
5087
5188### CLI Override
5289
53- Command-line options override ` probitas.json ` settings:
90+ Command-line options override configuration file settings:
5491
5592``` bash
5693# Override reporter
@@ -59,6 +96,9 @@ probitas run --reporter json
5996# Override concurrency
6097probitas run --max-concurrency 1
6198
99+ # Fail-fast mode
100+ probitas run --max-failures 1
101+
62102# Add selectors (combined with config selectors)
63103probitas run -s tag:smoke
64104```
0 commit comments