wayfarer-cli 2.0.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,7 +17,7 @@ npx wayfarer-cli run orders.postman_collection.json -e local.postman_environment
17
17
  ✓ Fetch order: 200 OK, 2 ms
18
18
  ✓ the SKU came back
19
19
 
20
- 2 results in 1 iteration; 0 failed; 3 of 3 tests passed.
20
+ The run is complete. 2 results in 1 iteration; 0 failed; 3 of 3 tests passed.
21
21
  ```
22
22
 
23
23
  When a test fails, the line says what was expected, and the exit code is `1`:
@@ -26,9 +26,13 @@ When a test fails, the line says what was expected, and the exit code is `1`:
26
26
  ✗ Fetch order: 200 OK, 3 ms
27
27
  ✗ the SKU came back: expected 'ABC-2' to deeply equal 'ABC-1'
28
28
 
29
- 2 results in 1 iteration; 1 failed; 2 of 3 tests passed.
29
+ The run is complete. 2 results in 1 iteration; 1 failed; 2 of 3 tests passed.
30
30
  ```
31
31
 
32
+ The words are the app's run view's. An error several requests share is said
33
+ in full the first time, as "Same error as before." after that, and once more
34
+ under the summary with how many requests it stopped.
35
+
32
36
  ## Install
33
37
 
34
38
  It needs Node.js 22.12 or later. Run it with `npx`, or install it:
@@ -62,13 +66,14 @@ wayfarer-cli run <file> [options]
62
66
  | Option | What it does |
63
67
  |---|---|
64
68
  | `-e`, `--environment <file>` | The variables: a Wayfarer environments file or a Postman environment. |
69
+ | `--environment-name <name>` | Which environment of a file that holds several, such as the app's **Export environments**. |
65
70
  | `-d`, `--data <file>` | A data file, CSV or JSON. Each row is one iteration. |
66
71
  | `-n`, `--iterations <n>` | How many iterations. Default: one per row of the data file, or 1. |
67
72
  | `--collection <name>` | Which collection to run, from a file that holds several. |
68
- | `--reporter <list>` | `cli`, `json`, `junit`, comma-separated. Default `cli`. |
69
- | `--out <dir>` | Where `json` and `junit` reports go. Default: the current folder. |
73
+ | `--reporter <list>` | `cli`, `json`, `junit`, `html`, comma-separated. Default `cli`. |
74
+ | `--out <dir>` | Where the `json`, `junit` and `html` reports go. Default: the current folder. |
70
75
  | `--bail` | Stop at the first failure. |
71
- | `--timeout <ms>` | Give up on a request after this long. Default: no limit. |
76
+ | `--timeout <ms>` | Give up on a request after this long, at most `300000`. Default `300000`: Node's fetch waits no longer for a response. |
72
77
  | `--insecure` | Don't verify TLS certificates, for every request of the run. |
73
78
  | `--allow-scripts` | Run the file's scripts (see below). |
74
79
  | `--vault-file <file>` | A vault exported from the app, for requests that use a vault secret. |
@@ -80,7 +85,7 @@ wayfarer-cli run <file> [options]
80
85
  | Code | Meaning |
81
86
  |---|---|
82
87
  | `0` | Every request got a response and every test passed. |
83
- | `1` | A test failed, a request got no response, or a script ended in an error. |
88
+ | `1` | A test failed, a request got no response, a script ended in an error, or a report could not be written. |
84
89
  | `2` | Nothing was run. The message on stderr says why. |
85
90
 
86
91
  ## Scripts run only when you allow them
@@ -132,6 +137,10 @@ golden files written by Newman.
132
137
 
133
138
  ## Reports
134
139
 
140
+ `--reporter html` writes `wayfarer-run.html`: one page that says what the
141
+ app's run view says, in the app's colours (light or dark, as the system
142
+ is), with the same table. It holds no script and loads nothing.
143
+
135
144
  `--reporter json` writes `wayfarer-run.json` and `--reporter junit` writes
136
145
  `wayfarer-run.junit.xml`, the same files the app's run view saves. Both go
137
146
  in `--out`, which is created if it doesn't exist (2.0.1 and later). The