@keber/qa-framework 1.0.4

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 (51) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +233 -0
  3. package/agent-instructions/00-module-analysis.md +263 -0
  4. package/agent-instructions/01-spec-generation.md +278 -0
  5. package/agent-instructions/02-test-plan-generation.md +202 -0
  6. package/agent-instructions/03-test-case-generation.md +147 -0
  7. package/agent-instructions/04-automation-generation.md +310 -0
  8. package/agent-instructions/04b-test-stabilization.md +306 -0
  9. package/agent-instructions/05-ado-integration.md +244 -0
  10. package/agent-instructions/06-maintenance.md +125 -0
  11. package/docs/architecture.md +227 -0
  12. package/docs/comparison-matrix.md +131 -0
  13. package/docs/final-report.md +279 -0
  14. package/docs/folder-structure-guide.md +291 -0
  15. package/docs/generalization-decisions.md +203 -0
  16. package/docs/installation.md +239 -0
  17. package/docs/spec-driven-philosophy.md +170 -0
  18. package/docs/usage-with-agent.md +203 -0
  19. package/examples/module-example/README.md +34 -0
  20. package/examples/module-example/suppliers/00-inventory.md +56 -0
  21. package/examples/module-example/suppliers/suppliers-create.spec.ts +148 -0
  22. package/integrations/ado-powershell/README.md +75 -0
  23. package/integrations/ado-powershell/pipelines/azure-pipeline-qa.yml +133 -0
  24. package/integrations/ado-powershell/scripts/create-testplan-from-mapping.ps1 +114 -0
  25. package/integrations/ado-powershell/scripts/inject-ado-ids.ps1 +96 -0
  26. package/integrations/ado-powershell/scripts/sync-ado-titles.ps1 +93 -0
  27. package/integrations/playwright/README.md +68 -0
  28. package/integrations/playwright-azure-reporter/README.md +88 -0
  29. package/package.json +57 -0
  30. package/qa-framework.config.json +87 -0
  31. package/scripts/cli.js +74 -0
  32. package/scripts/generate.js +92 -0
  33. package/scripts/init.js +322 -0
  34. package/scripts/validate.js +184 -0
  35. package/templates/automation-scaffold/.env.example +56 -0
  36. package/templates/automation-scaffold/fixtures/auth.ts +77 -0
  37. package/templates/automation-scaffold/fixtures/test-helpers.ts +85 -0
  38. package/templates/automation-scaffold/global-setup.ts +106 -0
  39. package/templates/automation-scaffold/package.json +24 -0
  40. package/templates/automation-scaffold/playwright.config.ts +85 -0
  41. package/templates/defect-report.md +101 -0
  42. package/templates/execution-report.md +116 -0
  43. package/templates/session-summary.md +73 -0
  44. package/templates/specification/00-inventory.md +81 -0
  45. package/templates/specification/01-business-rules.md +90 -0
  46. package/templates/specification/02-workflows.md +114 -0
  47. package/templates/specification/03-roles-permissions.md +49 -0
  48. package/templates/specification/04-test-data.md +104 -0
  49. package/templates/specification/05-test-scenarios.md +226 -0
  50. package/templates/test-case.md +81 -0
  51. package/templates/test-plan.md +130 -0
