@qa-gentic/stlc-agents 1.0.27 → 1.0.29
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/ARCHITECTURE-ADO.md +350 -0
- package/ARCHITECTURE-JIRA.md +203 -0
- package/QUICKSTART-ADO.md +400 -0
- package/QUICKSTART-JIRA.md +334 -0
- package/README.md +49 -0
- package/bin/postinstall.js +14 -4
- package/package.json +19 -7
- package/skills/migrate-framework/SKILL.md +207 -0
- package/src/stlc_agents/agent_migration/__init__.py +0 -0
- package/src/stlc_agents/agent_migration/_migrate.py +1398 -0
- package/src/stlc_agents/agent_migration/cli.py +217 -0
- package/src/stlc_agents/agent_migration/detector.py +81 -0
- package/src/stlc_agents/agent_migration/mapper.py +439 -0
- package/src/stlc_agents/agent_migration/reporter.py +86 -0
- package/src/stlc_agents/agent_migration/server.py +267 -0
- package/src/stlc_agents/agent_migration/transformer/__init__.py +0 -0
- package/src/stlc_agents/agent_migration/transformer/config_merger.py +513 -0
- package/src/stlc_agents/agent_migration/transformer/healer_injector.py +1143 -0
- package/src/stlc_agents/agent_migration/transformer/import_fixer.py +419 -0
- package/src/stlc_agents/agent_migration/transformer/js_to_ts.py +413 -0
- package/src/stlc_agents/agent_migration/transformer/local_var_hoister.py +378 -0
- package/src/stlc_agents/agent_migration/transformer/locator_moderniser.py +132 -0
- package/src/stlc_agents/agent_migration/transformer/locator_registrar.py +328 -0
- package/src/stlc_agents/agent_migration/transformer/spec_to_bdd.py +820 -0
- package/src/stlc_agents/agent_playwright_generator/server.py +926 -91
- package/src/stlc_agents/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_gherkin_generator/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_gherkin_generator/__pycache__/server.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_gherkin_generator/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_gherkin_generator/tools/__pycache__/ado_gherkin.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/__pycache__/server.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/tools/__pycache__/boilerplate.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/tools/__pycache__/helix_write.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_playwright_generator/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_playwright_generator/__pycache__/server.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_playwright_generator/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_playwright_generator/tools/__pycache__/ado_attach.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_test_case_manager/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_test_case_manager/__pycache__/server.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_test_case_manager/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_test_case_manager/tools/__pycache__/ado_workitem.cpython-314.pyc +0 -0
- package/src/stlc_agents/shared/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/shared/__pycache__/auth.cpython-314.pyc +0 -0
- package/src/stlc_agents/shared/__pycache__/cost_tracker.cpython-314.pyc +0 -0
- package/src/stlc_agents/shared/__pycache__/pricing.cpython-314.pyc +0 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
# @qa-gentic/stlc-agents — Azure DevOps Quick Start
|
|
2
|
+
|
|
3
|
+
> Azure DevOps pipeline: work item → test cases → Gherkin → Playwright TypeScript → Helix-QA.
|
|
4
|
+
> For Jira Cloud see [QUICKSTART-JIRA.md](QUICKSTART-JIRA.md).
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Works with **GitHub Copilot** (VS Code Agent mode), **Claude Code**, **Cursor**, and **Windsurf**.
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@qa-gentic/stlc-agents)
|
|
10
|
+
[](https://pypi.org/project/qa-gentic-stlc-agents/)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
[](https://nodejs.org)
|
|
13
|
+
[](https://python.org)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## What It Does
|
|
19
|
+
|
|
20
|
+
Six Python MCP servers cover the full QA Software Test Life Cycle. The ADO pipeline uses Agents 1–4 + the migration tool:
|
|
21
|
+
|
|
22
|
+
| Agent | Input | Output |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| `qa-test-case-manager` | ADO PBI / Bug / Feature ID | Manual test cases created & linked via TestedBy-Forward |
|
|
25
|
+
| `qa-gherkin-generator` | ADO Feature / PBI / Bug ID | `.feature` file attached to the ADO work item |
|
|
26
|
+
| `qa-playwright-generator` | Gherkin + live browser | `locators.ts` + page objects + step defs attached to ADO |
|
|
27
|
+
| `qa-helix-writer` | Generated `.ts` files + `helix_root` | Files written to Helix-QA directory layout on disk |
|
|
28
|
+
| `qa-migration` / `stlc-migrate` | Existing Playwright project | Fully agent-ready Helix-QA tree — healer scaffold + skills + `.mcp.json` + BOILERPLATE infra |
|
|
29
|
+
|
|
30
|
+
The Playwright MCP server (`http://localhost:8931/mcp`) is required for browser-driven code generation. It is not part of this package and must be started separately.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
### Greenfield (new Playwright + Cucumber + TypeScript project)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install -g @qa-gentic/stlc-agents
|
|
40
|
+
qa-stlc init --vscode --integration ado
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`qa-stlc init` performs:
|
|
44
|
+
1. `pip install qa-gentic-stlc-agents` — installs all six Python MCP servers + `stlc-migrate` CLI
|
|
45
|
+
2. Copies skill files to `.github/copilot-instructions/` (and `.claude/` if not `--vscode`)
|
|
46
|
+
3. Writes `.vscode/mcp.json` with all six servers configured (Agents 1–4 + `qa-migration` + `playwright`)
|
|
47
|
+
|
|
48
|
+
Start the Playwright MCP server before your first session:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx @playwright/mcp@latest --port 8931
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Migrating an existing Playwright project
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Preview what would land in the target tree (writes nothing)
|
|
58
|
+
stlc-migrate --source ./my-old-tests --helix ./helix-qa --dry-run
|
|
59
|
+
|
|
60
|
+
# Full migration — installs every ADO agent skill + .mcp.json + healer scaffold
|
|
61
|
+
stlc-migrate --source ./my-old-tests --helix ./helix-qa --integration ado
|
|
62
|
+
|
|
63
|
+
# Refresh an already-migrated tree (picks up tool-side scaffold improvements)
|
|
64
|
+
stlc-migrate --source ./my-old-tests --helix ./helix-qa --integration ado --conflict overwrite
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
After migration:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
cd ./helix-qa
|
|
71
|
+
npm install # picks up dotenv, @types/fs-extra, etc.
|
|
72
|
+
npx tsc --noEmit # should be clean (any errors are source bugs preserved verbatim)
|
|
73
|
+
npm test # healing fires on broken primary selectors and writes self-heals/healed-locators[.<env>].json
|
|
74
|
+
npm run healix:dashboard # http://localhost:7890 — Confirm / Revert healed locators
|
|
75
|
+
npm run healix:review # http://localhost:7891 — read-only mirror (set HEALIX_REVIEW_PORT to enable)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
See `skills/migrate-framework/SKILL.md` for the full migration pipeline + every healing env var.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## Requirements
|
|
84
|
+
|
|
85
|
+
- Node.js ≥ 18
|
|
86
|
+
- Python ≥ 3.10, < 3.14
|
|
87
|
+
- Azure DevOps organisation with a `.env` containing:
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
```env
|
|
91
|
+
ADO_ORGANIZATION_URL=https://dev.azure.com/your-org
|
|
92
|
+
ADO_PROJECT_NAME=YourProject
|
|
93
|
+
ADO_PAT=your-personal-access-token
|
|
94
|
+
APP_BASE_URL=your-app-base-url
|
|
95
|
+
APP_EMAIL=your-test-email@example.com
|
|
96
|
+
APP_PASSWORD=your-test-password
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Commands
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
qa-stlc init [--vscode] [--python <path>] [--integration ado|jira|both]
|
|
106
|
+
# Full bootstrap: pip install + skills + MCP config
|
|
107
|
+
|
|
108
|
+
qa-stlc scaffold [--name <name>] [--dir <path>] [--no-install]
|
|
109
|
+
# Copy full Playwright + Cucumber + TypeScript boilerplate to a new project directory
|
|
110
|
+
|
|
111
|
+
qa-stlc skills [--target claude|vscode|cursor|windsurf|both|print]
|
|
112
|
+
# Copy skill files to the correct AI coding agent directory
|
|
113
|
+
|
|
114
|
+
qa-stlc mcp-config [--vscode] [--print] [--python <path>] [--playwright-port <n>]
|
|
115
|
+
# Write .vscode/mcp.json (--vscode) or .mcp.json (Claude Code)
|
|
116
|
+
|
|
117
|
+
qa-stlc verify
|
|
118
|
+
# Check that all six MCP servers are reachable
|
|
119
|
+
|
|
120
|
+
stlc-migrate --source <existing> --helix <target> [--integration ado|jira|both] [--conflict overwrite|skip|interactive] [--dry-run] [--json]
|
|
121
|
+
# Migrate an existing Playwright (with or without Cucumber) project into the
|
|
122
|
+
# Helix-QA layout. Installs every agent skill, .mcp.json, healer scaffold,
|
|
123
|
+
# AGENT-BEHAVIOR.md, ORCHESTRATION_RULES.md, and the 11-file BOILERPLATE
|
|
124
|
+
# allowlist (strategy / rules / apply / helpers / config). The enhanced
|
|
125
|
+
# `LocatorHealer` / `LocatorRepository` / `TimingHealer` / `VisualIntentChecker`
|
|
126
|
+
# / `HealingDashboard` / `dashboard-server` scaffolds always win over BOILERPLATE
|
|
127
|
+
# on overlapping files (schema v1, debounced persist, dashboard write-back).
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Makefile shortcuts
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
make bootstrap-ado # one-shot: skills + .mcp.json for the ADO pipeline
|
|
134
|
+
make migrate-ado SOURCE=<old> HELIX=<new> # ADO migration with sensible defaults
|
|
135
|
+
make migrate-ado SOURCE=<old> HELIX=<new> CONFLICT=overwrite # re-migrate in place
|
|
136
|
+
make audit-migration HELIX=<new> # framework_state + skills + healer scaffold + heal-store report
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Usage
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
Open your AI coding agent and use natural language:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
# Generate test cases
|
|
148
|
+
Generate test cases for work item #12345 in MyProject at https://dev.azure.com/myorg
|
|
149
|
+
|
|
150
|
+
# Generate Gherkin BDD
|
|
151
|
+
Generate a Gherkin regression suite for Feature #11000 in MyProject at https://dev.azure.com/myorg
|
|
152
|
+
|
|
153
|
+
# Generate Playwright code (requires Playwright MCP running)
|
|
154
|
+
Generate Playwright TypeScript for the Gherkin I just created. The login page is at /auth/login
|
|
155
|
+
|
|
156
|
+
# Write to Helix-QA project
|
|
157
|
+
Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Tool Reference
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### qa-test-case-manager
|
|
166
|
+
|
|
167
|
+
| Tool | Description |
|
|
168
|
+
|---|---|
|
|
169
|
+
| `fetch_work_item` | Fetch a PBI, Bug, or Feature with acceptance criteria, linked test cases, and coverage hints. Returns `epic_not_supported` for Epics. Returns `confirmation_required: true` for Features. |
|
|
170
|
+
| `get_linked_test_cases` | List all test cases already linked to a work item. Call before generating to power the deduplication diff. |
|
|
171
|
+
| `create_and_link_test_cases` | Create structured manual test cases in ADO and link them via TestedBy-Forward. |
|
|
172
|
+
|
|
173
|
+
### qa-gherkin-generator
|
|
174
|
+
|
|
175
|
+
| Tool | Description |
|
|
176
|
+
|---|---|
|
|
177
|
+
| `fetch_feature_hierarchy` | Fetch a Feature and all child PBIs/Bugs with acceptance criteria and existing attachments. |
|
|
178
|
+
| `fetch_work_item_for_gherkin` | Fetch a PBI or Bug with parent Feature context, suggested file name, and linked test case steps. |
|
|
179
|
+
| `attach_gherkin_to_feature` | Validate and attach a `.feature` file to a Feature work item. |
|
|
180
|
+
| `attach_gherkin_to_work_item` | Validate and attach a `.feature` file to a PBI or Bug work item. |
|
|
181
|
+
| `validate_gherkin_content` | Structural validation — tags, scenario count, navigation steps. Returns `valid: bool` + `errors` + `warnings`. |
|
|
182
|
+
|
|
183
|
+
### qa-playwright-generator
|
|
184
|
+
|
|
185
|
+
| Tool | Description |
|
|
186
|
+
|---|---|
|
|
187
|
+
| `generate_playwright_code` | Generate `locators.ts`, `*Page.ts`, `*.steps.ts`, and `cucumber-profile.js` from validated Gherkin + live AX-tree `context_map`. Hard-blocks if `context_map` is absent to prevent hallucinated locators. |
|
|
188
|
+
| `scaffold_locator_repository` | Generate the six Helix-QA healing infrastructure files. |
|
|
189
|
+
| `validate_gherkin_steps` | Check for duplicate step strings and missing `When` steps. |
|
|
190
|
+
| `attach_code_to_work_item` | Attach delta Playwright TypeScript files to an ADO work item. Pass only net-new delta files. |
|
|
191
|
+
|
|
192
|
+
### qa-helix-writer
|
|
193
|
+
|
|
194
|
+
| Tool | Description |
|
|
195
|
+
|---|---|
|
|
196
|
+
| `inspect_helix_project` | Returns `framework_state` (`present` / `partial` / `absent`) and `recommendation`. |
|
|
197
|
+
| `list_helix_tree` | List the full directory tree of a Helix-QA project. |
|
|
198
|
+
| `read_helix_file` | Read an existing file from the Helix-QA project for overlap detection. |
|
|
199
|
+
| `write_helix_files` | Write generated files to the correct Helix-QA paths. |
|
|
200
|
+
|
|
201
|
+
### playwright (external)
|
|
202
|
+
|
|
203
|
+
| Tool | Description |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `browser_navigate` | Navigate to a URL in the live browser. |
|
|
206
|
+
| `browser_snapshot` | Capture the full AX tree — source for zero-hallucination locators. |
|
|
207
|
+
| `browser_fill_form` | Fill multiple form fields by ref. |
|
|
208
|
+
| `browser_click` | Click an element by ref. |
|
|
209
|
+
| `browser_file_upload` | Upload a file to a file input by ref. |
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
## MCP Config
|
|
215
|
+
|
|
216
|
+
> For ADO-only installs `qa-jira-manager` is omitted. Run `qa-stlc mcp-config --integration ado` to generate manually, or run `stlc-migrate --integration ado` and the migration will emit `.mcp.json` automatically with absolute binary paths.
|
|
217
|
+
|
|
218
|
+
### VS Code / GitHub Copilot (`.vscode/mcp.json`)
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"servers": {
|
|
223
|
+
"qa-test-case-manager": { "command": "/path/to/.venv/bin/qa-test-case-manager" },
|
|
224
|
+
"qa-gherkin-generator": { "command": "/path/to/.venv/bin/qa-gherkin-generator" },
|
|
225
|
+
"qa-playwright-generator": { "command": "/path/to/.venv/bin/qa-playwright-generator" },
|
|
226
|
+
"qa-helix-writer": { "command": "/path/to/.venv/bin/qa-helix-writer" },
|
|
227
|
+
"qa-migration": { "command": "/path/to/.venv/bin/stlc-migrate" },
|
|
228
|
+
"playwright": { "type": "http", "url": "http://localhost:8931/mcp" }
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Claude Code (`.mcp.json`)
|
|
234
|
+
|
|
235
|
+
```json
|
|
236
|
+
{
|
|
237
|
+
"mcpServers": {
|
|
238
|
+
"qa-test-case-manager": { "command": "/path/to/.venv/bin/qa-test-case-manager" },
|
|
239
|
+
"qa-gherkin-generator": { "command": "/path/to/.venv/bin/qa-gherkin-generator" },
|
|
240
|
+
"qa-playwright-generator": { "command": "/path/to/.venv/bin/qa-playwright-generator" },
|
|
241
|
+
"qa-helix-writer": { "command": "/path/to/.venv/bin/qa-helix-writer" },
|
|
242
|
+
"qa-migration": { "command": "/path/to/.venv/bin/stlc-migrate" },
|
|
243
|
+
"playwright": { "command": "npx", "args": ["@playwright/mcp@latest", "--isolated"] }
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
> VS Code requires `http://localhost:8931/mcp` (with `/mcp` suffix).
|
|
249
|
+
> Claude Code requires `ws://localhost:8931` (WebSocket, no `/mcp`).
|
|
250
|
+
> `qa-stlc mcp-config` writes the correct format automatically.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
## Skills Installed
|
|
256
|
+
|
|
257
|
+
| Skill | Purpose |
|
|
258
|
+
|---|---|
|
|
259
|
+
| `AGENT-BEHAVIOR.md` | Zero-inference contract. Read first. Always. |
|
|
260
|
+
| `generate-test-cases/` | PBI / Bug / Feature → ADO manual test cases (ADO only) |
|
|
261
|
+
| `generate-gherkin/` | Feature / PBI / Bug → validated `.feature` + ADO attach |
|
|
262
|
+
| `generate-playwright-code/` | Gherkin + live browser → three-layer self-healing Playwright TypeScript |
|
|
263
|
+
| `write-helix-files/` | Generated files → Helix-QA disk layout, scaffold or merge |
|
|
264
|
+
| `deduplication-protocol/` | READ → DIFF → CREATE mandatory pre-flight gate |
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
## Three-Layer Self-Healing Architecture
|
|
270
|
+
|
|
271
|
+
| Layer | Class | What it heals |
|
|
272
|
+
|---|---|---|
|
|
273
|
+
| 1 — Locator | `LocatorHealer` | 8-strategy chain: cached → primary → **attribute** → **type-hint** → role → label → text → AI Vision. After match, introspects the live element and persists a specific single-attribute selector (`#id`, `[data-testid=…]`, etc.) — never the search union. |
|
|
274
|
+
| 2 — Timing | `TimingHealer` | network-trace drift → auto-adjusted timeouts → HealingDashboard |
|
|
275
|
+
| 3 — Visual | `VisualIntentChecker` | element screenshot diff at assertions → HealingDashboard |
|
|
276
|
+
|
|
277
|
+
Healed selectors persist in `LocatorRepository` under a schema-v1 envelope at
|
|
278
|
+
`self-heals/healed-locators[.<ENV>].json` (heal-only filter, debounced writes,
|
|
279
|
+
read-modify-write merge, history cap). `HEAL_STRATEGY_ORDER` reorders the chain
|
|
280
|
+
at class-load time; `LOCATOR_HEAL_ATTEMPTS` caps strategy retries; `LOCATOR_TIMEOUT`
|
|
281
|
+
caps each `ATTACH_TO` probe.
|
|
282
|
+
|
|
283
|
+
**HealingDashboard** runs as two servers from the same process:
|
|
284
|
+
- `http://localhost:7890` — read/write: Confirm rewrites the source `*.locators.ts` `selector:` field; Revert restores the previous selector.
|
|
285
|
+
- `http://localhost:7891` — read-only mirror (set `HEALIX_REVIEW_PORT` to enable).
|
|
286
|
+
|
|
287
|
+
All Confirm actions persist to the source locator file in version control. Refer to
|
|
288
|
+
[ARCHITECTURE-ADO.md § Three-Layer Self-Healing Architecture](ARCHITECTURE-ADO.md#three-layer-self-healing-architecture)
|
|
289
|
+
for full env-var tuning and the write-back protocol.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Run Tests
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
ENABLE_SELF_HEALING=true \
|
|
298
|
+
HEALING_DASHBOARD_PORT=7890 \
|
|
299
|
+
APP_BASE_URL=<your-app-base-url> \
|
|
300
|
+
APP_EMAIL=<email> \
|
|
301
|
+
APP_PASSWORD=<password> \
|
|
302
|
+
cucumber-js --config=config/cucumber.js -p <feature_profile>
|
|
303
|
+
|
|
304
|
+
# Smoke only
|
|
305
|
+
cucumber-js --config=config/cucumber.js -p <feature_profile> --tags "@smoke"
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
## Scaffold a New QA Project
|
|
312
|
+
|
|
313
|
+
The `scaffold` command copies the full Playwright + Cucumber + TypeScript boilerplate framework — including three-layer AI self-healing, BDD templates, and CI/CD integration — into a new project directory.
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
# Scaffold into ./my-qa-project (default name)
|
|
317
|
+
qa-stlc scaffold
|
|
318
|
+
|
|
319
|
+
# Custom project name and location
|
|
320
|
+
qa-stlc scaffold --name acme-e2e --dir /path/to/workspace/acme-e2e
|
|
321
|
+
|
|
322
|
+
# Skip npm install (e.g. to inspect files first)
|
|
323
|
+
qa-stlc scaffold --name acme-e2e --no-install
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
After scaffolding:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
cd my-qa-project
|
|
330
|
+
npx playwright install chromium # install browser binaries
|
|
331
|
+
cp .env.example .env # already done by scaffold
|
|
332
|
+
# Edit .env — set BASE_URL and optionally AI_API_KEY
|
|
333
|
+
npm test # run the example scenario
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### What Gets Scaffolded
|
|
337
|
+
|
|
338
|
+
| Layer | Contents |
|
|
339
|
+
|---|---|
|
|
340
|
+
| **Config** | `package.json`, `tsconfig.json`, `cucumber.js`, `.env.example`, `.gitignore` |
|
|
341
|
+
| **CI/CD** | `Dockerfile`, `docker-compose.yml`, `azure-pipelines.yml` |
|
|
342
|
+
| **Framework** | `src/hooks/`, `src/pages/BasePage.ts`, `src/locators/`, `src/config/` |
|
|
343
|
+
| **Self-healing** | `LocatorHealer` (8-strategy chain), `LocatorRepository` (schema v1 envelope, heal-only filter), `TimingHealer`, `VisualIntentChecker`, `HealingDashboard` (write-back to source), `dashboard-server` (launcher for `npm run healix:dashboard` / `healix:review`). |
|
|
344
|
+
| **AI utilities** | `AILocatorGenerator`, `AISelfHealing`, `AITestGenerator` |
|
|
345
|
+
| **Auth** | `AuthManager`, `AuthSetup` |
|
|
346
|
+
| **Templates** | `_template.feature`, `_template.locators.ts`, `_template.steps.ts`, `_TemplatePage.ts` |
|
|
347
|
+
| **Example test** | `src/test/features/example.feature` + steps |
|
|
348
|
+
|
|
349
|
+
### Healing Dashboard
|
|
350
|
+
|
|
351
|
+
`npm run healix:dashboard` launches a single process that serves both:
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
npm run healix:dashboard # http://localhost:7890 — Confirm / Revert (rewrites source *.locators.ts)
|
|
355
|
+
HEALIX_REVIEW_PORT=7891 npm run healix:dashboard # also serves http://localhost:7891 read-only mirror
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Confirm on any healed entry writes the persisted single-attribute selector back to
|
|
359
|
+
the source `*.locators.ts` `selector:` field in version control — no separate
|
|
360
|
+
"promote to source" or CI step required.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
## Development
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
make install-ado # create .venv + pip install -e . (prints ADO next steps)
|
|
369
|
+
make install-jira # create .venv + pip install -e . (prints Jira next steps)
|
|
370
|
+
make install-both # create .venv + pip install -e . (prints Both next steps)
|
|
371
|
+
make test # run pytest tests/ -v
|
|
372
|
+
make skills-ado # install ADO skill files to .claude/skills/ + copilot-instructions/
|
|
373
|
+
make skills-jira # install Jira skill files
|
|
374
|
+
make skills-both # install all skill files
|
|
375
|
+
make verify-ado # check ADO agents + MSAL auth
|
|
376
|
+
make verify-jira # check Jira agents + OAuth token cache
|
|
377
|
+
make mcp-config-ado # write .vscode/mcp.json for ADO pipeline
|
|
378
|
+
make mcp-config-jira # write .vscode/mcp.json for Jira pipeline
|
|
379
|
+
make mcp-config-both # write .vscode/mcp.json for both pipelines
|
|
380
|
+
make clean # remove .venv, __pycache__, dist
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
## Documentation
|
|
387
|
+
|
|
388
|
+
- [Quick Start: Azure DevOps](QUICKSTART-ADO.md)
|
|
389
|
+
- [Quick Start: Jira Cloud](QUICKSTART-JIRA.md)
|
|
390
|
+
- [Architecture: ADO](ARCHITECTURE-ADO.md)
|
|
391
|
+
- [Architecture: Jira](ARCHITECTURE-JIRA.md)
|
|
392
|
+
- [Walkthrough: ADO](WALKTHROUGH-ADO.md)
|
|
393
|
+
- [Walkthrough: Jira](WALKTHROUGH-JIRA.md)
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
## License
|
|
399
|
+
|
|
400
|
+
MIT
|