@piyushdoorwar/yamlet 1.12.0 → 1.14.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 +12 -3
- package/dist/yamlet.js +32837 -1354
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# @piyushdoorwar/yamlet
|
|
2
2
|
|
|
3
3
|
Run [Yamlet](https://github.com/piyushdoorwar/yamlet) API collections from the command
|
|
4
|
-
line, for example in CI. It fails the build when a request errors,
|
|
5
|
-
|
|
4
|
+
line, for example in CI. It fails the build when a request errors, a `pm.test` assertion
|
|
5
|
+
fails, or a request without tests in its own scripts returns a status outside 2xx/3xx (a
|
|
6
|
+
request that tests itself is judged by its tests, so a test can expect a 404).
|
|
6
7
|
|
|
7
8
|
## Install
|
|
8
9
|
|
|
@@ -30,20 +31,28 @@ tree order, collection by collection. Pre-request and post-response scripts run,
|
|
|
30
31
|
| `-e, --env <name\|file>` | Environment to use: a name from the workspace (`dev`) or a path to an environment YAML file |
|
|
31
32
|
| `-g, --globals <file>` | Use these globals instead of the workspace's |
|
|
32
33
|
| `-c, --collection <name>` | Only run this collection (repeat for several) |
|
|
34
|
+
| `-f, --folder <name>` | Only run this folder (searched inside the chosen collections) |
|
|
33
35
|
| `-n, --iterations <n>` | Run everything `n` times |
|
|
34
36
|
| `-d, --data <file>` | CSV (with a header row) or JSON array of objects; one iteration per row. Values are available as `{{column}}` and `pm.iterationData.get("column")` |
|
|
35
37
|
| `--delay <ms>` | Wait between requests |
|
|
36
38
|
| `--bail` | Stop after the first failing request |
|
|
39
|
+
| `--env-var <key=value>` | Set or override an environment variable (repeatable), e.g. a token from a CI secret |
|
|
40
|
+
| `--global-var <key=value>` | Set or override a global variable (repeatable) |
|
|
41
|
+
| `--timeout <ms>` | Abandon a request after this long; by default there is no limit |
|
|
42
|
+
| `-k, --insecure` | Don't verify SSL certificates |
|
|
43
|
+
| `--ca <file>` | Also trust this CA certificate (PEM; repeatable) |
|
|
37
44
|
| `-r, --reporter <name>` | `table` (default), `json` or `junit` |
|
|
38
45
|
| `-o, --out <file>` | Write the `json` / `junit` report to a file |
|
|
39
46
|
| `--no-color` | Plain output (also honors `NO_COLOR`) |
|
|
40
47
|
|
|
41
|
-
The exit code is `0` when every
|
|
48
|
+
`HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` are honored. The exit code is `0` when every
|
|
49
|
+
request passed and `1` otherwise.
|
|
42
50
|
|
|
43
51
|
```bash
|
|
44
52
|
yamlet run ./api --env dev
|
|
45
53
|
yamlet run ./api --env environments/staging.yaml --collection Payments --bail
|
|
46
54
|
yamlet run ./api --env dev --data users.csv --reporter junit --out yamlet-results.xml
|
|
55
|
+
yamlet run ./api --env staging --folder Smoke --env-var token=$API_TOKEN --timeout 10000
|
|
47
56
|
```
|
|
48
57
|
|
|
49
58
|
## GitHub Actions
|