@vijaypjavvadi/bdd2pw 4.0.1 → 4.0.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +11 -6
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -9,6 +9,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  _Nothing yet._
11
11
 
12
+ ## [4.0.2] — 2026-07-24
13
+
14
+ ### Documentation-only patch — README refresh to match the actual v4.0.x feature set
15
+
16
+ The npm storefront (`https://www.npmjs.com/package/@vijaypjavvadi/bdd2pw`)
17
+ was still describing bdd2pw "as of v3.8.1" three major/minor versions
18
+ later. Anyone landing on the page was reading a description that omitted
19
+ data-driven scaffolds, the three v4.0.1 hallucination-rejection gates,
20
+ the OpenAI + Gemini providers, and the 8-app reproducible benchmark
21
+ harness. That's a versioning-hygiene issue — the code shipped, the
22
+ storefront didn't catch up.
23
+
24
+ ### Changed
25
+
26
+ - **README** — "What `bdd2pw` is and isn't (as of v3.8.1)" → "(as of v4.0.2)".
27
+ - **README** — LLM fallback bullet rewritten to name all three providers
28
+ by name (Anthropic Claude Sonnet 4.6, OpenAI gpt-4o-mini, Google
29
+ Gemini 2.5 Flash) and describe the fail-closed governance semantics
30
+ explicitly.
31
+ - **README** — New bullet documenting the three v4.0.1 hallucination
32
+ rejection gates (invented-helper, structured pomCall, bare field call)
33
+ and the 19 unit tests locking behaviour.
34
+ - **README** — New bullet documenting v4.0.0 data-driven scaffolds
35
+ (`--data`, `--gen-data`, `--schema`, `--seed`).
36
+ - **README** — New bullet documenting the 8-app reproducible benchmark
37
+ harness (`bench/runner.ts`) that accompanies the SoftwareX manuscript.
38
+ - **README** — "Validated end-to-end against real public sites" list
39
+ expanded from 2 apps to the full 8-app benchmark set.
40
+
41
+ ### No code changes
42
+
43
+ Patch release. No changes under `src/`, `dist/`, `templates/`, `bin`, or
44
+ public API. `npm i @vijaypjavvadi/bdd2pw@4.0.2` is byte-identical to
45
+ `@4.0.1` at runtime — only `README.md`, `CHANGELOG.md`, and `package.json`
46
+ version differ.
47
+
48
+ ### Why patch and not minor
49
+
50
+ SemVer patch is correct here: no new user-facing capability, no bug fix
51
+ in shipped code, only documentation. Bumping to 4.1 would falsely signal
52
+ new features to CI systems that pin ranges like `^4.0.0`.
53
+
12
54
  ## [4.0.1] — 2026-06-29
13
55
 
14
56
  ### Fixed — LLM hallucinated POM methods land as TODO instead of broken code
