@keber/qa-framework 1.5.2 → 1.6.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.
- package/CHANGELOG.md +67 -8
- package/README.md +150 -76
- package/docs/architecture.md +49 -44
- package/docs/folder-structure-guide.md +80 -23
- package/docs/installation.md +53 -43
- package/docs/usage-with-agent.md +52 -64
- package/integrations/ado-powershell/pipelines/azure-pipeline-qa.yml +1 -1
- package/integrations/playwright/README.md +1 -1
- package/package.json +1 -1
- package/scripts/init.js +22 -12
- package/scripts/upgrade.js +139 -11
- package/skills/qa-ado-integration/SKILL.md +2 -2
- package/skills/qa-automation/SKILL.md +6 -6
- package/skills/qa-maintenance/SKILL.md +2 -2
- package/templates/automation-scaffold/playwright.config.ts +3 -1
- package/agent-instructions/00-module-analysis.md +0 -266
- package/agent-instructions/01-spec-generation.md +0 -281
- package/agent-instructions/02-test-plan-generation.md +0 -205
- package/agent-instructions/03-test-case-generation.md +0 -150
- package/agent-instructions/04-automation-generation.md +0 -343
- package/agent-instructions/04b-test-stabilization.md +0 -309
- package/agent-instructions/05-ado-integration.md +0 -247
- package/agent-instructions/06-maintenance.md +0 -135
- package/docs/comparison-matrix.md +0 -131
- package/docs/generalization-decisions.md +0 -203
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
# docs/generalization-decisions.md
|
|
2
|
-
|
|
3
|
-
**Phase 2 Artifact** — Classification and decision log for every element found during discovery.
|
|
4
|
-
|
|
5
|
-
Every decision in this document follows the format:
|
|
6
|
-
|
|
7
|
-
> **Decision ID** | **Item** | **Source** | **Decision** | **Rationale** | **What was discarded**
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## §1 — 8-Folder QA Directory Structure
|
|
12
|
-
|
|
13
|
-
- **Item**: Numbered folder hierarchy `00-guides/` through `08-azure-integration/`
|
|
14
|
-
- **Source**: Both repos (identical structure)
|
|
15
|
-
- **Decision**: ✅ **Framework core**
|
|
16
|
-
- **Rationale**: Both repos independently converged on this same structure. It provides a clear, numbered namespace that agents can navigate predictably. The numbers prevent alphabetical re-ordering from breaking conventions.
|
|
17
|
-
- **What was discarded**: Nothing. Structure adopted as-is.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## §2 — 6-File Submodule Template Set
|
|
22
|
-
|
|
23
|
-
- **Item**: `00-inventory.md` → `05-test-scenarios.md`
|
|
24
|
-
- **Source**: Both repos (Repo B more consistently follows the pattern)
|
|
25
|
-
- **Decision**: ✅ **Framework core** (reusable template)
|
|
26
|
-
- **Rationale**: This is the most consistently-replicated pattern across both repos and the most clearly generalizable unit of work. Every submodule follows this structure regardless of domain.
|
|
27
|
-
- **Naming difference**: Repo A names file 1 `01-business-rules.md`; Repo B sometimes uses `01-functional-analysis.md`. **Resolution**: Standardize as `01-business-rules.md`. Functional analysis is a technique to produce business rules, not the output itself.
|
|
28
|
-
- **What was discarded**: `01-functional-analysis.md` naming variant.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## §3 — Agent Instructions: Module Analysis
|
|
33
|
-
|
|
34
|
-
- **Item**: `AGENT-INSTRUCTIONS-MODULE-ANALYSIS.md` — 766 lines (A), 834 lines (B)
|
|
35
|
-
- **Source**: Both repos (conceptually identical, slightly different phrasings)
|
|
36
|
-
- **Decision**: ✅ **Agent instructions** (generalized, project-specific refs removed)
|
|
37
|
-
- **Rationale**: Both are 4-phase instructions (Prepare → Explore → Document → Review). The core process is identical. Project-specific items removed: hardcoded URLs, project names, session names.
|
|
38
|
-
- **What was discarded**:
|
|
39
|
-
- Repo A: `https://redactedURL.com`, `redacted@mail.com`, `playwright-cli MCP tool reference`
|
|
40
|
-
- Repo B: `https://redactedURL.com`, `redacted-project` session name
|
|
41
|
-
- Replaced with: `{{QA_BASE_URL}}`, `{{QA_USER_EMAIL}}` placeholders
|
|
42
|
-
- **Adopted from Repo B** (merged): TC origin classification (UI-OBSERVADO / PENDIENTE-CODE / BLOQUEADO-PERMISOS), 50–85 TC target per submodule, 3-condition TC validity rule (VISIBLE + ACCESIBLE + OBSERVABLE)
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## §4 — Agent Instructions: E2E Automation
|
|
47
|
-
|
|
48
|
-
- **Item**: `AGENT-INSTRUCTIONS-E2E-PLAYWRIGHT-SPRINT40.md` (Repo A only)
|
|
49
|
-
- **Source**: Repo A — sprint-specific, 961 lines
|
|
50
|
-
- **Decision**: ✅ **Agent instructions** + **Optional integration** (heavily refactored)
|
|
51
|
-
- **Rationale**: The document contains highly valuable generalizable patterns (multi-role auth, EXEC_IDX date strategy, 3-layer email validation, skip+DEF pattern, storageState) embedded within Sprint 40-specific content. The generalizable patterns were extracted; the sprint-specific content (task IDs, routes, form selectors) was discarded.
|
|
52
|
-
- **What was discarded**: Azure Task IDs (20111, 21944–21949, 20528–20529), all `/RCL/`, `/Seguridad/` route references, all Sprint 40 test counts and scope, specific ADO Plan/Suite IDs.
|
|
53
|
-
- **What was extracted**: The 18-section structure was collapsed into a generalized `04-automation-generation.md` agent instruction with parameterized sections.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## §5 — Standards Folder (`00-standards/`)
|
|
58
|
-
|
|
59
|
-
- **Item**: Naming conventions, bug template, TC template, test-data guidelines
|
|
60
|
-
- **Source**: Repo B only
|
|
61
|
-
- **Decision**: ✅ **Framework core** — adopt from Repo B as the baseline
|
|
62
|
-
- **Rationale**: Repo B has a full and well-designed standards set absent from Repo A. These are fully generalizable with minor parameterization (module/submodule codes).
|
|
63
|
-
- **What was discarded**:
|
|
64
|
-
- Repo B has `admin.qakeber.com` hardcoded in bug-report template and test-data guidelines. Replaced with `{{QA_ADMIN_EMAIL}}`.
|
|
65
|
-
- Module codes (AUTH, PERS, USER, AGRI, OPER, REP) were kept as example values in templates but removed from any "authoritative" list.
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## §6 — Playwright Integration
|
|
70
|
-
|
|
71
|
-
- **Item**: `playwright.config.ts`, `global-setup.ts`, `.env.example`, `fixtures/auth.ts`, page objects, spec files
|
|
72
|
-
- **Source**: Both repos
|
|
73
|
-
- **Decision**: ✅ **Optional integration** (playwright adapter) + ✅ **Reusable templates** for config files
|
|
74
|
-
- **Rationale**: Playwright is the automation framework of choice in both repos but must remain optional. Projects may use a different test runner (Jest, Cypress). The configuration patterns (storageState, globalSetup, testIgnore for seeds, CI vs local workers) are generalizable as templates.
|
|
75
|
-
- **What was discarded**:
|
|
76
|
-
- All project-specific selectors (form fields, route paths, element IDs)
|
|
77
|
-
- All hardcoded URLs
|
|
78
|
-
- Sprint-specific npm scripts (`sprint40`, `sprint40:p0`)
|
|
79
|
-
- Application-specific form constants from `fixtures/test-data.ts`
|
|
80
|
-
- All page objects (too application-specific)
|
|
81
|
-
- **What was templated**:
|
|
82
|
-
- `playwright.config.ts` — with `{{...}}` placeholders for baseURL, test path, ADO credentials
|
|
83
|
-
- `global-setup.ts` — generic login flow with configurable selectors
|
|
84
|
-
- `.env.example` — with all credential variables documented
|
|
85
|
-
- `fixtures/auth.ts` — generic multi-role fixture
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## §7 — `06-defects/` Directory
|
|
90
|
-
|
|
91
|
-
**This is the evaluation specifically requested in the brief.**
|
|
92
|
-
|
|
93
|
-
- **Item**: The `06-defects/` folder and its defect-tracking purpose
|
|
94
|
-
- **Source**: Repo A (actively used: DEF-001, DEF-002), Repo B (folder exists, no files)
|
|
95
|
-
- **Analysis**:
|
|
96
|
-
|
|
97
|
-
| Criteria | Finding |
|
|
98
|
-
|---|---|
|
|
99
|
-
| Is real value demonstrated? | Yes, in Repo A: DEF-* IDs are referenced from `test.skip()`, linking automation state to bug state. This provides traceability from failing test → known defect. |
|
|
100
|
-
| Is it redundant with ADO? | Partially. ADO Work Items serve the same purpose in organizations that use ADO. However, not all projects use ADO. |
|
|
101
|
-
| Is the format standardized? | No. In Repo A: freeform Markdown. Repo B has a bug-report template in `00-standards/`. |
|
|
102
|
-
| Does it create maintenance burden? | Yes, if not kept in sync with ADO. Two sources of truth for defects is a known anti-pattern. |
|
|
103
|
-
|
|
104
|
-
- **Decision**: ✅ **Keep as optional** — not required by framework core, but recommended when:
|
|
105
|
-
1. ADO is not in use (lightweight alternative)
|
|
106
|
-
2. The project needs offline/local defect tracking during sprint stabilization
|
|
107
|
-
3. The team wants to document the `test.skip() → DEF-* → reactivation path` explicitly
|
|
108
|
-
|
|
109
|
-
- **Recommended evolution**: When ADO is enabled, `06-defects/` becomes a cache/mirror of ADO bugs relevant to QA automation. The defect file links to the ADO WI, rather than replacing it.
|
|
110
|
-
|
|
111
|
-
- **What would be removed**: If this folder is removed from a project, the `test.skip('DEF-XXX: ...')` convention should still be kept in spec files; the DEF ID should then reference the ADO WI ID directly.
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## §8 — Azure DevOps Integration
|
|
116
|
-
|
|
117
|
-
- **Item**: Pipeline YAML, `playwright-azure-reporter`, PowerShell scripts, `module-registry.json`, `ado-ids-mapping.json`
|
|
118
|
-
- **Source**: Repo B (fully implemented), Repo A (partial — referenced but not implemented)
|
|
119
|
-
- **Decision**: ✅ **Optional integration** (ado-powershell adapter + playwright-azure-reporter adapter)
|
|
120
|
-
- **Rationale**: ADO integration provides real value (E2E result sync with Test Plans, CI pipeline, WI ID injection) but creates a strong dependency on a specific vendor (Azure DevOps). The framework must work without it.
|
|
121
|
-
- **What was kept**: The full set of scripts from Repo B — `inject-ado-ids.ps1`, `create-testplan-from-mapping.ps1`, `sync-ado-titles.ps1` — generalized by removing hardcoded org/project/ID values.
|
|
122
|
-
- **What was parameterized**: `ADO_ORG`, `ADO_PROJECT`, `ADO_PAT`, `planId`, `suiteId`, variable group name.
|
|
123
|
-
- **What was marked as stub**: The Repo B pipeline references a specific trigger branch (`keber.flores/qa-test/qa-specs`). This is replaced with a parameterized `{{CI_TRIGGER_BRANCH}}` in the template.
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## §9 — Blazor-Specific Automation Guides
|
|
128
|
-
|
|
129
|
-
- **Item**: `BLAZOR_WASM_AUTOMATION.md`, `RADZEN_COMPONENTS_PLAYWRIGHT.md`, `RETROSPECTIVA_CASCADA_2026-02.md`
|
|
130
|
-
- **Source**: Repo B only
|
|
131
|
-
- **Decision**: ✅ **Optional integration** (blazor-radzen adapter) for reusable helper functions; ❌ **Out of framework** for retrospective
|
|
132
|
-
- **Rationale**: The Blazor/Radzen automation patterns (`openDropdownAndSelectFirst()`, `toBeAttached()`, `waitForFunction()` for popup detection) are highly reusable across any Radzen Blazor project. However, they are not generic enough for the framework core. The retrospective is project-specific debug log.
|
|
133
|
-
- **What was extracted**: `openDropdownAndSelectFirst()` function moved to `integrations/blazor-radzen/helpers.ts` (stub — marked as `ADAPTER`).
|
|
134
|
-
- **What was discarded**: Retrospective content, specific route references in cascade-dropdown backtrack.
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## §10 — EXEC_IDX / RUN_SLOT Date Generation Pattern
|
|
139
|
-
|
|
140
|
-
- **Item**: `Math.floor(Date.now() / 60_000) % 100_000` (EXEC_IDX), `Math.floor(Date.now()/300_000)` (RUN_SLOT)
|
|
141
|
-
- **Source**: Repo A (primary), Repo B (uses raw `Date.now()` without the slot pattern)
|
|
142
|
-
- **Decision**: ✅ **Framework core** (general convention, extracted to template)
|
|
143
|
-
- **Rationale**: This pattern solves a real cross-project problem: parallel or repeated test runs creating data collisions. It avoids the need for test teardown and is independently applicable to any project with CRUD tests.
|
|
144
|
-
- **Action**: Documented in `agent-instructions/04-automation-generation.md` as a required pattern for data-producing tests. Moved to `templates/automation-scaffold/fixtures/test-helpers.ts`.
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## §11 — Naming Convention: Test Titles
|
|
149
|
-
|
|
150
|
-
- **Item**: Test title format — `[Nx] Title @Pp` (Repo A) vs `[ADO_ID] Title` (Repo B)
|
|
151
|
-
- **Source**: Both repos, incompatible
|
|
152
|
-
- **Decision**: ✅ **Framework core** (adopt unified convention)
|
|
153
|
-
- **Unified convention**: `[{LOCAL_ID}] {title} @{priority}` — e.g. `[TC-OPER-CAT-001] Access catalog list @P0`
|
|
154
|
-
- **When ADO is enabled**: Local ID is replaced with ADO WI ID by `inject-ado-ids.ps1`, becoming `[22957] Access catalog list @P0`
|
|
155
|
-
- **Rationale**: The local ID format preserves traceability without requiring ADO. The ADO ID injection is an idempotent upgrade step, not a prerequisite.
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## §12 — Page Object Model (POM) vs Inline Automation
|
|
160
|
-
|
|
161
|
-
- **Item**: POMs (Repo A) vs inline selector logic (Repo B)
|
|
162
|
-
- **Source**: Repo A has 5 POMs; Repo B uses inline `page.locator()` calls in spec files
|
|
163
|
-
- **Decision**: ✅ **Framework recommendation: use POMs** for production automation; inline is acceptable for exploratory scripts
|
|
164
|
-
- **Rationale**: POMs provide selector encapsulation and reuse across suites. Repo A's approach led to smaller spec files and easier maintenance. Repo B's inline approach was faster to write but led to selector duplication. The framework templates use POMs, but the agent instruction notes that inline is acceptable for single-use diagnostic specs.
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## §13 — `SITEMAP_TERRAVIX_QA.md` / `ui-menu-map.md` Pattern
|
|
169
|
-
|
|
170
|
-
- **Item**: Auto-generated application sitemap from a real Playwright session
|
|
171
|
-
- **Source**: Both repos (Repo B: SITEMAP file, Repo A: auto-generated ui-menu-map.md)
|
|
172
|
-
- **Decision**: ✅ **Reusable template** — the `ui-menu-map.spec.ts` script extracted and generalized
|
|
173
|
-
- **Rationale**: Generating a live sitemap from a Playwright session is a highly valuable, universally applicable pattern. It provides the ground truth for module analysis and access-control testing.
|
|
174
|
-
- **What was parameterized**: `BASE_URL` env var, output path in `qa/01-specifications/shared/ui-menu-map.md`.
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## §14 — Session Summary Pattern
|
|
179
|
-
|
|
180
|
-
- **Item**: `SESSION-SUMMARY-YYYY-MM-DD.md` files at qa/ root (Repo B)
|
|
181
|
-
- **Source**: Repo B only
|
|
182
|
-
- **Decision**: ✅ **Reusable template**
|
|
183
|
-
- **Rationale**: Provides a living log of what was produced in each QA working session. Useful for agent continuity (can resume from a known state) and for traceability.
|
|
184
|
-
- **What was discarded**: Specific content (Personas module, 19 files created, etc.)
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
## §15 — `06-defects/` vs ADO Work Items Decision Tree
|
|
189
|
-
|
|
190
|
-
For completeness, here is the recommended decision tree:
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
Is Azure DevOps enabled in this project?
|
|
194
|
-
├── YES → Use ADO Work Items for ALL defects.
|
|
195
|
-
│ Keep 06-defects/ as a lightweight reference cache only.
|
|
196
|
-
│ Each DEF-*.md file = summary + link to ADO WI URL.
|
|
197
|
-
│ test.skip() references ADO WI ID, not DEF-ID.
|
|
198
|
-
│
|
|
199
|
-
└── NO → Use 06-defects/ as the primary defect tracker.
|
|
200
|
-
Follow the bug-report-template.md format.
|
|
201
|
-
test.skip() references DEF-ID.
|
|
202
|
-
When ADO is enabled later: migrate IDs.
|
|
203
|
-
```
|