@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,278 @@
1
+ # Agent Instructions: Specification Generation
2
+
3
+ **File**: `agent-instructions/01-spec-generation.md`
4
+ **Purpose**: Detailed instructions for generating the 6-file submodule specification set from a completed module analysis or from existing source material (UI observation, requirements docs, developer input).
5
+
6
+ ---
7
+
8
+ ## When to use
9
+
10
+ - After Phase 2 (Exploration) of module analysis is complete
11
+ - When updating specs after a code change
12
+ - When a spec file is missing or incomplete
13
+
14
+ ---
15
+
16
+ ## Inputs Required
17
+
18
+ Before generating specs, gather:
19
+
20
+ 1. **Module exploration notes** — from the analysis session
21
+ 2. **Module code** — from `qa/00-standards/naming-conventions.md` or allocate a new one
22
+ 3. **Submodule name** and its kebab-case directory name
23
+ 4. **QA environment observations** — what you actually saw in the UI
24
+
25
+ ---
26
+
27
+ ## File-by-File Generation Rules
28
+
29
+ ### `00-inventory.md` — UI and API Inventory
30
+
31
+ **Header block** (always required):
32
+
33
+ ```markdown
34
+ # MODULE: {Module Display Name} — Submodule: {Submodule Display Name}
35
+
36
+ | Field | Value |
37
+ |-------|-------|
38
+ | Module code | {MODULE_CODE} |
39
+ | Submodule code | {SUBMODULE_CODE} |
40
+ | Primary URL | {{QA_BASE_URL}}/path/to/submodule |
41
+ | Status | Active / Deprecated / In Development |
42
+ | Last updated | YYYY-MM-DD |
43
+ ```
44
+
45
+ **UI element table**:
46
+
47
+ ```markdown
48
+ ## UI Elements
49
+
50
+ | Element | Type | Required | Notes |
51
+ |---------|------|----------|-------|
52
+ | {field-name} | text / select / checkbox / date | Yes/No | {validation rule} |
53
+ ```
54
+
55
+ **API endpoints table**:
56
+
57
+ ```markdown
58
+ ## API Endpoints
59
+
60
+ | Method | Path | Purpose |
61
+ |--------|------|---------|
62
+ | GET | /api/{endpoint} | {description} |
63
+ | POST | /api/{endpoint} | {description} |
64
+ ```
65
+
66
+ **Do NOT include**: credentials, personal data, real user IDs.
67
+
68
+ ---
69
+
70
+ ### `01-business-rules.md` — Business Rules
71
+
72
+ **Format for each rule**:
73
+
74
+ ```markdown
75
+ ### RN-{MODULE}-{NNN}: {Rule Title}
76
+
77
+ - **Type**: Validation / Access Control / State Machine / Calculation / Integration
78
+ - **Trigger**: {What user action triggers this rule}
79
+ - **Behavior**: {What the system does when the rule is evaluated}
80
+ - **Error message** (if validation): "{exact text as shown in UI}"
81
+ - **Notes**: {any special circumstances}
82
+ ```
83
+
84
+ **Rule identification tips**:
85
+ - Every required field → at least 1 RN (field is required)
86
+ - Every unique constraint → 1 RN (duplicate not allowed)
87
+ - Every state transition → 1 RN (can only approve if status=pending)
88
+ - Every role restriction → 1 RN (only role X can see this)
89
+ - Every auto-calculated field → 1 RN (total = quantity × price)
90
+
91
+ **Minimum**: 5 rules per submodule. **Typical**: 8–15.
92
+
93
+ ---
94
+
95
+ ### `02-workflows.md` — User Workflows
96
+
97
+ **Format for each workflow**:
98
+
99
+ ```markdown
100
+ ### FL-{MODULE}-{NNN}: {Workflow Title}
101
+
102
+ **Actor**: {Role who performs this workflow}
103
+ **Trigger**: {What initiates the workflow}
104
+ **Precondition**: {What must be true before this starts}
105
+
106
+ **Flow**:
107
+ ```
108
+ [Start]
109
+
110
+
111
+ [Step 1: action]
112
+
113
+ ├─ [Alternative: condition] ──► [Alternative path]
114
+
115
+
116
+ [Step 2: action]
117
+
118
+
119
+ [End: outcome]
120
+ ```
121
+
122
+ **Postcondition**: {State of the system after the workflow completes}
123
+ ```
124
+
125
+ Cover at minimum:
126
+ - Primary happy path (end-to-end main scenario)
127
+ - Rejection / cancellation path (if applicable)
128
+ - Error path (validation failure, system error)
129
+
130
+ ---
131
+
132
+ ### `03-roles-permissions.md` — Role Matrix
133
+
134
+ **Format**:
135
+
136
+ ```markdown
137
+ # Roles and Permissions — {Submodule}
138
+
139
+ ## Access Matrix
140
+
141
+ | Feature / Action | {Role 1} | {Role 2} | {Role 3} |
142
+ |-----------------|---------|---------|---------|
143
+ | View list | ✅ | ✅ | ❌ |
144
+ | Create new | ✅ | ❌ | ❌ |
145
+ | Edit | ✅ | ❌ | ❌ |
146
+ | Delete | ✅ | ❌ | ❌ |
147
+ | Approve | ❌ | ✅ | ❌ |
148
+ | Export | ✅ | ✅ | ❌ |
149
+
150
+ ## Test User Reference
151
+
152
+ | Role | Env var (email) | Env var (password) |
153
+ |------|----------------|-------------------|
154
+ | {Role 1} | `QA_USER_{ROLE}_EMAIL` | `QA_USER_{ROLE}_PASSWORD` |
155
+
156
+ **Notes**: {any conditional access rules, e.g., "Admin can only edit own records"}
157
+ ```
158
+
159
+ **Do NOT include**: actual email addresses, passwords, or personal identifiers.
160
+
161
+ ---
162
+
163
+ ### `04-test-data.md` — Test Data Requirements
164
+
165
+ **Format**:
166
+
167
+ ```markdown
168
+ # Test Data — {Submodule}
169
+
170
+ ## Prerequisites
171
+
172
+ The following data must exist in the QA environment before tests run:
173
+
174
+ | Item | Description | Source |
175
+ |------|-------------|--------|
176
+ | {entity} | {description} | QA seed / pre-existing |
177
+
178
+ ## Data shapes for key scenarios
179
+
180
+ ### Scenario: {happy path}
181
+ - Field A: {value type, e.g., "any valid text, max 100 chars"}
182
+ - Field B: {value type}
183
+ - User: role `{ROLE_NAME}`, credentials from `QA_USER_{ROLE}_EMAIL` env var
184
+
185
+ ### Scenario: {negative — duplicate}
186
+ - Precondition: {entity} with the same key already exists
187
+ - Field A: {same value as existing record}
188
+ - Expected: {system rejection behavior}
189
+
190
+ ## Dynamic data generation
191
+
192
+ For tests that create new records, use the EXEC_IDX pattern to avoid collisions:
193
+
194
+ ```typescript
195
+ const EXEC_IDX = Math.floor(Date.now() / 60_000) % 100_000;
196
+ const uniqueTitle = `Test-${EXEC_IDX}`;
197
+ ```
198
+
199
+ ## Data isolation rules
200
+
201
+ 1. Each test must operate on its own data (no shared mutable state between tests)
202
+ 2. Tests that require pre-existing data must provision it in `beforeAll`
203
+ 3. Provisioned data does not need to be cleaned up if EXEC_IDX-based names are used
204
+ ```
205
+
206
+ ---
207
+
208
+ ### `05-test-scenarios.md` — Test Cases
209
+
210
+ **Header block** (always required):
211
+
212
+ ```markdown
213
+ # Test Scenarios — {Module}: {Submodule}
214
+
215
+ **Module code**: {MODULE_CODE}
216
+ **Submodule code**: {SUBMODULE_CODE}
217
+ **Last updated**: YYYY-MM-DD
218
+
219
+ ## Summary
220
+
221
+ | Priority | Count | Automated | Manual |
222
+ |----------|-------|-----------|--------|
223
+ | P0 | {N} | {N} | {N} |
224
+ | P1 | {N} | {N} | {N} |
225
+ | P2 | {N} | {N} | {N} |
226
+ | P3 | {N} | {N} | {N} |
227
+ | **Total** | **{N}** | **{N}** | **{N}** |
228
+ ```
229
+
230
+ **Format for each test case**:
231
+
232
+ ```markdown
233
+ ### TC-{MODULE}-{SUBMODULE}-{NNN}: {TC Title}
234
+
235
+ | Field | Value |
236
+ |-------|-------|
237
+ | Priority | P0 / P1 / P2 / P3 |
238
+ | Type | Functional / Negative / Regression / Security / Integration |
239
+ | Origin | UI-OBSERVED / PENDING-CODE / BLOCKED-PERMISSIONS |
240
+ | Automation | Yes / Partial / No |
241
+ | Playwright | (leave blank until automation is written; then: `tests/{module}/file.spec.ts`) |
242
+
243
+ **Preconditions**:
244
+ - {precondition 1}
245
+
246
+ **Steps**:
247
+ 1. {step 1}
248
+ 2. {step 2}
249
+ 3. {step 3}
250
+
251
+ **Expected result**: {what should happen}
252
+
253
+ **Notes**: {any special considerations, DEF references, skip conditions}
254
+ ```
255
+
256
+ **Mandatory coverage categories** (must have at least 1 TC per category where applicable):
257
+
258
+ - [ ] Access: unauthenticated user redirected to login
259
+ - [ ] Access: role without permission receives error / empty page
260
+ - [ ] Happy path: primary workflow with valid data succeeds
261
+ - [ ] Negative: required field missing → validation error shown
262
+ - [ ] Negative: duplicate record → system rejects with error message
263
+ - [ ] Negative: invalid format → system rejects with format error
264
+ - [ ] State transition: state changes correctly on action
265
+ - [ ] Export / download: if feature exists, file is generated
266
+ - [ ] Pagination / search: if feature exists, filtering works correctly
267
+
268
+ ---
269
+
270
+ ## Common Anti-Patterns to Avoid
271
+
272
+ | Anti-pattern | Why it's wrong | Correct approach |
273
+ |---|---|---|
274
+ | TC for a feature not in QA env | Creates invalid test expectations | Mark as `PENDING-CODE`, don't write test steps |
275
+ | TC with a real user's DNI in steps | Security issue | Use env var reference |
276
+ | TC with "click the X button" without knowing the element exists | Assumes UI without observation | Verify element exists first |
277
+ | 100+ TCs per submodule by copy-pasting variations | Bloats the spec without value | Merge near-identical cases, use parameterization |
278
+ | TC with "verify system works correctly" as expected result | Untestable | Write observable, measurable expected result |
@@ -0,0 +1,202 @@
1
+ # Agent Instructions: Test Plan Generation
2
+
3
+ **File**: `agent-instructions/02-test-plan-generation.md`
4
+ **Purpose**: Instructions for generating a test plan document for a module, after its spec set is complete.
5
+
6
+ ---
7
+
8
+ ## When to use
9
+
10
+ - After all submodule specs (`05-test-scenarios.md`) are written and reviewed
11
+ - When preparing for a sprint or release
12
+ - When deciding which TCs to automate vs test manually
13
+
14
+ ---
15
+
16
+ ## Inputs Required
17
+
18
+ 1. `qa/01-specifications/module-{name}/` — all submodule specs
19
+ 2. Scope definition: which submodules are in this test plan
20
+ 3. Priority guidance (from the team or implied by sprint scope)
21
+
22
+ ---
23
+
24
+ ## Test Plan Document Structure
25
+
26
+ Create: `qa/02-test-plans/automated/{module}-test-plan.md`
27
+
28
+ ```markdown
29
+ # Test Plan: {Module Display Name}
30
+
31
+ | Field | Value |
32
+ |-------|-------|
33
+ | Version | 1.0 |
34
+ | Date | YYYY-MM-DD |
35
+ | Module | {module-code} |
36
+ | Test plan type | Automated / Manual / Combined |
37
+ | Author | {agent or human name} |
38
+ | Status | Draft / Approved / Active |
39
+
40
+ ---
41
+
42
+ ## 1. Objective
43
+
44
+ {1-2 sentences: what this test plan covers and why}
45
+
46
+ ---
47
+
48
+ ## 2. Scope
49
+
50
+ ### In scope
51
+ - {submodule 1}: {what is being tested}
52
+ - {submodule 2}: {what is being tested}
53
+
54
+ ### Out of scope
55
+ - {what is explicitly excluded and why}
56
+
57
+ ---
58
+
59
+ ## 3. Automation Feasibility Analysis
60
+
61
+ | Submodule | Total TCs | Fully automatable | Partially | Not automatable | Reason for exclusions |
62
+ |-----------|-----------|------------------|-----------|-----------------|----------------------|
63
+ | {name} | {N} | {N} ({%}) | {N} ({%}) | {N} ({%}) | {brief reason} |
64
+
65
+ **Definition**:
66
+ - **Fully automatable**: deterministic, observable, no external dependencies
67
+ - **Partially automatable**: some steps can be automated, others require manual verification
68
+ - **Not automatable**: requires human judgment, external system access, or is too risky to automate in QA
69
+
70
+ ---
71
+
72
+ ## 4. Priority Distribution
73
+
74
+ | Priority | TCs selected | Automated | Manual |
75
+ |----------|-------------|-----------|--------|
76
+ | P0 (Critical — must run every build) | {N} | {N} | {N} |
77
+ | P1 (High — must run before release) | {N} | {N} | {N} |
78
+ | P2 (Medium — periodic regression) | {N} | {N} | {N} |
79
+ | P3 (Low — manual only) | {N} | 0 | {N} |
80
+
81
+ ---
82
+
83
+ ## 5. TC Selection and Automation Plan
84
+
85
+ ### P0 Suite — {suite name}
86
+
87
+ | TC ID | Title | Type | Automation status |
88
+ |-------|-------|------|------------------|
89
+ | TC-{M}-{S}-001 | {title} | Functional | Queued |
90
+ | TC-{M}-{S}-002 | {title} | Negative | Queued |
91
+
92
+ ### P1 Suite — {suite name}
93
+
94
+ | TC ID | Title | Type | Automation status |
95
+ |-------|-------|------|------------------|
96
+ | TC-{M}-{S}-010 | {title} | Functional | Queued |
97
+
98
+ ---
99
+
100
+ ## 6. Azure DevOps Test Plan (if enabled)
101
+
102
+ | Item | Value |
103
+ |------|-------|
104
+ | ADO Plan ID | (populate after creation) |
105
+ | ADO Suite IDs | (populate after creation) |
106
+ | Reporter | @alex_neo/playwright-azure-reporter |
107
+ | Sync script | qa/08-azure-integration/scripts/inject-ado-ids.ps1 |
108
+
109
+ ---
110
+
111
+ ## 7. Test Environment
112
+
113
+ | Item | Value |
114
+ |------|-------|
115
+ | QA URL | {{QA_BASE_URL}} |
116
+ | Browser | Chromium (Playwright) |
117
+ | Workers (local) | {N from config} |
118
+ | Workers (CI) | {N from config} |
119
+ | Parallel sessions supported | Yes / No |
120
+
121
+ ---
122
+
123
+ ## 8. Risks and Assumptions
124
+
125
+ | Risk | Likelihood | Impact | Mitigation |
126
+ |------|-----------|--------|------------|
127
+ | Unstable QA data | Medium | High | Use EXEC_IDX-generated data |
128
+ | External service (email, etc.) not available | High | Medium | Use 3-layer validation strategy |
129
+ | QA env down-time | Low | High | Retry with 2h buffer in CI |
130
+
131
+ ---
132
+
133
+ ## 9. Excluded TCs
134
+
135
+ | TC ID | Reason for exclusion |
136
+ |-------|---------------------|
137
+ | TC-{M}-{S}-NNN | `BLOCKED-PERMISSIONS`: QA user cannot access |
138
+ | TC-{M}-{S}-NNN | `PENDING-CODE`: feature not yet deployed |
139
+ | TC-{M}-{S}-NNN | Not automatable: requires visual inspection / external access |
140
+
141
+ ---
142
+
143
+ ## 10. Execution Schedule
144
+
145
+ | Suite | Trigger | Frequency |
146
+ |-------|---------|-----------|
147
+ | P0 smoke | Every CI build | On push to main / PR |
148
+ | P1 regression | Scheduled | Nightly |
149
+ | P2 full regression | Manual trigger | Before each release |
150
+
151
+ ---
152
+
153
+ ## Changelog
154
+
155
+ | Version | Date | Description |
156
+ |---------|------|-------------|
157
+ | 1.0 | YYYY-MM-DD | Initial creation |
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Rules for Priority Assignment
163
+
164
+ Use this decision tree for each TC:
165
+
166
+ ```
167
+ Is this the primary happy path of the feature?
168
+ ├── YES → P0
169
+
170
+ Is a bug here a show-stopper or critical data corruption risk?
171
+ ├── YES → P0
172
+ ├── NO →
173
+ Is this a common negative scenario (empty required field, duplicate)?
174
+ ├── YES → P1
175
+ Is this a cross-module dependency or state machine transition?
176
+ ├── YES → P1
177
+ Is this a secondary feature (export, pagination, search)?
178
+ ├── YES → P2
179
+ Is this an edge case, cosmetic, or low-frequency scenario?
180
+ ├── YES → P3
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Automation Feasibility Decision Criteria
186
+
187
+ **Mark as fully automatable** when:
188
+ - All interactions are observable via browser automation
189
+ - The result is deterministic (same input → same output)
190
+ - No external systems are involved (live email server, payment gateway)
191
+ - Data can be set up programmatically
192
+
193
+ **Mark as partially automatable** when:
194
+ - Some result requires human visual inspection
195
+ - An external system is involved but can be mocked (email intercept, API stub)
196
+ - Data setup requires a manual step first
197
+
198
+ **Mark as not automatable** when:
199
+ - Requires physical access or real hardware
200
+ - Result is inherently non-deterministic (performance, visual design)
201
+ - Test would create irreversible side effects in QA environment (live invoice, real payment)
202
+ - The feature is blocked by permissions that cannot be granted to QA users
@@ -0,0 +1,147 @@
1
+ # Agent Instructions: Test Case Generation
2
+
3
+ **File**: `agent-instructions/03-test-case-generation.md`
4
+ **Purpose**: Instructions for writing detailed, standalone test case documents from approved spec scenarios.
5
+
6
+ ---
7
+
8
+ ## When to use
9
+
10
+ - When a TC from `05-test-scenarios.md` needs more detail than the table row provides
11
+ - When writing complex multi-step TCs that require dedicated documentation
12
+ - When preparing TCs for manual testers who need step-by-step instructions
13
+
14
+ ---
15
+
16
+ ## Test Case Template
17
+
18
+ ```markdown
19
+ # TC-{MODULE}-{SUBMODULE}-{NNN}: {TC Title}
20
+
21
+ | Field | Value |
22
+ |-------|-------|
23
+ | TC ID | TC-{MODULE}-{SUBMODULE}-{NNN} |
24
+ | Module | {Module display name} |
25
+ | Submodule | {Submodule display name} |
26
+ | Priority | P0 / P1 / P2 / P3 |
27
+ | Type | Functional / Negative / Regression / Security / Integration |
28
+ | Origin | UI-OBSERVED / PENDING-CODE / BLOCKED-PERMISSIONS |
29
+ | Observation date | YYYY-MM-DD |
30
+ | Automatable | Yes / Partial / No |
31
+ | Playwright file | (fill when automation is written) |
32
+ | Status | Draft / Approved / Automated / Deprecated |
33
+
34
+ ---
35
+
36
+ ## Objective
37
+
38
+ {1-2 sentences: what this test case verifies and why it matters}
39
+
40
+ ---
41
+
42
+ ## Preconditions
43
+
44
+ 1. User is logged in as **{role}**
45
+ 2. The following data exists in the QA environment:
46
+ - {item 1}: {description}
47
+ - {item 2}: {description}
48
+ 3. {any other system state requirement}
49
+
50
+ ---
51
+
52
+ ## Test Data
53
+
54
+ | Field | Value |
55
+ |-------|-------|
56
+ | {field name} | {value or generation rule} |
57
+ | {field name} | Use `EXEC_IDX`-generated value for uniqueness |
58
+ | User | Credentials from `QA_USER_{ROLE}_EMAIL` env var |
59
+
60
+ ---
61
+
62
+ ## Steps
63
+
64
+ | Step | Action | Expected result |
65
+ |------|--------|----------------|
66
+ | 1 | Navigate to {URL} | {page loads, specific element visible} |
67
+ | 2 | Click {element description} | {modal opens / form appears / etc.} |
68
+ | 3 | Fill {field} with {value} | {field accepts input} |
69
+ | 4 | Click {submit/save/confirm button} | {success message / redirect / state change} |
70
+ | 5 | Verify {observable outcome} | {specific text, element, state} |
71
+
72
+ ---
73
+
74
+ ## Expected Results
75
+
76
+ **Final state**: {what the system should look like after all steps are complete}
77
+
78
+ **Verification points**:
79
+ - [ ] {verification 1}: {element} should {state}
80
+ - [ ] {verification 2}: {element} should contain {text}
81
+ - [ ] {verification 3}: page/modal should transition to {expected state}
82
+
83
+ ---
84
+
85
+ ## Known Issues / Related Defects
86
+
87
+ | Issue | DEF-ID / ADO WI | Status | Impact on this TC |
88
+ |-------|----------------|--------|------------------|
89
+ | {description} | DEF-NNN | Open | TC skipped until resolved |
90
+
91
+ ---
92
+
93
+ ## Evidence
94
+
95
+ {Link to screenshot or video from execution, if available}
96
+
97
+ ---
98
+
99
+ ## Automation Notes
100
+
101
+ ```typescript
102
+ // Playwright selector for key element (discovered during implementation)
103
+ // page.locator('{selector}')
104
+
105
+ // Key assertion
106
+ // await expect(page.locator('{selector}')).toHaveText('{expected text}');
107
+ ```
108
+
109
+ ---
110
+
111
+ ## Changelog
112
+
113
+ | Version | Date | Author | Description |
114
+ |---------|------|--------|-------------|
115
+ | 1.0 | YYYY-MM-DD | {author} | Initial creation |
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Rules for TC Content Quality
121
+
122
+ ### Write measurable expected results
123
+
124
+ ❌ BAD: "The system should work correctly"
125
+ ✅ GOOD: "A success toast message 'Record saved' appears and the datatable row count increases by 1"
126
+
127
+ ❌ BAD: "The form validates the input"
128
+ ✅ GOOD: "A red validation message 'This field is required' appears below the Name field"
129
+
130
+ ### Write observable steps
131
+
132
+ ❌ BAD: "Add a new record with valid data"
133
+ ✅ GOOD: "Click the 'New' button. Fill 'Name' with 'Test-{EXEC_IDX}'. Click 'Save'."
134
+
135
+ ### Link to defects explicitly
136
+
137
+ If a TC is skipped due to a bug:
138
+ ✅ GOOD: "Step 4 — SKIPPED: DEF-001 (ADO #21944). The switch defaults to OFF when it should be ON. Reactivate after fix."
139
+
140
+ ### Priority guidelines recap
141
+
142
+ | Priority | Use when |
143
+ |---|---|
144
+ | P0 | Core feature is unusable without this working |
145
+ | P1 | Major functionality gap if this fails |
146
+ | P2 | Minor functionality gap, workaround exists |
147
+ | P3 | Edge case, cosmetic, or rare scenario |