package/README.md CHANGED
@@ -25,20 +25,23 @@ Most teams writing BDD test cases (via Cucumber `.feature` files, possibly autho
25
25
 
26
26
  Point it at a `.feature` file and a URL. It parses the Gherkin, scans the live page with Chromium, picks the most stable locator for every interactive element, matches each step to a POM method call, and emits a runnable Playwright TypeScript repo — including `playwright.config.ts`, `pages/login.page.ts`, `tests/login.spec.ts`, and a `BDD_REVIEW.md` listing anything a human still needs to look at.
27
27
 
28
- ## What `bdd2pw` is and isn't (as of v3.8.1)
28
+ ## What `bdd2pw` is and isn't (as of v4.0.2)
29
29
 
30
- `bdd2pw` is a **deterministic scaffolder with an optional governed LLM fallback**. The output is honest about its limits:
30
+ `bdd2pw` is a **deterministic scaffolder with an optional governed LLM fallback across three providers**. The output is honest about its limits:
31
31
 
32
- - **Specific `.feature` files** — quoted credentials, concrete assertion targets, standard verb forms — convert to **runnable specs with zero hand-edits**. Validated end-to-end against real public sites (`practicetestautomation.com`, `owasp-juice-shop`): every scenario green.
33
- - **Vague `.feature` files** — "Enter valid username and password and click login button" with no quoted values — get partial coverage. Unmatched steps either route to the LLM fallback (when an Anthropic / OpenAI key is configured) or land as `// TODO` comments + warnings in `BDD_REVIEW.md`.
32
+ - **Specific `.feature` files** — quoted credentials, concrete assertion targets, standard verb forms — convert to **runnable specs with zero hand-edits**. Validated end-to-end against 8 public benchmark applications (`practicetestautomation.com`, `owasp-juice-shop`, SauceDemo, the-internet, OpenCart, Magento, Conduit, Reqres): 8/8 compilation across deterministic and LLM-governed modes.
33
+ - **Vague `.feature` files** — "Enter valid username and password and click login button" with no quoted values — get partial coverage. Unmatched steps either route to the LLM fallback (when an Anthropic / OpenAI / Gemini key is configured) or land as `// TODO` comments + warnings in `BDD_REVIEW.md`.
34
34
  - **200+ deterministic rules**, organised across three layers:
35
35
  - **API rules** (v3.0+) — `page.request.*` patterns for GET / POST / PUT / DELETE / PATCH, body / header / status assertions.
36
36
  - **Visibility rules** (v3.1+) — `<noun> is visible / displayed / shown / appears` intercepts before URL-slug heuristics, so prose like "the user's name or profile indicator is visible in the UI" never gets slugified into a URL regex.
37
37
  - **UI + URL rules** (v1.x lineage, refined through v3.7.1) — 30+ rules covering first-person, third-person, no-subject Cucumber dialects + compound input steps.
38
38
  - **7 opt-in domain rule packs** (v3.4 + v3.8) — banking, healthcare, insurance, retail, gov, education, telecom. Each adds ~20 industry-specific patterns. Activated via `domains: ["banking"]`; empty by default for byte-stable existing behaviour.
39
- - **LLM fallback is batched per scenario** (v3.5) — one Anthropic / OpenAI / Gemini call per scenario instead of one per unmatched step. ~75% cost reduction on unmatched-heavy scaffolds. Every prompt goes through the `ai-governance` sidecar's `/sanitize` endpoint (fail-closed).
39
+ - **Three-provider LLM fallback, batched per scenario** (v3.5 + v3.11 + v3.12) — one Anthropic Claude Sonnet 4.6, OpenAI gpt-4o-mini, or Google Gemini 2.5 Flash call per scenario instead of one per unmatched step. ~75% cost reduction on unmatched-heavy scaffolds. Every prompt goes through the `ai-governance` sidecar's `/sanitize` endpoint (fail-closed on 4xx/5xx/timeout — the run terminates rather than emit ungoverned code).
40
+ - **Three hallucination-rejection gates on LLM output** (v4.0.1) — invented-helper detection, structured-pomCall guard, and bare-field-call trap. Bindings the LLM emits that would compile-fail land as `// TODO` comments with `BDD_REVIEW.md` entries instead of broken code. Locked by 19 dedicated unit tests.
41
+ - **Data-driven scaffolds** (v4.0.0) — `--data <path>` injects CSV / JSON / XLSX rows into every Scenario Outline's `Examples:` table; `--gen-data --schema <path> --rows N` generates synthetic rows via Faker + optional per-column LLM calls (`llm:auto insurance claim description`); seeded (`--seed 42`) for reproducibility.
40
42
  - **`updatePom` is append-only by construction.** Re-scanning a page that already has a Page Object adds new locators only. Hand-edited method bodies, custom helper methods, custom imports are all preserved byte-identical.
41
43
  - **`--merge` mode** (v3.2) preserves `// bdd2pw:user-block id="..."` sections across regenerations so iterative locator tuning doesn't lose work.
44
+ - **Reproducible benchmark harness** (v4.0.0) — `bench/runner.ts` scaffolds all 8 benchmark apps in three modes (deterministic-only, LLM-blocked, LLM-governed) with per-app sha256 verification. Public artifact accompanying the SoftwareX manuscript.
42
45
 
43
46
  > **The pitch.** Run `bdd2pw scaffold` and you get a Playwright TS repo where `npx playwright test` runs against the real site. For specific fixtures, all green. For vague ones, the 60-90% you'd otherwise hand-write is done; you finish the rest — or you let the governed LLM finish them.
44
47
 
@@ -394,7 +397,9 @@ Each release is shaped to be self-contained, ship in ~2 weeks, and keep `domains
394
397
 
395
398
  If you use `@vijaypjavvadi/bdd2pw` in academic work, please cite:
396
399
 
397
- > Javvadi, V. P. (2026). *@vijaypjavvadi/bdd2pw: Live-DOM Page Object Scaffolding from Gherkin Specifications via the Microsoft Playwright MCP* (Version 3.8.1) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.20450278
400
+ > Javvadi, V. P. (2026). *@vijaypjavvadi/bdd2pw: Live-DOM Page Object Scaffolding from Gherkin Specifications via the Microsoft Playwright MCP* (Version 4.0.1) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.21050268
401
+
402
+ (v4.0.2 is a documentation-only patch on top of the v4.0.1 artifact; cite v4.0.1 for reproducibility.)
398
403
 
399
404
  A machine-readable [`CITATION.cff`](CITATION.cff) file is included in the repository root.
400
405
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vijaypjavvadi/bdd2pw",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Scaffold runnable Playwright TypeScript tests from Gherkin .feature files. Detects existing Page Objects, scans live pages via Microsoft Playwright MCP, emits POMs + specs, ready for execution. CLI + HTTP service. Optional governed LLM fallback (Anthropic / OpenAI / Gemini).",
5
5
  "bin": {
6
6
  "bdd2pw": "dist/cli.js"