@@ -0,0 +1,244 @@
1
+ # Agent Instructions: Azure DevOps Integration
2
+
3
+ **File**: `agent-instructions/05-ado-integration.md`
4
+ **Purpose**: Instructions for an agent to create, configure, and maintain Azure DevOps Test Plans integration with Playwright automation results.
5
+
6
+ > **This section is OPTIONAL**. Only use it when `integrations.azureDevOps.enabled = true` in `qa-framework.config.json`.
7
+
8
+ ---
9
+
10
+ ## Prerequisites
11
+
12
+ 1. Azure DevOps PAT stored in `ADO_PAT` environment variable
13
+ Required scopes: `Work Items (Read, Write)`, `Test Management (Read, Write)`
14
+ 2. `ADO_ORG` and `ADO_PROJECT` environment variables set
15
+ 3. PowerShell 5.1+ available
16
+ 4. `@alex_neo/playwright-azure-reporter` installed in the E2E package
17
+ 5. `qa/08-azure-integration/module-registry.json` exists with module paths and plan IDs
18
+
19
+ ---
20
+
21
+ ## Step 1: Create ADO Test Plan
22
+
23
+ If no Test Plan exists yet:
24
+
25
+ ```powershell
26
+ # qa/08-azure-integration/scripts/create-testplan-from-mapping.ps1
27
+ # Reads ado-ids-mapping-{project}.json and creates the plan + suites + TCs in ADO
28
+ # Parameters: -Organization $env:ADO_ORG -Project $env:ADO_PROJECT -Token $env:ADO_PAT
29
+ .\qa\08-azure-integration\scripts\create-testplan-from-mapping.ps1 `
30
+ -Organization $env:ADO_ORG `
31
+ -Project $env:ADO_PROJECT `
32
+ -Token $env:ADO_PAT `
33
+ -MappingFile .\qa\08-azure-integration\ado-ids-mapping-{project}.json
34
+ ```
35
+
36
+ After running, the script outputs a `TestPlanId` and `SuiteIds`.
37
+ Record these in `qa/08-azure-integration/module-registry.json`.
38
+
39
+ ---
40
+
41
+ ## Step 2: Inject ADO IDs into Spec Files
42
+
43
+ Once Test Cases are created in ADO and have Work Item IDs:
44
+
45
+ ```powershell
46
+ # Dry run first to preview changes
47
+ .\qa\08-azure-integration\scripts\inject-ado-ids.ps1 `
48
+ -MappingFile .\qa\08-azure-integration\ado-ids-mapping-{project}.json `
49
+ -TestDir .\qa\07-automation\e2e\tests `
50
+ -DryRun
51
+
52
+ # Apply changes
53
+ .\qa\08-azure-integration\scripts\inject-ado-ids.ps1 `
54
+ -MappingFile .\qa\08-azure-integration\ado-ids-mapping-{project}.json `
55
+ -TestDir .\qa\07-automation\e2e\tests
56
+ ```
57
+
58
+ This converts test titles from:
59
+ ```
60
+ '[TC-OPER-CAT-001] Access catalog list @P0'
61
+ ```
62
+ to:
63
+ ```
64
+ '[22957] Access catalog list @P0'
65
+ ```
66
+
67
+ Plus adds annotation:
68
+ ```typescript
69
+ test.info().annotations.push({ type: 'TestCase', description: '22957' });
70
+ ```
71
+
72
+ ---
73
+
74
+ ## Step 3: Configure playwright-azure-reporter
75
+
76
+ In `playwright.config.ts`:
77
+
78
+ ```typescript
79
+ import type { PlaywrightTestConfig } from '@playwright/test';
80
+
81
+ const config: PlaywrightTestConfig = {
82
+ reporter: [
83
+ ['html'],
84
+ ['@alex_neo/playwright-azure-reporter', {
85
+ orgUrl: `https://dev.azure.com/${process.env.ADO_ORG}`,
86
+ token: process.env.ADO_PAT,
87
+ planId: Number(process.env.ADO_PLAN_ID),
88
+ projectName: process.env.ADO_PROJECT,
89
+ isDisabled: !process.env.CI, // only publish in CI
90
+ publishTestResultsMode: 'testRun',
91
+ testRunTitle: `QA Run - ${new Date().toISOString()}`,
92
+ uploadAttachments: true,
93
+ attachmentsType: ['screenshot', 'video', 'trace'],
94
+ }],
95
+ ],
96
+ };
97
+ export default config;
98
+ ```
99
+
100
+ **Note**: Set `isDisabled: !process.env.CI` so the reporter only publishes from CI, not from local runs.
101
+
102
+ ---
103
+
104
+ ## Step 4: Module Registry
105
+
106
+ Maintain `qa/08-azure-integration/module-registry.json`:
107
+
108
+ ```json
109
+ {
110
+ "modules": [
111
+ {
112
+ "name": "operacion",
113
+ "specsPath": "qa/07-automation/e2e/tests/operacion",
114
+ "planId": 0,
115
+ "suiteId": 0,
116
+ "description": "Módulo Operación — 7 submodules"
117
+ }
118
+ ]
119
+ }
120
+ ```
121
+
122
+ The CI pipeline uses this file to detect which module changed (via `git diff`) and run only the relevant spec.
123
+
124
+ ---
125
+
126
+ ## Step 5: ADO IDs Mapping File
127
+
128
+ Maintain `qa/08-azure-integration/ado-ids-mapping-{project}.json`:
129
+
130
+ ```json
131
+ {
132
+ "planId": 22304,
133
+ "module": "operacion",
134
+ "specsPath": "qa/07-automation/e2e/tests/operacion",
135
+ "suites": [
136
+ {
137
+ "suiteId": 22956,
138
+ "suiteName": "Suite 1.1 - Catálogos de Trabajo",
139
+ "testCases": [
140
+ { "id": 22957, "title": "Access catalog list @P0", "tags": ["automatable", "playwright"] },
141
+ { "id": 22958, "title": "Create labor type @P1", "tags": ["automatable", "playwright"] }
142
+ ]
143
+ }
144
+ ]
145
+ }
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Step 6: Configure CI Pipeline
151
+
152
+ Template in `qa/08-azure-integration/pipelines/azure-pipeline-qa.yml`:
153
+
154
+ ```yaml
155
+ trigger:
156
+ branches:
157
+ include:
158
+ - {{CI_TRIGGER_BRANCH}}
159
+
160
+ pool:
161
+ vmImage: 'ubuntu-latest'
162
+
163
+ variables:
164
+ - group: qa-secrets # Must contain: QA_USER_EMAIL, QA_USER_PASSWORD, QA_BASE_URL, ADO_PAT
165
+
166
+ steps:
167
+ - checkout: self
168
+ fetchDepth: 2
169
+
170
+ - task: NodeTool@0
171
+ inputs:
172
+ versionSpec: '20.x'
173
+ displayName: 'Install Node.js 20'
174
+
175
+ - script: |
176
+ cd qa/07-automation/e2e
177
+ npm install
178
+ npx playwright install chromium --with-deps
179
+ displayName: 'Install Playwright'
180
+
181
+ - script: |
182
+ cd qa/07-automation/e2e
183
+ npx playwright test
184
+ displayName: 'Run Playwright tests'
185
+ env:
186
+ QA_BASE_URL: $(QA_BASE_URL)
187
+ QA_USER_EMAIL: $(QA_USER_EMAIL)
188
+ QA_USER_PASSWORD: $(QA_USER_PASSWORD)
189
+ ADO_PAT: $(ADO_PAT)
190
+ ADO_PLAN_ID: $(ADO_PLAN_ID)
191
+ CI: 'true'
192
+
193
+ - task: PublishTestResults@2
194
+ inputs:
195
+ testResultsFormat: 'JUnit'
196
+ testResultsFiles: '**/test-results/*.xml'
197
+ displayName: 'Publish JUnit results'
198
+ condition: always()
199
+
200
+ - task: PublishPipelineArtifact@1
201
+ inputs:
202
+ targetPath: 'qa/07-automation/e2e/playwright-report'
203
+ artifact: 'playwright-html-report'
204
+ displayName: 'Publish HTML report'
205
+ condition: always()
206
+ ```
207
+
208
+ ---
209
+
210
+ ## Syncing ADO TC Titles with Spec Titles
211
+
212
+ If TC titles drift between ADO and the spec files:
213
+
214
+ ```powershell
215
+ .\qa\08-azure-integration\scripts\sync-ado-titles.ps1 `
216
+ -Organization $env:ADO_ORG `
217
+ -Project $env:ADO_PROJECT `
218
+ -Token $env:ADO_PAT `
219
+ -MappingFile .\qa\08-azure-integration\ado-ids-mapping-{project}.json `
220
+ -DryRun
221
+ ```
222
+
223
+ This reads ADO TC titles and compares them against the spec. Outputs a diff report. Apply with `-DryRun:$false`.
224
+
225
+ ---
226
+
227
+ ## Credential Security Rules for ADO
228
+
229
+ 1. `ADO_PAT` is **never** committed to any file — always comes from env var or CI variable group
230
+ 2. `ADO_PAT` is **never** logged, printed, or written to any markdown file
231
+ 3. If a PAT appears in any log or output, revoke it immediately in ADO Portal and generate a new one
232
+ 4. Variable group `qa-secrets` in Azure DevOps must be scoped to the pipeline only
233
+ 5. PAT minimum scopes: `Work Items (Read, Write)`, `Test Management (Read, Write)` — do not use full access PATs
234
+
235
+ ---
236
+
237
+ ## Troubleshooting
238
+
239
+ | Symptom | Likely Cause | Fix |
240
+ |---------|-------------|-----|
241
+ | Reporter silently does nothing in CI | `isDisabled: true` or `CI` env not set | Verify `process.env.CI` is `'true'` in pipeline |
242
+ | Tests report as "Not Run" in ADO | ADO WI ID not in test title or annotation | Re-run `inject-ado-ids.ps1` |
243
+ | TestRun created but no results attached | `publishTestResultsMode` wrong | Use `'testRun'` not `'testCase'` |
244
+ | PAT error 401 | PAT expired or wrong scopes | Generate new PAT with correct scopes |
@@ -0,0 +1,125 @@
1
+ # Agent Instructions: Maintenance and Updates
2
+
3
+ **File**: `agent-instructions/06-maintenance.md`
4
+ **Purpose**: Instructions for updating QA artifacts after application code changes.
5
+
6
+ ---
7
+
8
+ ## When to use
9
+
10
+ - A developer reports a feature change or new feature in a module
11
+ - A sprint delivers changes to an already-analyzed module
12
+ - A defect is resolved and related `test.skip()` calls need to be reactivated
13
+ - The QA environment is updated and existing specs need to be refreshed
14
+
15
+ ---
16
+
17
+ ## Step 1: Identify What Changed
18
+
19
+ Gather from the developer or ticket:
20
+ - Which module/submodule was changed?
21
+ - Was it a new feature, a modification, or a bug fix?
22
+ - Are there new routes, fields, or API endpoints?
23
+ - Were any existing behaviors removed or changed?
24
+
25
+ If the change scope is unclear, navigate to the affected module in the QA environment and compare against the existing `00-inventory.md`.
26
+
27
+ ---
28
+
29
+ ## Step 2: Spec Update Rules
30
+
31
+ ### A new field was added to a form
32
+
33
+ 1. Add the field to `00-inventory.md` under UI Elements table
34
+ 2. If the field has validation: add a business rule to `01-business-rules.md` (`RN-{MODULE}-{next-number}`)
35
+ 3. Add TCs to `05-test-scenarios.md`:
36
+ - TC for happy path with the new field
37
+ - TC for required validation (if applicable)
38
+ - TC for any new business rule
39
+
40
+ ### A field was removed from the UI
41
+
42
+ 1. Mark the field in `00-inventory.md` as `[REMOVED - {YYYY-MM-DD}]` — do not delete the row
43
+ 2. If automation tests reference the field selector: update or skip them
44
+ 3. If a business rule only applied to that field: mark as `[DEPRECATED - {YYYY-MM-DD}]`
45
+ 4. Leave TCs in `05-test-scenarios.md` marked as `[DEPRECATED]` for traceability
46
+
47
+ ### A workflow was changed
48
+
49
+ 1. Update `02-workflows.md` with the new flow
50
+ 2. Mark the old version as `[PREVIOUS - {YYYY-MM-DD}]`
51
+ 3. Review all TCs that test the affected steps
52
+ 4. Update expected results in `05-test-scenarios.md`
53
+
54
+ ### A new submodule was added
55
+
56
+ Follow the full module analysis process in `00-module-analysis.md`.
57
+
58
+ ### A defect was fixed
59
+
60
+ 1. Find all `test.skip()` calls that reference the DEF-ID or ADO WI
61
+ 2. Remove the `test.skip()` wrapper
62
+ 3. Run the test at least 2 times with different EXEC_IDX values to confirm stability
63
+ 4. Update `06-defects/DEF-{NNN}.md` (or ADO WI) status to Resolved
64
+ 5. If the spec assertion was adapted to document the bug (e.g., `toBeFalsy()` for a wrong default), restore the correct assertion
65
+
66
+ ---
67
+
68
+ ## Step 3: Automation Update Rules
69
+
70
+ ### Selectors changed (redesign, framework update)
71
+
72
+ 1. Locate the POM file or spec file that contains the old selector
73
+ 2. Check `CORRECTIONS` block at top of spec file (convention for documenting selector audits)
74
+ 3. Update the selector
75
+ 4. Run the affected test 2+ times to confirm the new selector is stable
76
+ 5. Add an entry to the `CORRECTIONS` block noting the change and date
77
+
78
+ ### New test suite needed
79
+
80
+ Follow `04-automation-generation.md` for the new suite.
81
+ Update `COVERAGE-MAPPING.md` with the new TCs.
82
+
83
+ ### Test became flaky after app update
84
+
85
+ Use the 5-layer debugging methodology:
86
+ 1. Environment: is QA env stable?
87
+ 2. Timeout: did an operation become slower?
88
+ 3. Data: did a seed or precondition change?
89
+ 4. Selector: did the element structure change?
90
+ 5. System: is this a real defect?
91
+
92
+ ---
93
+
94
+ ## Step 4: Version the Spec
95
+
96
+ At the bottom of each updated spec file, add to the changelog:
97
+
98
+ ```markdown
99
+ ## Changelog
100
+
101
+ | Version | Date | Description |
102
+ |---------|------|-------------|
103
+ | 1.0 | YYYY-MM-DD | Initial creation |
104
+ | 1.1 | YYYY-MM-DD | Added RN-{MODULE}-{NNN}: {rule title}. TC count: N → M |
105
+ | 1.2 | YYYY-MM-DD | Removed field {name} from UI inventory (deprecated) |
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Step 5: Update qa/README.md
111
+
112
+ After every maintenance session, update the master index:
113
+ - TC count (if changed)
114
+ - Automation status (if changed)
115
+ - Last updated date for the module
116
+
117
+ ---
118
+
119
+ ## Step 6: Write a Session Summary
120
+
121
+ Create `qa/SESSION-SUMMARY-{YYYY-MM-DD}-maintenance.md` documenting:
122
+ - What changed
123
+ - Which files were updated
124
+ - Any new TCs or deprecated TCs
125
+ - Any tests that were reactivated or newly skipped
@@ -0,0 +1,227 @@
1
+ # docs/architecture.md
2
+
3
+ ## Framework Architecture
4
+
5
+ **Version**: 1.0.0
6
+ **Date**: 2026-03-04
7
+
8
+ ---
9
+
10
+ ## Design Goals
11
+
12
+ 1. **Decoupled core** — the framework works without Playwright, without Azure DevOps, without any specific CI/CD system
13
+ 2. **Layered optionality** — features are added as explicit opt-in integrations, not baked into the core
14
+ 3. **Agent-first design** — every convention exists so that an IDE agent can navigate and produce artifacts predictably
15
+ 4. **Spec-before-automation** — the specification layer is always the source of truth; automation references specs, never the reverse
16
+ 5. **Parameterization over hardcoding** — project-specific values live in `qa-framework.config.json`, not in framework files
17
+
18
+ ---
19
+
20
+ ## Component Map
21
+
22
+ ```
23
+ ┌─────────────────────────────────────────────────────────────────────────────┐
24
+ │ qa-framework (npm package) │
25
+ │ │
26
+ │ ┌──────────────────────────────────────────────────────────────────────┐ │
27
+ │ │ FRAMEWORK CORE │ │
28
+ │ │ │ │
29
+ │ │ ┌────────────────┐ ┌──────────────────┐ ┌─────────────────────┐ │ │
30
+ │ │ │ qa/ structure │ │ Agent │ │ Standards & │ │ │
31
+ │ │ │ (9 folders) │ │ instructions │ │ Naming conventions │ │ │
32
+ │ │ │ │ │ (7 files) │ │ │ │ │
33
+ │ │ └────────────────┘ └──────────────────┘ └─────────────────────┘ │ │
34
+ │ │ │ │
35
+ │ │ ┌────────────────┐ ┌──────────────────┐ ┌─────────────────────┐ │ │
36
+ │ │ │ 6-file │ │ CLI commands │ │ Config schema │ │ │
37
+ │ │ │ submodule │ │ (init/generate/ │ │ (qa-framework. │ │ │
38
+ │ │ │ templates │ │ validate) │ │ config.json) │ │ │
39
+ │ │ └────────────────┘ └──────────────────┘ └─────────────────────┘ │ │
40
+ │ └──────────────────────────────────────────────────────────────────────┘ │
41
+ │ │
42
+ │ ┌──────────────────────────────────────────────────────────────────────┐ │
43
+ │ │ OPTIONAL INTEGRATIONS │ │
44
+ │ │ │ │
45
+ │ │ ┌─────────────────────────┐ ┌──────────────────────────────┐ │ │
46
+ │ │ │ playwright/ │ │ playwright-azure-reporter/ │ │ │
47
+ │ │ │ - playwright.config.ts │ │ - reporter config template │ │ │
48
+ │ │ │ - global-setup.ts │ │ - ado-ids-mapping.json │ │ │
49
+ │ │ │ - fixtures/auth.ts │ │ - inject-ado-ids.ps1 │ │ │
50
+ │ │ │ - .env.example │ │ - module-registry.json │ │ │
51
+ │ │ └─────────────────────────┘ └──────────────────────────────┘ │ │
52
+ │ │ │ │
53
+ │ │ ┌─────────────────────────┐ ┌──────────────────────────────┐ │ │
54
+ │ │ │ ado-powershell/ │ │ blazor-radzen/ (stub) │ │ │
55
+ │ │ │ - create-testplan.ps1 │ │ - openDropdownAndSelect() │ │ │
56
+ │ │ │ - sync-ado-titles.ps1 │ │ - waitForBlazorRender() │ │ │
57
+ │ │ │ - azure-pipeline.yml │ │ - toBeAttached() guidance │ │ │
58
+ │ │ └─────────────────────────┘ └──────────────────────────────┘ │ │
59
+ │ └──────────────────────────────────────────────────────────────────────┘ │
60
+ └─────────────────────────────────────────────────────────────────────────────┘
61
+
62
+ installs into project as:
63
+
64
+ ┌─────────────────────────────────────────────────────────────────────────────┐
65
+ │ TARGET PROJECT │
66
+ │ │
67
+ │ qa/ │
68
+ │ ├── README.md ← living index (project-specific) │
69
+ │ ├── QA-STRUCTURE-GUIDE.md ← copy from framework │
70
+ │ ├── qa-framework.config.json ← project config (parameterized) │
71
+ │ │ │
72
+ │ ├── 00-guides/ ← agent instructions (copied from pkg) │
73
+ │ ├── 00-standards/ ← naming + templates (copied from pkg) │
74
+ │ ├── 01-specifications/ ← generated per module (project work) │
75
+ │ ├── 02-test-plans/ ← generated (project work) │
76
+ │ ├── 03-test-cases/ ← generated (project work) │
77
+ │ ├── 04-test-data/ ← project data (project work) │
78
+ │ ├── 05-test-execution/ ← execution reports (project work) │
79
+ │ ├── 06-defects/ ← optional defect cache │
80
+ │ ├── 07-automation/ ← Playwright code (project work) │
81
+ │ └── 08-azure-integration/ ← optional ADO integration │
82
+ └─────────────────────────────────────────────────────────────────────────────┘
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Data Flow: Spec-Driven Automation
88
+
89
+ ```
90
+ Module analysis (agent)
91
+
92
+
93
+ 01-specifications/module-X/submodule-Y/
94
+ ├── 00-inventory.md ← what exists in the UI
95
+ ├── 01-business-rules.md ← RN-* identifiers
96
+ ├── 02-workflows.md ← FL-* flowcharts
97
+ ├── 03-roles-permissions.md
98
+ ├── 04-test-data.md
99
+ └── 05-test-scenarios.md ← TC-* identifiers ──────────────────────┐
100
+
101
+ │ │
102
+ ▼ ▼
103
+ 02-test-plans/{module}.md 03-test-cases/{TC-ID}.md
104
+ (selects TCs, assigns priority) (detailed per-test docs)
105
+ │ │
106
+ └─────────────────────┬────────────────────────┘
107
+
108
+
109
+ 07-automation/e2e/tests/{module}/
110
+ *.spec.ts ←── test title contains TC-ID
111
+
112
+ ┌────────────────────┘
113
+
114
+
115
+ [ADO enabled?]
116
+ YES → playwright-azure-reporter syncs results to ADO Test Plan
117
+ NO → 05-test-execution/automated/{date}.md (local report)
118
+
119
+
120
+ 06-defects/ (if test.skip for known bug)
121
+ DEF-*.md or ADO WI reference
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Layer Definitions
127
+
128
+ ### Layer 1 — Framework Core (mandatory)
129
+
130
+ Installed always. Contains:
131
+
132
+ - `qa/` directory skeleton (9 folders)
133
+ - `00-guides/` — agent instructions
134
+ - `00-standards/` — naming conventions, templates
135
+ - `QA-STRUCTURE-GUIDE.md`
136
+ - `qa-framework.config.json` schema
137
+
138
+ ### Layer 2 — Playwright Integration (opt-in)
139
+
140
+ Installed when `integrations.playwright.enabled = true`:
141
+
142
+ - `qa/07-automation/e2e/playwright.config.ts`
143
+ - `qa/07-automation/e2e/global-setup.ts`
144
+ - `qa/07-automation/e2e/.env.example`
145
+ - `qa/07-automation/e2e/fixtures/auth.ts`
146
+ - `qa/07-automation/e2e/package.json`
147
+
148
+ ### Layer 3 — Azure DevOps Integration (opt-in)
149
+
150
+ Installed when `integrations.azureDevOps.enabled = true`:
151
+
152
+ - `qa/08-azure-integration/` structure
153
+ - `module-registry.json` template
154
+ - `ado-ids-mapping.json` template
155
+ - PowerShell scripts (inject, create-plan, sync)
156
+ - Azure Pipeline YAML template
157
+
158
+ ### Layer 4 — Framework Adapters (opt-in per adapter)
159
+
160
+ Technology-specific extensions. Currently available:
161
+
162
+ - `blazor-radzen` — Playwright helpers for Radzen Blazor apps (STUB - v1.1 planned)
163
+ - `aspnet-mvc` — Select2/jQuery datatable helpers (STUB - v1.1 planned)
164
+
165
+ ---
166
+
167
+ ## Configuration Architecture
168
+
169
+ ```
170
+ qa-framework.config.json (project-level, committed to repo)
171
+
172
+ ├── project.* → Display values, URLs (non-secret)
173
+ ├── modules[] → Module codes, paths, ADO IDs
174
+ ├── conventions.* → Naming patterns, TC ID format
175
+ ├── testUsers[] → Role→envVar mapping (NOT credentials)
176
+ └── integrations.* → Feature flags + integration config
177
+
178
+ └── credentials come from:
179
+ .env (local, gitignored)
180
+ CI variable group (qa-secrets) [ADO only]
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Versioning Strategy
186
+
187
+ The framework uses **Semantic Versioning**:
188
+
189
+ | Change type | Version bump |
190
+ |---|---|
191
+ | New folder added to `qa/` tree | MAJOR (breaks existing structure) |
192
+ | New template file | MINOR |
193
+ | New integration adapter | MINOR |
194
+ | Agent instruction update | PATCH |
195
+ | Documentation correction | PATCH |
196
+
197
+ **Upgrade path**: When a new MAJOR version changes the `qa/` structure, the `MIGRATION-NOTES.md` in the package provides a step-by-step migration script. Projects should pin their framework version in `package.json` and upgrade deliberately.
198
+
199
+ ---
200
+
201
+ ## Naming Convention Rules (summary)
202
+
203
+ Full rules: [docs/folder-structure-guide.md](folder-structure-guide.md)
204
+
205
+ | Artifact | Pattern | Example |
206
+ |---|---|---|
207
+ | Folders | kebab-case | `module-operacion/` |
208
+ | Numbered QA folders | `NN-name/` | `01-specifications/` |
209
+ | Numbered spec files | `NN-name.md` | `00-inventory.md` |
210
+ | Test case IDs | `TC-{MODULE}-{SUBMODULE}-{NUM}` | `TC-OPER-CAT-001` |
211
+ | Business rule IDs | `RN-{MODULE}-{NUM}` | `RN-OPER-001` |
212
+ | Workflow IDs | `FL-{MODULE}-{NUM}` | `FL-OPER-001` |
213
+ | Defect IDs | `DEF-{NUM}` | `DEF-001` |
214
+ | Execution folders | `YYYY-MM-DD_HH-MM-SS_desc` | `2026-03-04_14-00-00_sprint40-p0` |
215
+ | Test title (no ADO) | `[TC-ID] Title @Pp` | `[TC-OPER-CAT-001] Access catalog @P0` |
216
+ | Test title (with ADO) | `[ADO_WI_ID] Title @Pp` | `[22957] Access catalog @P0` |
217
+ | Screenshot | `NN-description.png` in `diagnosis/` | `01-login-failure.png` |
218
+
219
+ ---
220
+
221
+ ## Assumptions
222
+
223
+ 1. The primary test runner is Playwright. Other runners (Jest, Cypress) are not excluded but are not provided adapters in v1.0.
224
+ 2. The target application runs in a browser. Back-end API-only testing is not the primary use case of this framework (though API testing can be added to `07-automation/` as needed).
225
+ 3. The IDE agent is GitHub Copilot or equivalent. The instructions are written in Markdown and are IDE-agnostic.
226
+ 4. The project uses Git. The `qa/` directory lives inside the same repository as the application code (monorepo-friendly).
227
+ 5. Credentials are always managed via environment variables. There is no fallback to hardcoded credentials in any framework file.