@qualflare/cucumberjs 0.1.0 → 0.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
@@ -4,10 +4,14 @@
4
4
  [![CI](https://github.com/Qualflare/qualflare-cucumberjs/actions/workflows/ci.yml/badge.svg)](https://github.com/Qualflare/qualflare-cucumberjs/actions/workflows/ci.yml)
5
5
  [![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)
6
6
 
7
- A native CucumberJS reporter for [Qualflare](https://qualflare.com) — uploads test results directly
8
- from your `cucumber-js` run: Feature/Scenario status, real retry counts, screenshots, Given/When/Then
9
- step traces, Scenario Outline rows, and author-facing metadata (labels, links, tags, custom
10
- attachments). No post-hoc file parsing, no intermediate report format.
7
+ A native CucumberJS reporter for [Qualflare](https://qualflare.com) — captures test results directly
8
+ from your `cucumber-js` run: Feature/Scenario status, real retry counts, screenshots, videos,
9
+ Given/When/Then step traces, Scenario Outline rows, and author-facing metadata (labels, links, tags,
10
+ custom attachments).
11
+
12
+ The formatter itself makes **no network calls**. It writes a report directory, and
13
+ [`qualflare-cli`](https://github.com/Qualflare/qualflare-cli) uploads it — which is what lets any
14
+ number of sharded CI jobs merge into a single Launch.
11
15
 
12
16
  ## Install
13
17
 
@@ -15,8 +19,15 @@ attachments). No post-hoc file parsing, no intermediate report format.
15
19
  npm install --save-dev @qualflare/cucumberjs
16
20
  ```
17
21
 
18
- Requires `@cucumber/cucumber` `>=10.8.0 <14` (installed separately as a peer dependency) and Node
19
- `>=18`.
22
+ Requires `@cucumber/cucumber` `>=10.8.0` (installed separately as a peer dependency) and Node
23
+ `>=18`. You also need [`qualflare-cli`](https://github.com/Qualflare/qualflare-cli) **v0.1.16 or
24
+ newer** to upload what this formatter writes.
25
+
26
+ The peer range is deliberately open-ended rather than capped at a known-good major, so a new
27
+ cucumber-js release never hard-blocks `npm install` for you. Every major from 10.8 through 13 is
28
+ exercised in CI against a real `cucumber-js` run; newer majors are untested but not refused —
29
+ please [open an issue](https://github.com/Qualflare/qualflare-cucumberjs/issues) if one
30
+ misbehaves.
20
31
 
21
32
  ## Quickstart
22
33
 
@@ -32,15 +43,35 @@ Requires `@cucumber/cucumber` `>=10.8.0 <14` (installed separately as a peer dep
32
43
  }
33
44
  ```
34
45
 
35
- Set your token via the `QUALFLARE_TOKEN` environment variable (or the `token` format option):
46
+ Then run your tests and upload the results two steps, no token needed for the first:
47
+
48
+ ```sh
49
+ # 1. Run. Writes ./qualflare-results (JSON + any videos). Zero network calls.
50
+ npx cucumber-js
51
+
52
+ # 2. Upload. `qf login <identifier> <token>` stores the credential once.
53
+ qf <your-project-identifier> collect ./qualflare-results
54
+ ```
55
+
56
+ That's it — Feature/Scenario results, retries, and any screenshots you already attach arrive as one
57
+ Launch. See [`examples/basic/`](./examples/basic) for a complete runnable project.
58
+
59
+ ### Sharded CI
60
+
61
+ Point every shard at the **same** `outputDir` and collect once at the end. Each process writes its
62
+ own uniquely-named file, so shards never overwrite each other, and `qf collect` merges every file
63
+ in the directory into a single Launch:
36
64
 
37
65
  ```sh
38
- QUALFLARE_TOKEN=<your-token> npx cucumber-js
66
+ # in each parallel job — note they all write to the same directory
67
+ npx cucumber-js --shard "$SHARD_INDEX/$SHARD_TOTAL"
68
+
69
+ # once, after all shards finish (e.g. with the directory restored from CI artifacts)
70
+ qf <your-project-identifier> collect ./qualflare-results
39
71
  ```
40
72
 
41
- That's it Feature/Scenario results, retries, and any screenshots you already attach upload as one
42
- Launch at the end of the run. See [`examples/basic/`](./examples/basic) for a complete runnable
43
- project.
73
+ No `--shard` flag is needed on the CLI side: merging is driven purely by which files are in the
74
+ directory.
44
75
 
45
76
  ## Enriching your tests
46
77
 
@@ -77,9 +108,13 @@ provider/build/PR) in [`docs/CONFIGURATION.md`](./docs/CONFIGURATION.md).
77
108
 
78
109
  ## Known limitations
79
110
 
80
- - **No video upload** — Qualflare has no blob/video-attachment storage yet.
81
- - **One `cucumber-js` process uploads as one Launch** sharded (`--shard`) CI setups get multiple
82
- Launches; `--parallel` does not, since it runs in-process worker threads.
111
+ - **`outputDir` is merged blindly** — `qf collect` uploads every report file it finds, with no
112
+ run-identity check, so a directory left over from a previous run is silently merged into the
113
+ current one. Clear or freshly create `outputDir` at the start of each run.
114
+ - **`shardIndex` is best-effort** — cucumber-js routes its own `--shard` flag somewhere a formatter
115
+ cannot read, so it is recovered from `QUALFLARE_SHARD_INDEX` or by scanning `process.argv`. It is
116
+ only an attribution label; merging never depends on it. See
117
+ [`docs/LIMITATIONS.md`](./docs/LIMITATIONS.md).
83
118
  - **Doc Strings and Data Tables** have no dedicated wire field — encoded as a step `Parameter`
84
119
  (workaround, not a first-class rendering).
85
120
  - **`BeforeStep`/`AfterStep` hooks are off by default** (`includeStepHooks`) — noisy for suites with