@keber/qa-framework 1.7.2 → 1.9.0
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 +74 -0
- package/README.md +8 -7
- package/docs/folder-structure-guide.md +33 -25
- package/integrations/ado-powershell/README.md +34 -9
- package/integrations/ado-powershell/scripts/create-testplan-from-mapping.ps1 +24 -39
- package/package.json +1 -1
- package/scripts/init.js +50 -1
- package/scripts/upgrade.js +82 -1
- package/skills/qa-ado-integration/SKILL.md +22 -8
- package/skills/qa-test-cases/SKILL.md +90 -11
- package/skills/qa-test-plan/SKILL.md +115 -10
- package/skills/qa-test-plan/references/plan-de-pruebas-template.md +148 -0
- package/templates/automation-scaffold/package.json +1 -1
- package/templates/temp-script.ps1 +74 -0
- package/templates/test-plan-sprint.md +152 -0
- package/templates/test-plan.md +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -33,6 +33,80 @@ has been removed or parameterized. See `docs/comparison-matrix.md` and `docs/gen
|
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
+
## [1.9.0] - 2026-05-15
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- **`create-testplan-from-mapping.ps1` refactored** — removed all ADO-specific logic (auth headers,
|
|
41
|
+
`Invoke-RestMethod` calls, XML step construction). The script now delegates to `New-AdoTestCase`
|
|
42
|
+
and `Add-AdoTestCaseToSuite` from `@keber/ado-powershell`, keeping `qa-framework` free of
|
|
43
|
+
ADO implementation details. Requires `@keber/ado-powershell` ≥ 1.3.0.
|
|
44
|
+
- **Script parameters simplified** — `-OrgUrl`, `-ProjectName`, and `-Token` removed from
|
|
45
|
+
`create-testplan-from-mapping.ps1`. Caller is responsible for loading the ADO session via
|
|
46
|
+
`. .github/skills/ado-powershell/load.ps1` before invoking the script.
|
|
47
|
+
- **`tc-mapping.json` schema extended** — added optional `steps` (string array) and
|
|
48
|
+
`expectedResult` (string) fields per test case. When present, steps are sent to ADO as
|
|
49
|
+
`Microsoft.VSTS.TCM.Steps`; all steps except the last are `ActionStep`, the last is
|
|
50
|
+
`ValidateStep` with `expectedResult`.
|
|
51
|
+
- **`qa-ado-integration` SKILL.md updated** — Step 3 now specifies exactly how to parse the
|
|
52
|
+
Tabla de Pruebas columns (`Steps` split on `<br>`, strip numbering prefix) to produce
|
|
53
|
+
`tc-mapping.json` with steps.
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
|
|
57
|
+
- **Guard in `create-testplan-from-mapping.ps1`** — fails fast with a clear message if
|
|
58
|
+
`New-AdoTestCase` is not available (ADO session not loaded).
|
|
59
|
+
|
|
60
|
+
### Requires
|
|
61
|
+
|
|
62
|
+
- `@keber/ado-powershell` ≥ **1.3.0** — adds `$ExpectedResult` parameter to `New-AdoTestCase`
|
|
63
|
+
and `ValidateStep` support in the generated TCM steps XML.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## [1.8.0] - 2026-05-07
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- **Pipeline Stage 3 now produces "Plan de Pruebas"** — a single document per sprint+module
|
|
72
|
+
that combines test plan context (scope, strategy, preconditions, test data) with a full TC
|
|
73
|
+
table including numbered steps and expected results. Replaces the previous split between a
|
|
74
|
+
high-level plan and separate TC-{ID}.md files for most workflows.
|
|
75
|
+
- **Stage 4 (`qa-test-cases`) role redefined** — from "generate TC-{ID}.md files" to
|
|
76
|
+
"expand steps in Plan de Pruebas table when Stage 3 produced summary-level steps". Standalone
|
|
77
|
+
`TC-{ID}.md` files are now optional and used only for complex/reusable TCs.
|
|
78
|
+
- **ADO integration prerequisite updated** — `qa-ado-integration` now reads from
|
|
79
|
+
`Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md` (Tabla de Pruebas) instead of
|
|
80
|
+
`qa/03-test-cases/automated/`. Each module file → one ADO Test Suite; each table row → one
|
|
81
|
+
ADO Test Case with steps.
|
|
82
|
+
- **`02-test-plans/` restructured** — from flat `automated/` and `manual/` subdirectories to
|
|
83
|
+
`sprints/Sprint-{N}/` per-sprint structure. Both tracks share the same Plan de Pruebas document.
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- **`templates/test-plan-sprint.md`** — new primary Plan de Pruebas template. Includes header,
|
|
88
|
+
12 sections, and Tabla de Pruebas with column guide. Uses `{{PLACEHOLDERS}}` throughout.
|
|
89
|
+
- **`skills/qa-test-plan/references/plan-de-pruebas-template.md`** — full template with example
|
|
90
|
+
table rows, steps writing conventions, priority decision tree, and automation feasibility rules.
|
|
91
|
+
Replaces `references/priority-and-feasibility.md` (old file kept for reference, now legacy).
|
|
92
|
+
- **`upgrade` Section 6** — non-destructive migration of old `02-test-plans/` structure:
|
|
93
|
+
moves `automated/` → `sprints/legacy-automated/`, `manual/` → `sprints/legacy-manual/`, and
|
|
94
|
+
flat `.md` plan files → `sprints/legacy/`. Creates `03-test-cases/README.md` if missing.
|
|
95
|
+
|
|
96
|
+
### Deprecated
|
|
97
|
+
|
|
98
|
+
- **`templates/test-plan.md`** — use `templates/test-plan-sprint.md` instead.
|
|
99
|
+
Old file kept for reference; contains deprecation notice at top.
|
|
100
|
+
- **`02-test-plans/automated/` and `02-test-plans/manual/` subdirectory convention** —
|
|
101
|
+
replaced by `02-test-plans/sprints/Sprint-{N}/` per-sprint structure.
|
|
102
|
+
|
|
103
|
+
### Migration
|
|
104
|
+
|
|
105
|
+
Run `npx qa-framework upgrade`. Section 6 of the upgrade script handles the `02-test-plans/`
|
|
106
|
+
migration non-destructively: existing plan files are moved, not deleted.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
36
110
|
## [1.7.2] - 2026-05-06
|
|
37
111
|
|
|
38
112
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# qa-framework
|
|
2
2
|
|
|
3
3
|
> Reusable, installable, agent-oriented QA framework for spec-driven automated testing.
|
|
4
|
-
> Current version: **v1.
|
|
4
|
+
> Current version: **v1.9.0**
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -102,8 +102,8 @@ qa-framework/
|
|
|
102
102
|
├── skills/ <- Agent skills (3-layer model; copied to .github/skills/ on init)
|
|
103
103
|
│ ├── qa-module-analysis/ <- Stage 1: analyze a module, produce 6-file spec set
|
|
104
104
|
│ ├── qa-spec-generation/ <- Stage 2: generate/update the 6-file spec set
|
|
105
|
-
│ ├── qa-test-plan/ <- Stage 3:
|
|
106
|
-
│ ├── qa-test-cases/ <- Stage 4:
|
|
105
|
+
│ ├── qa-test-plan/ <- Stage 3: Plan de Pruebas (plan + TC table with steps)
|
|
106
|
+
│ ├── qa-test-cases/ <- Stage 4: expand steps in Plan de Pruebas table
|
|
107
107
|
│ ├── qa-automation/ <- Stage 5: implement Playwright automation
|
|
108
108
|
│ ├── qa-test-stabilization/ <- Stage 5b: stabilize failing tests
|
|
109
109
|
│ ├── qa-maintenance/ <- Stage 6: update artifacts after app changes
|
|
@@ -118,7 +118,8 @@ qa-framework/
|
|
|
118
118
|
│ │ ├── 03-roles-permissions.md
|
|
119
119
|
│ │ ├── 04-test-data.md
|
|
120
120
|
│ │ └── 05-test-scenarios.md
|
|
121
|
-
│ ├── test-plan.md
|
|
121
|
+
│ ├── test-plan-sprint.md <- Plan de Pruebas template (v1.7.0+, primary)
|
|
122
|
+
│ ├── test-plan.md <- Legacy test plan template (deprecated)
|
|
122
123
|
│ ├── test-case.md
|
|
123
124
|
│ ├── execution-report.md
|
|
124
125
|
│ ├── defect-report.md
|
|
@@ -233,12 +234,12 @@ Skills map to the pipeline stages enforced by `.github/instructions/qa-framework
|
|
|
233
234
|
|---|---|---|---|---|
|
|
234
235
|
| 1 | `qa-module-analysis` | Analyze module, produce 6-file spec set | Both | None |
|
|
235
236
|
| 2 | `qa-spec-generation` | Generate/update 6-file spec set | Both | `00-inventory.md` exists |
|
|
236
|
-
| 3 | `qa-test-plan` | Generate
|
|
237
|
-
| 4 | `qa-test-cases` |
|
|
237
|
+
| 3 | `qa-test-plan` | Generate Plan de Pruebas (plan + TC table with steps) | Both | `05-test-scenarios.md` exists |
|
|
238
|
+
| 4 | `qa-test-cases` | Expand steps in Plan de Pruebas table | Both (optional) | Plan de Pruebas exists |
|
|
238
239
|
| 5 | `qa-automation` | Implement Playwright tests | Automation | Specs approved, no PENDING-CODE |
|
|
239
240
|
| 5b | `qa-test-stabilization` | Stabilize failing tests | Automation | Failing tests exist |
|
|
240
241
|
| 6 | `qa-maintenance` | Update artifacts after app changes | Both | Delivered change |
|
|
241
|
-
| - | `qa-ado-integration` | Sync with Azure DevOps Test Plans | Both |
|
|
242
|
+
| - | `qa-ado-integration` | Sync with Azure DevOps Test Plans | Both | Plan de Pruebas with steps exists |
|
|
242
243
|
|
|
243
244
|
See [docs/skills-architecture.md](docs/skills-architecture.md) for the full design rationale.
|
|
244
245
|
|
|
@@ -17,7 +17,7 @@ qa/
|
|
|
17
17
|
│
|
|
18
18
|
├── 00-standards/ ← Naming conventions and artifact templates
|
|
19
19
|
├── 01-specifications/ ← Functional specifications per module
|
|
20
|
-
├── 02-test-plans/ ←
|
|
20
|
+
├── 02-test-plans/ ← Plan de Pruebas per sprint/module (plan + TC table + steps)
|
|
21
21
|
├── 03-test-cases/ ← Standalone test case documents
|
|
22
22
|
├── 04-test-data/ ← Test data definitions and factories
|
|
23
23
|
├── 05-test-execution/ ← Execution reports and results
|
|
@@ -42,8 +42,8 @@ two tracks that can run in parallel or independently depending on team maturity.
|
|
|
42
42
|
├─── Automation track ──────────────────────────────────────────────────
|
|
43
43
|
│ │
|
|
44
44
|
│ ▼
|
|
45
|
-
│ 02-test-plans/
|
|
46
|
-
│ │
|
|
45
|
+
│ 02-test-plans/sprints/Sprint-{N}/ ← Plan de Pruebas (plan + TC table + steps)
|
|
46
|
+
│ │ Stage 4 expands steps if needed
|
|
47
47
|
│ ▼
|
|
48
48
|
│ 07-automation/e2e/tests/ ← Playwright .spec.ts files
|
|
49
49
|
│ │
|
|
@@ -56,16 +56,17 @@ two tracks that can run in parallel or independently depending on team maturity.
|
|
|
56
56
|
└─── Manual track ──────────────────────────────────────────────────────
|
|
57
57
|
│
|
|
58
58
|
▼
|
|
59
|
-
02-test-plans/
|
|
59
|
+
02-test-plans/sprints/Sprint-{N}/ ← same Plan de Pruebas (shared artifact)
|
|
60
60
|
│
|
|
61
61
|
▼
|
|
62
|
-
03-test-cases/
|
|
62
|
+
03-test-cases/ (optional) ← standalone TC-*.md for complex/reusable TCs
|
|
63
63
|
│
|
|
64
64
|
▼
|
|
65
65
|
05-test-execution/manual/ ← manual run evidence
|
|
66
66
|
│
|
|
67
67
|
▼
|
|
68
68
|
08-azure-integration/ ← ADO sync via ado-integration skill
|
|
69
|
+
(reads Plan de Pruebas, creates TCs with steps)
|
|
69
70
|
```
|
|
70
71
|
|
|
71
72
|
**Entry points:**
|
|
@@ -158,43 +159,50 @@ Each skill folder contains:
|
|
|
158
159
|
|
|
159
160
|
## 02-test-plans/
|
|
160
161
|
|
|
161
|
-
**Purpose**:
|
|
162
|
+
**Purpose**: Plan de Pruebas documents per sprint and module. Each document combines test plan context (scope, strategy, preconditions) with a detailed test case table including numbered steps. This is the primary artifact for both the automation track and ADO integration.
|
|
162
163
|
|
|
163
164
|
```
|
|
164
165
|
02-test-plans/
|
|
165
166
|
├── README.md
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
└── exploratory/
|
|
171
|
-
└── {module}-exploratory-session.md
|
|
167
|
+
└── sprints/
|
|
168
|
+
└── Sprint-{NNN}/
|
|
169
|
+
├── Plan-de-Pruebas-{proyecto}-Sprint-{NNN}-{modulo}.md ← one per module
|
|
170
|
+
└── Plan-de-Pruebas-{proyecto}-Sprint-{NNN}.md ← consolidado (generated by @keber/ado-qa, not by agent)
|
|
172
171
|
```
|
|
173
172
|
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
|
|
179
|
-
|
|
173
|
+
**Naming convention**: `Plan-de-Pruebas-{proyecto}-Sprint-{NNN}-{modulo}.md`
|
|
174
|
+
- `{proyecto}` = `project.name` from `qa-framework.config.json`
|
|
175
|
+
- `{NNN}` = zero-padded sprint number (e.g., `040`)
|
|
176
|
+
- `{modulo}` = module code from specs (e.g., `RCL-Casino`, `ARCF`)
|
|
177
|
+
|
|
178
|
+
**What each Plan de Pruebas contains**:
|
|
179
|
+
- Header (project, sprint, dates, ADO Test Plan link)
|
|
180
|
+
- Scope, strategy, preconditions, test data
|
|
181
|
+
- **Tabla de Pruebas**: TC-ID | Suite | Título | Descripción | Steps (numbered `<br>`-separated) | Resultado Esperado | Confirma (Task ID or N/A) | Tipo | Prioridad
|
|
182
|
+
- Matriz de trazabilidad (Task ↔ N)
|
|
183
|
+
- Automation notes
|
|
184
|
+
|
|
185
|
+
**Legacy migration**: `upgrade` Section 6 moves `automated/` and `manual/` subdirectories to `sprints/legacy-*` non-destructively.
|
|
180
186
|
|
|
181
187
|
---
|
|
182
188
|
|
|
183
189
|
## 03-test-cases/
|
|
184
190
|
|
|
185
|
-
**Purpose**:
|
|
191
|
+
**Purpose**: Optional standalone test case documents for complex or reusable TCs.
|
|
186
192
|
|
|
187
|
-
|
|
193
|
+
> **Note (v1.7.0+)**: The primary test case artifact is the Tabla de Pruebas inside each Plan de Pruebas (`02-test-plans/sprints/`). This folder is for edge cases where a TC is too complex to fit in a table row, or where a TC is shared across multiple sprints unchanged.
|
|
188
194
|
|
|
189
195
|
```
|
|
190
196
|
03-test-cases/
|
|
191
|
-
├── README.md
|
|
192
|
-
|
|
193
|
-
│ └── TC-{ID}-{title}.md
|
|
194
|
-
└── manual/
|
|
195
|
-
└── TC-{ID}-{title}.md
|
|
197
|
+
├── README.md ← explains optional/legacy status
|
|
198
|
+
└── TC-{ID}-{title}.md
|
|
196
199
|
```
|
|
197
200
|
|
|
201
|
+
**When to create standalone TCs here**:
|
|
202
|
+
- TC requires multi-role, multi-session, or multi-system steps that don't fit a table row
|
|
203
|
+
- TC is reused across multiple sprints with no changes (cross-reference from Plan de Pruebas table)
|
|
204
|
+
- Legacy TCs migrated from pre-v1.7.0 structure
|
|
205
|
+
|
|
198
206
|
---
|
|
199
207
|
|
|
200
208
|
## 04-test-data/
|
|
@@ -15,19 +15,20 @@ All scripts are parameterized and project-agnostic.
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
17
17
|
- PowerShell 7+ (recommended) or Windows PowerShell 5.1
|
|
18
|
-
-
|
|
19
|
-
- PAT
|
|
18
|
+
- `@keber/ado-powershell` skill installed and loaded (provides `New-AdoTestCase`, `Add-AdoTestCaseToSuite`, etc.)
|
|
19
|
+
- Azure DevOps Personal Access Token (PAT) with `Work Items: Read & Write` and `Test Management: Read & Write` scopes
|
|
20
|
+
- PAT and org/project set as env vars: `ADO_PAT`, `ADO_ORG`, `ADO_PROJECT`
|
|
20
21
|
|
|
21
22
|
## Quick start
|
|
22
23
|
|
|
23
24
|
```powershell
|
|
24
|
-
#
|
|
25
|
+
# 0. Load the ADO skill (initialises session from env vars)
|
|
26
|
+
. .github/skills/ado-powershell/load.ps1
|
|
27
|
+
|
|
28
|
+
# 1. Create Test Cases in ADO from tc-mapping.json
|
|
25
29
|
.\scripts\create-testplan-from-mapping.ps1 `
|
|
26
|
-
-OrgUrl "https://dev.azure.com/your-org" `
|
|
27
|
-
-ProjectName "YourProject" `
|
|
28
30
|
-PlanId 22304 `
|
|
29
|
-
-MappingFile "qa/08-azure-integration/tc-mapping.json"
|
|
30
|
-
-Token $env:AZURE_TOKEN
|
|
31
|
+
-MappingFile "qa/08-azure-integration/tc-mapping.json"
|
|
31
32
|
|
|
32
33
|
# 2. Inject ADO IDs into spec files (idempotent)
|
|
33
34
|
.\scripts\inject-ado-ids.ps1 `
|
|
@@ -59,12 +60,36 @@ npx playwright test
|
|
|
59
60
|
"planId": 22304,
|
|
60
61
|
"suiteId": 22305,
|
|
61
62
|
"testCases": [
|
|
62
|
-
{
|
|
63
|
-
|
|
63
|
+
{
|
|
64
|
+
"localId": "TC-SUP-CR-001",
|
|
65
|
+
"title": "Create supplier @P0",
|
|
66
|
+
"specFile": "suppliers/create.spec.ts",
|
|
67
|
+
"steps": [
|
|
68
|
+
"Navigate to /suppliers/new",
|
|
69
|
+
"Fill in required fields: Name, RUT, Email",
|
|
70
|
+
"Click 'Save'"
|
|
71
|
+
],
|
|
72
|
+
"expectedResult": "Supplier is created and appears in the list with status Active"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"localId": "TC-SUP-CR-002",
|
|
76
|
+
"title": "Create supplier - required fields @P0",
|
|
77
|
+
"specFile": "suppliers/create.spec.ts",
|
|
78
|
+
"steps": [
|
|
79
|
+
"Navigate to /suppliers/new",
|
|
80
|
+
"Leave required fields empty",
|
|
81
|
+
"Click 'Save'"
|
|
82
|
+
],
|
|
83
|
+
"expectedResult": "Validation errors appear for each required field; record is not saved"
|
|
84
|
+
}
|
|
64
85
|
]
|
|
65
86
|
}
|
|
66
87
|
```
|
|
67
88
|
|
|
89
|
+
> **`steps`** (optional): Array of step strings. Each entry becomes one ADO step. All steps except the last are `ActionStep`; the last is `ValidateStep` and receives `expectedResult`.
|
|
90
|
+
> **`expectedResult`** (optional): Overall expected result, applied to the last step. If omitted, the last step has an empty expected result.
|
|
91
|
+
> If `steps` is absent or empty, the Test Case is created with title only (no steps).
|
|
92
|
+
|
|
68
93
|
## File: ado-ids.json (output after create-testplan)
|
|
69
94
|
|
|
70
95
|
```json
|
|
@@ -7,17 +7,16 @@
|
|
|
7
7
|
corresponding Test Case Work Items in a specified ADO Test Plan/Suite.
|
|
8
8
|
Outputs ado-ids.json with the resulting WI IDs for use by inject-ado-ids.ps1.
|
|
9
9
|
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
.
|
|
14
|
-
ADO project name.
|
|
10
|
+
Requires an active ADO session. Call:
|
|
11
|
+
. .github/skills/ado-powershell/load.ps1
|
|
12
|
+
before running this script. The session is initialised automatically by
|
|
13
|
+
load.ps1 when ADO_ORG, ADO_PROJECT and ADO_PAT env vars are set.
|
|
15
14
|
|
|
16
15
|
.PARAMETER PlanId
|
|
17
16
|
ADO Test Plan ID.
|
|
18
17
|
|
|
19
18
|
.PARAMETER SuiteId
|
|
20
|
-
ADO Test Suite ID. If omitted, uses the
|
|
19
|
+
ADO Test Suite ID. If omitted, uses the suiteId from tc-mapping.json.
|
|
21
20
|
|
|
22
21
|
.PARAMETER MappingFile
|
|
23
22
|
Path to tc-mapping.json input file.
|
|
@@ -25,43 +24,33 @@
|
|
|
25
24
|
.PARAMETER OutputFile
|
|
26
25
|
Path to write ado-ids.json output. Default: ado-ids.json in same dir as MappingFile.
|
|
27
26
|
|
|
28
|
-
.PARAMETER Token
|
|
29
|
-
ADO Personal Access Token. Prefer passing via $env:AZURE_TOKEN.
|
|
30
|
-
|
|
31
27
|
.EXAMPLE
|
|
28
|
+
. .github/skills/ado-powershell/load.ps1
|
|
32
29
|
.\create-testplan-from-mapping.ps1 `
|
|
33
|
-
-OrgUrl "https://dev.azure.com/your-org" `
|
|
34
|
-
-ProjectName "YourProject" `
|
|
35
30
|
-PlanId 22304 `
|
|
36
|
-
-MappingFile "qa/08-azure-integration/tc-mapping.json"
|
|
37
|
-
-Token $env:AZURE_TOKEN
|
|
31
|
+
-MappingFile "qa/08-azure-integration/tc-mapping.json"
|
|
38
32
|
#>
|
|
39
33
|
[CmdletBinding(SupportsShouldProcess)]
|
|
40
34
|
param(
|
|
41
|
-
[Parameter(Mandatory)] [string] $OrgUrl,
|
|
42
|
-
[Parameter(Mandatory)] [string] $ProjectName,
|
|
43
35
|
[Parameter(Mandatory)] [int] $PlanId,
|
|
44
36
|
[int] $SuiteId = 0,
|
|
45
37
|
[Parameter(Mandatory)] [string] $MappingFile,
|
|
46
|
-
[string] $OutputFile = ''
|
|
47
|
-
[Parameter(Mandatory)] [string] $Token
|
|
38
|
+
[string] $OutputFile = ''
|
|
48
39
|
)
|
|
49
40
|
|
|
50
41
|
Set-StrictMode -Version Latest
|
|
51
42
|
$ErrorActionPreference = 'Stop'
|
|
52
43
|
|
|
53
|
-
#
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
'Content-Type' = 'application/json'
|
|
44
|
+
# Verify ADO session is available
|
|
45
|
+
if (-not (Get-Command 'New-AdoTestCase' -ErrorAction SilentlyContinue)) {
|
|
46
|
+
Write-Error "ADO session not loaded. Run: . .github/skills/ado-powershell/load.ps1"
|
|
47
|
+
exit 1
|
|
58
48
|
}
|
|
59
49
|
|
|
60
50
|
# Load mapping
|
|
61
51
|
if (-not (Test-Path $MappingFile)) { Write-Error "Not found: $MappingFile"; exit 1 }
|
|
62
52
|
$mapping = Get-Content $MappingFile -Raw | ConvertFrom-Json
|
|
63
53
|
|
|
64
|
-
$apiBase = "$OrgUrl/$ProjectName/_apis"
|
|
65
54
|
$suiteId = if ($SuiteId -gt 0) { $SuiteId } else { $mapping.suiteId }
|
|
66
55
|
|
|
67
56
|
Write-Host "[create-testplan] Creating $($mapping.testCases.Count) test cases in Plan $PlanId / Suite $suiteId"
|
|
@@ -69,29 +58,25 @@ Write-Host "[create-testplan] Creating $($mapping.testCases.Count) test cases in
|
|
|
69
58
|
$results = @()
|
|
70
59
|
|
|
71
60
|
foreach ($tc in $mapping.testCases) {
|
|
72
|
-
$
|
|
73
|
-
|
|
74
|
-
path = '/fields/System.Title'
|
|
75
|
-
value = "[$($tc.localId)] $($tc.title)"
|
|
76
|
-
} | ConvertTo-Json -AsArray
|
|
77
|
-
|
|
78
|
-
$createUrl = "$apiBase/wit/workitems/`$Test Case?api-version=7.1"
|
|
61
|
+
$steps = if ($tc.PSObject.Properties['steps']) { $tc.steps } else { @() }
|
|
62
|
+
$expectedResult = if ($tc.PSObject.Properties['expectedResult']) { $tc.expectedResult } else { '' }
|
|
79
63
|
|
|
80
64
|
if ($PSCmdlet.ShouldProcess($tc.localId, "Create ADO Test Case")) {
|
|
81
65
|
try {
|
|
82
|
-
$
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
66
|
+
$splatArgs = @{
|
|
67
|
+
Title = "[$($tc.localId)] $($tc.title)"
|
|
68
|
+
Confirm = $false
|
|
69
|
+
}
|
|
70
|
+
if ($steps.Count -gt 0) {
|
|
71
|
+
$splatArgs.Steps = $steps
|
|
72
|
+
$splatArgs.ExpectedResult = $expectedResult
|
|
73
|
+
}
|
|
87
74
|
|
|
75
|
+
$wi = New-AdoTestCase @splatArgs
|
|
88
76
|
$wiId = $wi.id
|
|
89
77
|
Write-Host " [CREATED] $($tc.localId) → WI #$wiId"
|
|
90
78
|
|
|
91
|
-
|
|
92
|
-
$suiteUrl = "$apiBase/testplan/Plans/$PlanId/Suites/$suiteId/TestCase?api-version=7.1"
|
|
93
|
-
$suiteBody = @(@{ workItem = @{ id = $wiId } }) | ConvertTo-Json
|
|
94
|
-
Invoke-RestMethod -Method Post -Uri $suiteUrl -Headers $headers -Body $suiteBody | Out-Null
|
|
79
|
+
Add-AdoTestCaseToSuite -PlanId $PlanId -SuiteId $suiteId -TestCaseIds @($wiId) -Confirm:$false
|
|
95
80
|
|
|
96
81
|
$results += [PSCustomObject]@{
|
|
97
82
|
localId = $tc.localId
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keber/qa-framework",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Reusable spec-driven QA framework for IDE-agent-assisted automated testing. Installable as an npm package. Provides structure, templates, agent instructions, and optional integrations for Playwright and Azure DevOps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"qa",
|
package/scripts/init.js
CHANGED
|
@@ -79,7 +79,7 @@ process.stderr.write(`[qa-framework/init] Using config source: ${configSource}\n
|
|
|
79
79
|
const topLevelFolders = [
|
|
80
80
|
'00-standards',
|
|
81
81
|
'01-specifications',
|
|
82
|
-
'02-test-plans',
|
|
82
|
+
'02-test-plans/sprints',
|
|
83
83
|
'03-test-cases',
|
|
84
84
|
'04-test-data',
|
|
85
85
|
'05-test-execution',
|
|
@@ -124,6 +124,21 @@ writeIfMissing(path.join(memoryDir, 'INDEX.md'),
|
|
|
124
124
|
_No memory files yet. Add files to this directory and register them above._
|
|
125
125
|
`);
|
|
126
126
|
|
|
127
|
+
// --- 03-test-cases README (optional directory marker) ---
|
|
128
|
+
writeIfMissing(path.join(qaRoot, '03-test-cases', 'README.md'),
|
|
129
|
+
`# 03-test-cases/ — Optional Standalone Test Cases
|
|
130
|
+
|
|
131
|
+
> **v1.7.0+:** The primary location for test cases (with detailed steps) is now
|
|
132
|
+
> \`qa/02-test-plans/sprints/Sprint-{N}/Plan-de-Pruebas-{project}-Sprint-{N}-{module}.md\`.
|
|
133
|
+
>
|
|
134
|
+
> Use this directory only for test cases that are:
|
|
135
|
+
> - Too complex to fit in a table row (multi-scenario, multi-role)
|
|
136
|
+
> - Reused across multiple sprints without change
|
|
137
|
+
> - Required as standalone documents for audit or external review
|
|
138
|
+
>
|
|
139
|
+
> Naming: \`TC-{MODULE}-{SUBMODULE}-{NNN}-{slug}.md\`
|
|
140
|
+
`);
|
|
141
|
+
|
|
127
142
|
// --- Standards placeholder ---
|
|
128
143
|
const stdDir = path.join(qaRoot, '00-standards');
|
|
129
144
|
writeIfMissing(path.join(stdDir, 'naming-conventions.md'), `# Naming Conventions\n\n> Fill in per your project. See keber/qa-framework docs/spec-driven-philosophy.md.\n`);
|
|
@@ -326,6 +341,40 @@ cd qa/07-automation/e2e && npm install && npx playwright install chromium
|
|
|
326
341
|
const nextStepsPath = path.join(qaRoot, 'AGENT-NEXT-STEPS.md');
|
|
327
342
|
writeIfMissing(nextStepsPath, nextStepsContent);
|
|
328
343
|
|
|
344
|
+
// --- Print post-install summary ---
|
|
345
|
+
const playwrightInstalled = fs.existsSync(path.join(cwd, 'node_modules', '@playwright', 'test'));
|
|
346
|
+
const adoQaInstalledFinal = fs.existsSync(path.join(cwd, 'node_modules', '@keber', 'ado-qa'));
|
|
347
|
+
const azureReporterInstalled = fs.existsSync(path.join(cwd, 'node_modules', '@alex_neo', 'playwright-azure-reporter'));
|
|
348
|
+
|
|
349
|
+
console.log('');
|
|
350
|
+
console.log(' @keber/qa-framework — scaffold complete');
|
|
351
|
+
console.log(' ----------------------------------------');
|
|
352
|
+
console.log(' Installed:');
|
|
353
|
+
console.log(' qa/ QA directory structure + spec templates');
|
|
354
|
+
console.log(' .github/skills/ QA agent skills (8 stages)');
|
|
355
|
+
console.log(' .github/instructions/ qa-framework.instructions.md');
|
|
356
|
+
console.log('');
|
|
357
|
+
console.log(' Optional integrations:');
|
|
358
|
+
if (playwrightInstalled) {
|
|
359
|
+
console.log(' [ok] Playwright @playwright/test');
|
|
360
|
+
} else {
|
|
361
|
+
console.log(' [ ] Playwright npm install @playwright/test');
|
|
362
|
+
console.log(' cd qa/07-automation/e2e && npm install && npx playwright install chromium');
|
|
363
|
+
}
|
|
364
|
+
if (adoQaInstalledFinal) {
|
|
365
|
+
console.log(' [ok] ADO integration @keber/ado-qa');
|
|
366
|
+
} else {
|
|
367
|
+
console.log(' [ ] ADO integration npm install @keber/ado-qa');
|
|
368
|
+
}
|
|
369
|
+
if (azureReporterInstalled) {
|
|
370
|
+
console.log(' [ok] ADO Playwright reporter (installed)');
|
|
371
|
+
} else {
|
|
372
|
+
console.log(' [ ] ADO Playwright reporter npm install @alex_neo/playwright-azure-reporter');
|
|
373
|
+
}
|
|
374
|
+
console.log('');
|
|
375
|
+
console.log(' Next: edit qa/qa-framework.config.json, then read qa/AGENT-NEXT-STEPS.md');
|
|
376
|
+
console.log('');
|
|
377
|
+
|
|
329
378
|
// -----------------------------------------------------------------------
|
|
330
379
|
// Helpers
|
|
331
380
|
// -----------------------------------------------------------------------
|
package/scripts/upgrade.js
CHANGED
|
@@ -20,7 +20,14 @@
|
|
|
20
20
|
* - qa/07-automation/fixtures/ -> qa/07-automation/e2e/fixtures/
|
|
21
21
|
* - qa/07-automation/e2e/{module}/ -> qa/07-automation/e2e/tests/{module}/
|
|
22
22
|
* - Creates integration/ and load/ placeholders * - Patches playwright.config.ts: testDir '.' -> './tests', adds testIgnore
|
|
23
|
-
* - Creates tests/helpers/debug/ and tests/seeds/ if absent
|
|
23
|
+
* - Creates tests/helpers/debug/ and tests/seeds/ if absent
|
|
24
|
+
*
|
|
25
|
+
* MIGRATES (v1.6.x -> v1.7.0, non-destructive):
|
|
26
|
+
* - qa/02-test-plans/automated/ -> qa/02-test-plans/sprints/legacy-automated/
|
|
27
|
+
* - qa/02-test-plans/manual/ -> qa/02-test-plans/sprints/legacy-manual/
|
|
28
|
+
* - qa/02-test-plans/*.md -> qa/02-test-plans/sprints/legacy/
|
|
29
|
+
* - Creates qa/02-test-plans/sprints/ if absent
|
|
30
|
+
* - Creates qa/03-test-cases/README.md optional marker if absent *
|
|
24
31
|
* NEVER touches (project-owned):
|
|
25
32
|
* - qa/01-specifications/ <- Your specs
|
|
26
33
|
* - qa/02-test-plans/ <- Your test plans
|
|
@@ -265,6 +272,80 @@ for (const subdir of ['tests/helpers/debug', 'tests/seeds']) {
|
|
|
265
272
|
}
|
|
266
273
|
}
|
|
267
274
|
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
// 6. Migration v1.6.x -> v1.7.0: restructure qa/02-test-plans/
|
|
277
|
+
// Safe: only moves files when source exists and destination does NOT.
|
|
278
|
+
// automated/ -> sprints/legacy-automated/
|
|
279
|
+
// manual/ -> sprints/legacy-manual/
|
|
280
|
+
// *.md flat -> sprints/legacy/
|
|
281
|
+
// ---------------------------------------------------------------------------
|
|
282
|
+
const testPlansDir = path.join(qaRoot, '02-test-plans');
|
|
283
|
+
const sprintsDir = path.join(testPlansDir, 'sprints');
|
|
284
|
+
|
|
285
|
+
if (fs.existsSync(testPlansDir)) {
|
|
286
|
+
const legacySubdirs = ['automated', 'manual'];
|
|
287
|
+
for (const sub of legacySubdirs) {
|
|
288
|
+
const oldDir = path.join(testPlansDir, sub);
|
|
289
|
+
const newDir = path.join(sprintsDir, `legacy-${sub}`);
|
|
290
|
+
if (fs.existsSync(oldDir) && !fs.existsSync(newDir)) {
|
|
291
|
+
if (!dryRun) {
|
|
292
|
+
fs.mkdirSync(sprintsDir, { recursive: true });
|
|
293
|
+
fs.renameSync(oldDir, newDir);
|
|
294
|
+
}
|
|
295
|
+
updated.push(newDir);
|
|
296
|
+
console.log(` [migrated] 02-test-plans/${sub}/ -> 02-test-plans/sprints/legacy-${sub}/`);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Move any .md files sitting flat in 02-test-plans/ (not in sprints/)
|
|
301
|
+
if (fs.existsSync(testPlansDir)) {
|
|
302
|
+
const legacyDir = path.join(sprintsDir, 'legacy');
|
|
303
|
+
for (const entry of fs.readdirSync(testPlansDir, { withFileTypes: true })) {
|
|
304
|
+
if (!entry.isFile() || !entry.name.endsWith('.md')) continue;
|
|
305
|
+
const oldFile = path.join(testPlansDir, entry.name);
|
|
306
|
+
const newFile = path.join(legacyDir, entry.name);
|
|
307
|
+
if (!fs.existsSync(newFile)) {
|
|
308
|
+
if (!dryRun) {
|
|
309
|
+
fs.mkdirSync(legacyDir, { recursive: true });
|
|
310
|
+
fs.renameSync(oldFile, newFile);
|
|
311
|
+
}
|
|
312
|
+
updated.push(newFile);
|
|
313
|
+
console.log(` [migrated] 02-test-plans/${entry.name} -> 02-test-plans/sprints/legacy/${entry.name}`);
|
|
314
|
+
} else {
|
|
315
|
+
warnings.push(`Cannot migrate 02-test-plans/${entry.name} — target already exists. Move manually.`);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Ensure sprints/ exists
|
|
321
|
+
if (!fs.existsSync(sprintsDir)) {
|
|
322
|
+
if (!dryRun) fs.mkdirSync(sprintsDir, { recursive: true });
|
|
323
|
+
updated.push(sprintsDir);
|
|
324
|
+
console.log(` [created] 02-test-plans/sprints/`);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// Ensure 03-test-cases/README.md exists (optional marker)
|
|
329
|
+
const testCasesReadme = path.join(qaRoot, '03-test-cases', 'README.md');
|
|
330
|
+
if (!fs.existsSync(testCasesReadme)) {
|
|
331
|
+
if (!dryRun) {
|
|
332
|
+
fs.mkdirSync(path.dirname(testCasesReadme), { recursive: true });
|
|
333
|
+
fs.writeFileSync(testCasesReadme,
|
|
334
|
+
'# 03-test-cases/ — Optional Standalone Test Cases\n\n' +
|
|
335
|
+
'> **v1.7.0+:** The primary location for test cases (with detailed steps) is now\n' +
|
|
336
|
+
'> `qa/02-test-plans/sprints/Sprint-{N}/Plan-de-Pruebas-{project}-Sprint-{N}-{module}.md`.\n' +
|
|
337
|
+
'>\n' +
|
|
338
|
+
'> Use this directory only for test cases that are:\n' +
|
|
339
|
+
'> - Too complex to fit in a table row (multi-scenario, multi-role)\n' +
|
|
340
|
+
'> - Reused across multiple sprints without change\n' +
|
|
341
|
+
'> - Required as standalone documents for audit or external review\n' +
|
|
342
|
+
'>\n' +
|
|
343
|
+
'> Naming: `TC-{MODULE}-{SUBMODULE}-{NNN}-{slug}.md`\n', 'utf8');
|
|
344
|
+
}
|
|
345
|
+
updated.push(testCasesReadme);
|
|
346
|
+
console.log(` [created] 03-test-cases/README.md`);
|
|
347
|
+
}
|
|
348
|
+
|
|
268
349
|
// ---------------------------------------------------------------------------
|
|
269
350
|
// Summary
|
|
270
351
|
// ---------------------------------------------------------------------------
|
|
@@ -12,22 +12,26 @@ description: >
|
|
|
12
12
|
|
|
13
13
|
# QA Skill: ADO Integration (Optional Stage)
|
|
14
14
|
|
|
15
|
-
**Stage**: Optional — ADO Integration (no pipeline order dependency)
|
|
16
|
-
**Prerequisite**:
|
|
17
|
-
**Output**: ADO Test Plan populated + `qa/08-azure-integration/module-registry.json` updated
|
|
18
|
-
**Use any time** after Stage
|
|
15
|
+
**Stage**: Optional — ADO Integration (no pipeline order dependency)
|
|
16
|
+
**Prerequisite**: `Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md` exists with a complete Tabla de Pruebas (steps filled in); valid `ADO_PAT` env var
|
|
17
|
+
**Output**: ADO Test Plan populated with Test Suites and Test Cases (with steps) + `qa/08-azure-integration/module-registry.json` updated
|
|
18
|
+
**Use any time** after Stage 3 (Plan de Pruebas) is ready — Stage 4 and 5 are not required
|
|
19
19
|
|
|
20
20
|
> **Credential rule**: NEVER hardcode PAT, username, or organization URL in any file. Always read from env vars or `<PLACEHOLDER>` in documentation.
|
|
21
|
+
> **Steps rule**: ADO Test Cases must have steps. Do not sync TCs from a Plan de Pruebas with empty or summary-only steps — run Stage 4 first to expand them.
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
24
25
|
## Inputs Required
|
|
25
26
|
|
|
26
27
|
1. `qa/qa-framework.config.json` — ADO org URL, project name, test plan ID (or "create new")
|
|
27
|
-
2. `qa/
|
|
28
|
+
2. `qa/02-test-plans/sprints/Sprint-{N}/Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md` — one file per module; each file's Tabla de Pruebas becomes one Test Suite in ADO
|
|
28
29
|
3. `ADO_PAT` environment variable — personal access token with Test Plans read/write
|
|
29
30
|
4. Optionally: `qa/08-azure-integration/module-registry.json` for existing ID mapping
|
|
30
31
|
|
|
32
|
+
> **Note**: The consolidated `Plan-de-Pruebas-{proyecto}-Sprint-{N}.md` (without module suffix)
|
|
33
|
+
> is for human reference only — do not use it as input for ADO scripts.
|
|
34
|
+
|
|
31
35
|
---
|
|
32
36
|
|
|
33
37
|
## Process
|
|
@@ -55,11 +59,21 @@ Required env vars:
|
|
|
55
59
|
- `$env:ADO_PROJECT` — project name
|
|
56
60
|
- `$env:ADO_PAT` — PAT token
|
|
57
61
|
|
|
58
|
-
### Step 3 — Sync test cases
|
|
62
|
+
### Step 3 — Sync test cases from Plan de Pruebas
|
|
63
|
+
|
|
64
|
+
For each `Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md` file:
|
|
65
|
+
1. Read the Tabla de Pruebas
|
|
66
|
+
2. Create one **Test Suite** in ADO named after the module (or use the suite groupings from section 5 of the plan)
|
|
67
|
+
3. For each row in the table, create one **Test Case** with:
|
|
68
|
+
- Title: the Título column value
|
|
69
|
+
- Steps: the Steps column value (numbered steps, `<br>`-separated → each becomes one ADO step)
|
|
70
|
+
- Expected result: the Resultado Esperado column value
|
|
71
|
+
- Tags: Tipo + Prioridad values
|
|
72
|
+
4. Write the returned ADO Test Case IDs back into the table (column "ADO WI") and into `module-registry.json`
|
|
59
73
|
|
|
60
|
-
Use `inject-ado-ids.ps1` to
|
|
74
|
+
Use `inject-ado-ids.ps1` to automate the create + inject cycle.
|
|
61
75
|
|
|
62
|
-
After sync, each
|
|
76
|
+
After sync, each row in the Plan de Pruebas table must have an ADO WI ID.
|
|
63
77
|
|
|
64
78
|
### Step 4 — Configure Playwright ADO reporter
|
|
65
79
|
|
|
@@ -1,22 +1,101 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qa-test-cases
|
|
3
3
|
description: >
|
|
4
|
-
Stage 4 of the QA pipeline.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
Stage 4 of the QA pipeline. Expands or completes the test case steps in an
|
|
5
|
+
existing Plan de Pruebas document (from Stage 3). Use when: the Plan de Pruebas
|
|
6
|
+
was generated with summary steps that need to be expanded into concrete,
|
|
7
|
+
observable UI steps; or when standalone TC-*.md files are needed for complex
|
|
8
|
+
or reusable test cases. Use when asked to expand steps, complete test cases,
|
|
9
|
+
detail test procedures, or write standalone TC-*.md files.
|
|
10
|
+
Requires a Plan de Pruebas (Stage 3) for the target module/sprint.
|
|
10
11
|
---
|
|
11
12
|
|
|
12
|
-
# QA Skill: Test Case
|
|
13
|
+
# QA Skill: Test Case Step Expansion (Stage 4 of 6)
|
|
13
14
|
|
|
14
|
-
**Stage**: 4 — Test
|
|
15
|
-
**Prerequisite**:
|
|
16
|
-
**Output**: `qa/03-test-cases/
|
|
17
|
-
**Next stage**: Stage 5 — Automation (`qa-automation`)
|
|
15
|
+
**Stage**: 4 — Test Case Steps (expand / complete Plan de Pruebas)
|
|
16
|
+
**Prerequisite**: Plan de Pruebas exists at `qa/02-test-plans/sprints/Sprint-{N}/Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md`
|
|
17
|
+
**Output**: Updated Plan de Pruebas table (primary) OR `qa/03-test-cases/TC-{ID}.md` files (standalone, optional)
|
|
18
|
+
**Next stage**: Stage 5 — Automation (`qa-automation`) or ADO Integration (`qa-ado-integration`)
|
|
18
19
|
|
|
19
20
|
> **Pipeline rule**: TC IDs must be unique across the module. Never reuse a TC ID.
|
|
21
|
+
> **Primary output** is the table in the Plan de Pruebas, not standalone files.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## When to use this skill
|
|
26
|
+
|
|
27
|
+
| Situation | Action |
|
|
28
|
+
|-----------|--------|
|
|
29
|
+
| Plan de Pruebas has summary steps (from `05-test-scenarios.md`) that aren't concrete enough | Expand steps row by row in the table |
|
|
30
|
+
| A specific TC requires multi-scenario, multi-role documentation | Create standalone `TC-{ID}.md` in `qa/03-test-cases/` |
|
|
31
|
+
| TC is reused across multiple sprints unchanged | Create standalone file with cross-reference |
|
|
32
|
+
| All steps in the table are already concrete and observable | Stage 4 not needed — proceed to Stage 5 or ADO |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Inputs Required
|
|
37
|
+
|
|
38
|
+
1. `qa/02-test-plans/sprints/Sprint-{N}/Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md` — table to expand
|
|
39
|
+
2. `qa/01-specifications/module-{name}/submodule-{name}/00-inventory.md` — UI field names, button labels, routes
|
|
40
|
+
3. `qa/01-specifications/module-{name}/submodule-{name}/05-test-scenarios.md` — original scenario text
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Process
|
|
45
|
+
|
|
46
|
+
### Step 1 — Identify rows needing expansion
|
|
47
|
+
|
|
48
|
+
Review the Tabla de Pruebas. Flag rows where Steps are:
|
|
49
|
+
- Summary-level (e.g., "Navegar al módulo y verificar comportamiento")
|
|
50
|
+
- Missing intermediate steps (fewer than 2 steps for a non-trivial scenario)
|
|
51
|
+
- Using vague verbs ("hacer lo necesario", "verificar que funciona")
|
|
52
|
+
|
|
53
|
+
### Step 2 — Expand steps in-table
|
|
54
|
+
|
|
55
|
+
For each flagged row, rewrite the Steps cell using:
|
|
56
|
+
- `00-inventory.md` for exact UI element names and routes
|
|
57
|
+
- `05-test-scenarios.md` for the original intent
|
|
58
|
+
- Steps format: `1) Navegar a {QA_BASE_URL}/ruta<br>2) Ingresar...<br>3) Verificar que...`
|
|
59
|
+
|
|
60
|
+
Quality rules per step:
|
|
61
|
+
- Concrete verb: Navegar, Ingresar, Hacer click, Seleccionar, Verificar, Revisar
|
|
62
|
+
- One action + one verification per step (when applicable)
|
|
63
|
+
- Resultado Esperado must be measurable (specific text, state, count)
|
|
64
|
+
|
|
65
|
+
### Step 3 — Standalone TC files (only when needed)
|
|
66
|
+
|
|
67
|
+
If a TC requires standalone documentation (see "When to use" table above):
|
|
68
|
+
- Save as `qa/03-test-cases/TC-{ID}.md`
|
|
69
|
+
- Use template from `references/test-case-template.md`
|
|
70
|
+
- Add a note in the Plan de Pruebas table row: "See qa/03-test-cases/TC-{ID}.md"
|
|
71
|
+
|
|
72
|
+
### Step 4 — Quality gates
|
|
73
|
+
|
|
74
|
+
Before marking stage complete:
|
|
75
|
+
- [ ] Every row in the table has ≥ 2 numbered steps
|
|
76
|
+
- [ ] Every step uses a concrete UI verb
|
|
77
|
+
- [ ] Every Resultado Esperado is measurable
|
|
78
|
+
- [ ] No blank cells in Confirma column (Task ID or `N/A`)
|
|
79
|
+
- [ ] Standalone TC files (if created) are cross-referenced in the table
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Key Rules
|
|
84
|
+
|
|
85
|
+
| Rule | Correct | Wrong |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| Primary output | Expand rows in Plan de Pruebas table | Create files for every TC |
|
|
88
|
+
| Step granularity | One action + one observable result | Multi-action vague steps |
|
|
89
|
+
| Data references | `{QA_USER_EMAIL}`, `EXEC_IDX`, named env var | Hardcoded credentials |
|
|
90
|
+
| ID stability | Never re-number existing TC-IDs | Renaming breaks ADO links |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Outputs
|
|
95
|
+
|
|
96
|
+
- Updated `Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md` (rows with expanded steps)
|
|
97
|
+
- Optionally: `qa/03-test-cases/TC-{ID}.md` for complex/reusable TCs
|
|
98
|
+
|
|
20
99
|
|
|
21
100
|
---
|
|
22
101
|
|
|
@@ -1,20 +1,125 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qa-test-plan
|
|
3
3
|
description: >
|
|
4
|
-
Stage 3 of the QA pipeline. Generates a
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
Stage 3 of the QA pipeline. Generates a "Plan de Pruebas" document per sprint
|
|
5
|
+
and module. The document combines test plan context (scope, strategy, preconditions)
|
|
6
|
+
with a detailed test case table (steps, expected results, ADO Task reference).
|
|
7
|
+
This is the primary artifact consumed by the ADO integration skill to create
|
|
8
|
+
Test Suites and Test Cases with steps in Azure DevOps.
|
|
9
|
+
Use when asked to create a test plan, plan a sprint, write test cases with steps,
|
|
10
|
+
or produce the QA plan for a module or sprint.
|
|
9
11
|
Requires completed specs (Stage 2).
|
|
10
12
|
---
|
|
11
13
|
|
|
12
|
-
# QA Skill:
|
|
14
|
+
# QA Skill: Plan de Pruebas (Stage 3 of 6)
|
|
15
|
+
|
|
16
|
+
**Stage**: 3 — Plan de Pruebas (test plan + detailed test case table)
|
|
17
|
+
**Prerequisite**: `05-test-scenarios.md` must exist for all in-scope submodules (Stage 2 complete)
|
|
18
|
+
**Output**: `qa/02-test-plans/sprints/Sprint-{N}/Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md`
|
|
19
|
+
**Next stage**: Stage 4 — Expand steps (`qa-test-cases`) if steps need more detail; or Stage 5 — Automation (`qa-automation`)
|
|
20
|
+
|
|
21
|
+
> **Pipeline rule**: Do not automate TCs that are not in an active Plan de Pruebas.
|
|
22
|
+
> **ADO rule**: The Plan de Pruebas is the source for ADO Test Cases — steps in the table become steps in ADO.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Inputs Required
|
|
27
|
+
|
|
28
|
+
1. `qa/01-specifications/module-{name}/submodule-{name}/` — spec files, especially:
|
|
29
|
+
- `00-inventory.md` — UI fields, buttons, routes (source for concrete step text)
|
|
30
|
+
- `05-test-scenarios.md` — TC list with summary steps and expected results
|
|
31
|
+
2. Sprint number and module name (ask the user if not given)
|
|
32
|
+
3. ADO sprint tasks/stories (if available; use for "Confirma" column; `N/A` if not)
|
|
33
|
+
4. Project name from `qa/qa-framework.config.json` → `project.name`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Process
|
|
38
|
+
|
|
39
|
+
### Step 1 — Collect TC inventory
|
|
40
|
+
|
|
41
|
+
For each in-scope submodule, read `05-test-scenarios.md` and aggregate:
|
|
42
|
+
- Total TC count by priority (P0/P1/P2/P3)
|
|
43
|
+
- TC count by type: Manual / Automatizado / Ambos
|
|
44
|
+
- TCs marked `BLOCKED-PERMISSIONS` or `PENDING-CODE` → include in table but mark type as `Bloqueado`
|
|
45
|
+
|
|
46
|
+
### Step 2 — Apply priority rules
|
|
47
|
+
|
|
48
|
+
Use the priority decision tree (see `references/plan-de-pruebas-template.md`):
|
|
49
|
+
- **P0**: happy path confirmation; show-stopper risk; data corruption
|
|
50
|
+
- **P1**: common negative; cross-module; state transitions; smoke E2E
|
|
51
|
+
- **P2**: secondary features (export, pagination, search); regression adjacent
|
|
52
|
+
- **P3**: edge cases; exploratory charters (timeboxed)
|
|
53
|
+
|
|
54
|
+
### Step 3 — Define TestSuites (ADO grouping)
|
|
55
|
+
|
|
56
|
+
Group TCs by functional area. Each group → one ADO Test Suite:
|
|
57
|
+
- 3–7 suites per module is typical
|
|
58
|
+
- Name suites after the functional area, not the priority (e.g., "Solicitud Individual", "Aprobación Web")
|
|
59
|
+
- Last suite: "Exploratoria" if there are P3 charters
|
|
60
|
+
|
|
61
|
+
### Step 4 — Write the Plan de Pruebas document
|
|
62
|
+
|
|
63
|
+
Full template: `references/plan-de-pruebas-template.md`
|
|
64
|
+
|
|
65
|
+
Required sections:
|
|
66
|
+
1. Header (Proyecto, Sprint, Módulo, Fecha planificación, Ventana QA, ADO Test Plan link)
|
|
67
|
+
2. Objetivo
|
|
68
|
+
3. Alcance (en alcance / fuera de alcance)
|
|
69
|
+
4. Items del Sprint normalizados (grouped by area; Task IDs if available)
|
|
70
|
+
5. Priorización (P0–P3 summary)
|
|
71
|
+
6. TestSuites (agrupación para ADO)
|
|
72
|
+
7. Precondiciones generales (ambiente, roles, datos base)
|
|
73
|
+
8. Datos mínimos sugeridos (table with env var references)
|
|
74
|
+
9. Supuestos & Faltantes críticos (TODO items before execution)
|
|
75
|
+
10. **Tabla de Pruebas** (see Step 4a)
|
|
76
|
+
11. Matriz de Trazabilidad (Task ↔ N)
|
|
77
|
+
12. Notas de automatización
|
|
78
|
+
|
|
79
|
+
#### Step 4a — Tabla de Pruebas (most important section)
|
|
80
|
+
|
|
81
|
+
Each row in the table is one test case. Columns:
|
|
82
|
+
|
|
83
|
+
| Column | Rules |
|
|
84
|
+
|--------|-------|
|
|
85
|
+
| **N** | Sequential number (1, 2, 3...) — used in trazabilidad matrix |
|
|
86
|
+
| **TC-ID** | `TC-{MODULE}-{SUB}-{NNN}` from specs; or assign sequentially if new |
|
|
87
|
+
| **Suite / Área Funcional** | Suite name from Step 3 |
|
|
88
|
+
| **Título** | `[ETIQUETA][P#] Descripción concisa` — etiquetas: CONFIRMACION, SMOKE, REGRESION, EXPLORATORIA |
|
|
89
|
+
| **Descripción** | What scenario this validates (1-2 sentences) |
|
|
90
|
+
| **Steps** | Numbered, separated by `<br>`. Use concrete UI verbs from `00-inventory.md`: "Navegar a", "Ingresar", "Hacer click en", "Verificar que", "Seleccionar". Reference env vars as `{ENV_VAR}` |
|
|
91
|
+
| **Resultado Esperado** | Observable outcome: specific text, state change, notification. Not vague ("works correctly") |
|
|
92
|
+
| **Confirma** | `Task NNNNN` if an ADO task covers this; `N/A` if no task or exploratory |
|
|
93
|
+
| **Tipo** | `Manual` \| `Automatizado` \| `Ambos` \| `Bloqueado` |
|
|
94
|
+
| **Prioridad** | `P0` \| `P1` \| `P2` \| `P3` |
|
|
95
|
+
|
|
96
|
+
**Steps quality rules**:
|
|
97
|
+
- Each step = one observable action + one observable verification (when applicable)
|
|
98
|
+
- Reference UI elements by name as seen in `00-inventory.md` (exact button label, field name)
|
|
99
|
+
- Reference test data by env var name (`{QA_USER_EMAIL}`) or pattern (`EXEC_IDX`)
|
|
100
|
+
- Exploratory charters: steps = "Timebox N min" + charter goal + "Registrar hallazgos"
|
|
101
|
+
|
|
102
|
+
### Step 5 — Update status
|
|
103
|
+
|
|
104
|
+
- Update `qa/README.md` module row (plan status → ✅)
|
|
105
|
+
- If ADO enabled: stub the ADO Plan ID field for the ADO integration skill
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Outputs
|
|
110
|
+
|
|
111
|
+
- `qa/02-test-plans/sprints/Sprint-{N}/Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md`
|
|
112
|
+
- Updated `qa/README.md` module status row
|
|
113
|
+
|
|
114
|
+
## Quality gates before marking complete
|
|
115
|
+
|
|
116
|
+
- [ ] All in-scope TCs from `05-test-scenarios.md` appear in the table
|
|
117
|
+
- [ ] Every row has at least 2 numbered steps
|
|
118
|
+
- [ ] Every step uses a concrete UI verb (not vague like "do the action")
|
|
119
|
+
- [ ] Resultado Esperado is measurable (specific text/state, not "works correctly")
|
|
120
|
+
- [ ] Matriz de Trazabilidad covers all Tasks mentioned in the table
|
|
121
|
+
- [ ] `Confirma` column has no blank cells (must be Task ID or `N/A`)
|
|
13
122
|
|
|
14
|
-
**Stage**: 3 — Test Plan
|
|
15
|
-
**Prerequisite**: `05-test-scenarios.md` must exist for all in-scope submodules (Stage 2 complete)
|
|
16
|
-
**Output**: `qa/02-test-plans/automated/{module}-test-plan.md`
|
|
17
|
-
**Next stage**: Stage 4 — Test Cases (`qa-test-cases`) or Stage 5 — Automation (`qa-automation`)
|
|
18
123
|
|
|
19
124
|
> **Pipeline rule**: Do not automate TCs that are not in an approved or active test plan.
|
|
20
125
|
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Reference: Plan de Pruebas — Template and Conventions
|
|
2
|
+
|
|
3
|
+
> Loaded by `skills/qa-test-plan/` when generating a Plan de Pruebas document.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Naming Convention
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
qa/02-test-plans/sprints/Sprint-{N}/Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Where `{modulo}` is the module code (e.g., `RCL-Casino`, `PortalProveedores`, `ARCF`).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Complete Document Template
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
# Plan de Pruebas — {PROYECTO} — Sprint {NNN} — {MODULO_NOMBRE}
|
|
21
|
+
|
|
22
|
+
**Proyecto:** {PROYECTO}
|
|
23
|
+
**Sprint:** {NNN}
|
|
24
|
+
**Módulo:** {MODULO_NOMBRE}
|
|
25
|
+
**Código módulo:** {MODULO_CODE}
|
|
26
|
+
**Fecha planificación:** {YYYY-MM-DD}
|
|
27
|
+
**Ventana QA:** {YYYY-MM-DD} y {YYYY-MM-DD}
|
|
28
|
+
**ADO Test Plan:** [Plan {ADO_PLAN_ID}]({ADO_TEST_PLAN_URL}) ← omit if ADO disabled
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 1. Objetivo
|
|
33
|
+
## 2. Alcance
|
|
34
|
+
### En alcance
|
|
35
|
+
### Fuera de alcance
|
|
36
|
+
## 3. Items del Sprint (normalizados)
|
|
37
|
+
## 4. Priorización (P0–P3 summary)
|
|
38
|
+
## 5. TestSuites (agrupación para ADO)
|
|
39
|
+
## 6. Precondiciones generales
|
|
40
|
+
## 7. Datos mínimos sugeridos
|
|
41
|
+
## 8. Supuestos & Faltantes críticos
|
|
42
|
+
## 9. Tabla de Pruebas ← PRIMARY ARTIFACT
|
|
43
|
+
## 10. Matriz de Trazabilidad
|
|
44
|
+
## 11. Notas de automatización
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Tabla de Pruebas — Column Conventions
|
|
50
|
+
|
|
51
|
+
| Column | Type | Rules |
|
|
52
|
+
|--------|------|-------|
|
|
53
|
+
| N | int | Sequential 1,2,3... Used in trazabilidad matrix |
|
|
54
|
+
| TC-ID | string | `TC-{MODULE}-{SUB}-{NNN}` from specs; or `TC-{MODULE}-{NNN}` if no submodule code |
|
|
55
|
+
| Suite / Área Funcional | string | Matches a suite name from section 5 |
|
|
56
|
+
| Título | string | `[ETIQUETA][P#] Description` |
|
|
57
|
+
| Descripción | string | What scenario this validates (1-2 sentences) |
|
|
58
|
+
| Steps | markdown | Numbered, `<br>`-separated. Concrete UI verbs. |
|
|
59
|
+
| Resultado Esperado | string | Observable, measurable outcome |
|
|
60
|
+
| Confirma | string | `Task NNNNN` or `N/A` |
|
|
61
|
+
| Tipo | enum | `Manual` \| `Automatizado` \| `Ambos` \| `Bloqueado` |
|
|
62
|
+
| Prioridad | enum | `P0` \| `P1` \| `P2` \| `P3` |
|
|
63
|
+
|
|
64
|
+
### Title Etiquetas
|
|
65
|
+
- `[CONFIRMACION]` — confirms a specific sprint item is implemented
|
|
66
|
+
- `[SMOKE]` — happy path end-to-end
|
|
67
|
+
- `[REGRESION]` — validates no regression in adjacent functionality
|
|
68
|
+
- `[EXPLORATORIA]` — charter-based, timeboxed, no fixed expected result
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Steps Writing Rules
|
|
73
|
+
|
|
74
|
+
**DO:**
|
|
75
|
+
- `1) Navegar a {QA_BASE_URL}/ruta/modulo`
|
|
76
|
+
- `2) Ingresar usuario {QA_USER_EMAIL} y contraseña {QA_USER_PASSWORD}`
|
|
77
|
+
- `3) Hacer click en el botón "Guardar"`
|
|
78
|
+
- `4) Verificar que aparece el mensaje "Registro guardado correctamente"`
|
|
79
|
+
- `5) Revisar bandeja de correo del usuario {QA_NOTIFY_EMAIL}`
|
|
80
|
+
|
|
81
|
+
**DO NOT:**
|
|
82
|
+
- `1) Ejecutar la funcionalidad` ← too vague
|
|
83
|
+
- `2) Verificar que funciona` ← not measurable
|
|
84
|
+
- `3) Hacer las acciones necesarias` ← not observable
|
|
85
|
+
|
|
86
|
+
**References to test data:**
|
|
87
|
+
- Env vars: `{QA_USER_EMAIL}`, `{QA_ADMIN_EMAIL}`, `{QA_BASE_URL}`
|
|
88
|
+
- Dynamic values: `EXEC_IDX` (unique run suffix)
|
|
89
|
+
- Specific values: write the actual value if it's fixed (e.g., a range of dates like `01-03-2026 a 07-03-2026`)
|
|
90
|
+
|
|
91
|
+
**Exploratory charters:**
|
|
92
|
+
```
|
|
93
|
+
1) Timebox: 45–60 min
|
|
94
|
+
2) Objetivo: {CHARTER_GOAL}
|
|
95
|
+
3) Explorar {AREA} variando {VARIABLES}
|
|
96
|
+
4) Registrar hallazgos con evidencia (screenshot + descripción)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Priority Decision Tree
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Is it the primary happy path? → P0
|
|
105
|
+
Is it a show-stopper risk or data corruption? → P0
|
|
106
|
+
Is it a common negative scenario? → P1
|
|
107
|
+
Is it a cross-module dependency? → P1
|
|
108
|
+
Is it a state machine transition? → P1
|
|
109
|
+
Is it a secondary feature (export/search)? → P2
|
|
110
|
+
Is it regression in adjacent functionality? → P2
|
|
111
|
+
Is it an edge case or low-frequency scenario? → P3
|
|
112
|
+
Is it exploratory / cosmetic? → P3
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Automation Feasibility Rules
|
|
118
|
+
|
|
119
|
+
| Feasibility | Criteria | Column `Tipo` |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| Fully automatable | Deterministic, observable via browser, no external deps | `Automatizado` |
|
|
122
|
+
| Partially automatable | Some steps require human inspection OR external can be mocked | `Ambos` |
|
|
123
|
+
| Not automatable | Physical access; irreversible QA side effects; BLOCKED-PERMISSIONS | `Manual` |
|
|
124
|
+
| Blocked | Feature not deployed or BLOCKED-PERMISSIONS | `Bloqueado` |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Matriz de Trazabilidad Template
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
## 10. Matriz de Trazabilidad
|
|
132
|
+
|
|
133
|
+
| Task ADO | N casos (tabla) |
|
|
134
|
+
|----------|-----------------|
|
|
135
|
+
| Task 20112 | 4, 5, 6 |
|
|
136
|
+
| Task 21944 | 1, 2, 3 |
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
If no ADO tasks: substitute with requirement IDs or user story references.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Multi-Module Sprint
|
|
144
|
+
|
|
145
|
+
When a sprint covers multiple modules:
|
|
146
|
+
- Create one `Plan-de-Pruebas-{proyecto}-Sprint-{N}-{modulo}.md` per module
|
|
147
|
+
- The consolidated `Plan-de-Pruebas-{proyecto}-Sprint-{N}.md` is generated by `@keber/ado-qa consolidate-sprint`
|
|
148
|
+
- **Do not create the consolidated file manually** — it is a derived artifact
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
function New-AdoTestCase {
|
|
2
|
+
<#
|
|
3
|
+
.SYNOPSIS
|
|
4
|
+
Creates a Test Case work item with optional steps.
|
|
5
|
+
Wraps New-AdoWorkItem -Type 'Test Case' and handles TCM-specific fields.
|
|
6
|
+
|
|
7
|
+
.PARAMETER Title Title of the Test Case (mandatory).
|
|
8
|
+
.PARAMETER Steps Ordered array of plain-text action strings.
|
|
9
|
+
Encoded as the XML format required by Microsoft.VSTS.TCM.Steps.
|
|
10
|
+
.PARAMETER Priority 1 (Critical) | 2 (High) | 3 (Medium) | 4 (Low).
|
|
11
|
+
.PARAMETER ExtraFields Hashtable of additional TCM or custom fields.
|
|
12
|
+
|
|
13
|
+
.EXAMPLE
|
|
14
|
+
New-AdoTestCase -Title 'Verify login with valid credentials' `
|
|
15
|
+
-Steps @('Navigate to /login', 'Enter username and password', 'Click Sign In') `
|
|
16
|
+
-Priority '2' -AssignedTo 'qa@contoso.com' -Tags 'login; smoke'
|
|
17
|
+
#>
|
|
18
|
+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact='Low')]
|
|
19
|
+
param(
|
|
20
|
+
[Parameter(Mandatory)][string]$Title,
|
|
21
|
+
[string]$Description,
|
|
22
|
+
[string]$AssignedTo,
|
|
23
|
+
[string]$AreaPath,
|
|
24
|
+
[string]$IterationPath,
|
|
25
|
+
[string]$Tags,
|
|
26
|
+
[ValidateSet('Design','Ready','Closed')]
|
|
27
|
+
[string]$State,
|
|
28
|
+
[string[]]$Steps,
|
|
29
|
+
[ValidateSet('1','2','3','4')]
|
|
30
|
+
[string]$Priority,
|
|
31
|
+
[hashtable]$ExtraFields = @{},
|
|
32
|
+
[string]$Org = $script:AdoSession.Org,
|
|
33
|
+
[string]$Project = $script:AdoSession.Project,
|
|
34
|
+
[string]$ApiV = $script:AdoSession.ApiV,
|
|
35
|
+
[hashtable]$Headers = $script:AdoSession.Headers
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
$extra = $ExtraFields.Clone()
|
|
39
|
+
|
|
40
|
+
if ($Priority) {
|
|
41
|
+
$extra['Microsoft.VSTS.Common.Priority'] = $Priority
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if ($Steps -and $Steps.Count -gt 0) {
|
|
45
|
+
$stepsXml = '<steps id="0" last="{0}">' -f $Steps.Count
|
|
46
|
+
$stepIndex = 1
|
|
47
|
+
foreach ($action in $Steps) {
|
|
48
|
+
$escaped = [System.Security.SecurityElement]::Escape($action)
|
|
49
|
+
$stepsXml += '<step id="{0}" type="ActionStep"><parameterizedString isformatted="true">{1}</parameterizedString><parameterizedString isformatted="true"/></step>' -f $stepIndex, $escaped
|
|
50
|
+
$stepIndex++
|
|
51
|
+
}
|
|
52
|
+
$stepsXml += '</steps>'
|
|
53
|
+
$extra['Microsoft.VSTS.TCM.Steps'] = $stepsXml
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
$splatArgs = @{
|
|
57
|
+
Type = 'Test Case'
|
|
58
|
+
Title = $Title
|
|
59
|
+
ExtraFields = $extra
|
|
60
|
+
Org = $Org
|
|
61
|
+
Project = $Project
|
|
62
|
+
ApiV = $ApiV
|
|
63
|
+
Headers = $Headers
|
|
64
|
+
}
|
|
65
|
+
if ($Description) { $splatArgs.Description = $Description }
|
|
66
|
+
if ($AssignedTo) { $splatArgs.AssignedTo = $AssignedTo }
|
|
67
|
+
if ($AreaPath) { $splatArgs.AreaPath = $AreaPath }
|
|
68
|
+
if ($IterationPath) { $splatArgs.IterationPath = $IterationPath }
|
|
69
|
+
if ($Tags) { $splatArgs.Tags = $Tags }
|
|
70
|
+
if ($State) { $splatArgs.State = $State }
|
|
71
|
+
|
|
72
|
+
# WhatIf / Confirm propagate automatically via $WhatIfPreference / $ConfirmPreference
|
|
73
|
+
return New-AdoWorkItem @splatArgs
|
|
74
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Plan de Pruebas — {{PROYECTO}} — Sprint {{NNN}} — {{MODULO_NOMBRE}}
|
|
2
|
+
|
|
3
|
+
**Proyecto:** {{PROYECTO}}
|
|
4
|
+
**Sprint:** {{NNN}}
|
|
5
|
+
**Módulo:** {{MODULO_NOMBRE}}
|
|
6
|
+
**Código módulo:** {{MODULO_CODE}}
|
|
7
|
+
**Fecha planificación:** {{YYYY-MM-DD}}
|
|
8
|
+
**Ventana QA:** {{YYYY-MM-DD}} y {{YYYY-MM-DD}}
|
|
9
|
+
**ADO Test Plan:** [Plan {{ADO_PLAN_ID}} — {{PROYECTO}} Sprint {{NNN}}]({{ADO_TEST_PLAN_URL}}) *(omitir si ADO no está habilitado)*
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Objetivo
|
|
14
|
+
|
|
15
|
+
> Definir la estrategia de pruebas para el Sprint {{NNN}}, orientada a:
|
|
16
|
+
> - Confirmar la correcta implementación de las tareas comprometidas en el sprint.
|
|
17
|
+
> - Cubrir los flujos críticos del módulo **{{MODULO_NOMBRE}}**.
|
|
18
|
+
> - Identificar riesgos funcionales, de datos y de integración.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 2. Alcance
|
|
23
|
+
|
|
24
|
+
### En alcance
|
|
25
|
+
- {{FUNCIONALIDAD_1}}
|
|
26
|
+
- {{FUNCIONALIDAD_2}}
|
|
27
|
+
|
|
28
|
+
### Fuera de alcance
|
|
29
|
+
- {{EXCLUSION_1}} *(motivo: {{RAZON}})*
|
|
30
|
+
- {{EXCLUSION_2}}
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 3. Items del Sprint (normalizados)
|
|
35
|
+
|
|
36
|
+
> Listar las tareas/historias ADO incluidas en este sprint, agrupadas por área funcional.
|
|
37
|
+
> Si no hay ADO, listar los requerimientos o módulos abordados.
|
|
38
|
+
|
|
39
|
+
### {{AREA_FUNCIONAL_1}}
|
|
40
|
+
- Task {{ID}} — {{DESCRIPCION}}
|
|
41
|
+
- Task {{ID}} — {{DESCRIPCION}}
|
|
42
|
+
|
|
43
|
+
### {{AREA_FUNCIONAL_2}}
|
|
44
|
+
- Task {{ID}} — {{DESCRIPCION}}
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 4. Priorización
|
|
49
|
+
|
|
50
|
+
**P0 – Confirmación (obligatorio)**
|
|
51
|
+
- {{ESCENARIO_CRITICO_1}}
|
|
52
|
+
- {{ESCENARIO_CRITICO_2}}
|
|
53
|
+
|
|
54
|
+
**P1 – Smoke (camino feliz)**
|
|
55
|
+
- {{FLUJO_PRINCIPAL}}
|
|
56
|
+
|
|
57
|
+
**P2 – Regresión mínima adyacente**
|
|
58
|
+
- {{REGRESION_1}}
|
|
59
|
+
|
|
60
|
+
**P3 – Exploratoria (timeboxed)**
|
|
61
|
+
- Charter 1 ({{N}} min): {{DESCRIPCION_CHARTER}}
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 5. TestSuites (agrupación para ADO)
|
|
66
|
+
|
|
67
|
+
> Cada suite se crea como un Test Suite dentro del Test Plan ADO.
|
|
68
|
+
> Si ADO no está habilitado, usar como agrupación lógica de la tabla de pruebas.
|
|
69
|
+
|
|
70
|
+
1. **{{SUITE_1}}**
|
|
71
|
+
2. **{{SUITE_2}}**
|
|
72
|
+
3. **{{SUITE_3}}**
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 6. Precondiciones generales
|
|
77
|
+
|
|
78
|
+
- Ambiente QA disponible en `{{QA_BASE_URL}}`
|
|
79
|
+
- Roles disponibles:
|
|
80
|
+
- Usuario **{{ROL_1}}** — para {{ACCION}}
|
|
81
|
+
- Usuario **{{ROL_2}}** — para {{ACCION}}
|
|
82
|
+
- Datos base:
|
|
83
|
+
- {{DATO_BASE_1}}
|
|
84
|
+
- {{DATO_BASE_2}}
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 7. Datos mínimos sugeridos
|
|
89
|
+
|
|
90
|
+
| Item | Valor / Referencia |
|
|
91
|
+
|------|--------------------|
|
|
92
|
+
| {{DATO_1}} | `process.env.{{ENV_VAR}}` |
|
|
93
|
+
| {{DATO_2}} | {{VALOR_O_PATRON}} |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 8. Supuestos & Faltantes críticos
|
|
98
|
+
|
|
99
|
+
**Supuestos:**
|
|
100
|
+
- **Supuesto:** {{SUPUESTO_1}}
|
|
101
|
+
|
|
102
|
+
**Faltantes críticos (TODO antes de ejecutar):**
|
|
103
|
+
1. **TODO:** {{PENDIENTE_1}}
|
|
104
|
+
2. **TODO:** {{PENDIENTE_2}}
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 9. Tabla de Pruebas
|
|
109
|
+
|
|
110
|
+
> Convenciones:
|
|
111
|
+
> - **TC-ID:** `TC-{{MODULO_CODE}}-{{SUBMODULO_CODE}}-NNN` (o `N/A` si no hay ID asignado aún)
|
|
112
|
+
> - **Steps:** numerados, separados por `<br>` — verbos concretos de UI (`Navegar a`, `Ingresar`, `Hacer click`, `Verificar`)
|
|
113
|
+
> - **Confirma:** `Task NNNNN` si hay tarea ADO relacionada; `N/A` si no aplica
|
|
114
|
+
> - **Tipo:** `Manual` | `Automatizado` | `Ambos`
|
|
115
|
+
> - **Prioridad:** `P0` | `P1` | `P2` | `P3`
|
|
116
|
+
|
|
117
|
+
| N | TC-ID | Suite / Área Funcional | Título | Descripción | Steps | Resultado Esperado | Confirma | Tipo | Prioridad |
|
|
118
|
+
|---|-------|------------------------|--------|-------------|-------|--------------------|----------|------|-----------|
|
|
119
|
+
| 1 | TC-{{MODULO_CODE}}-{{SUB}}-001 | {{SUITE_1}} | [{{ETIQUETA}}][{{P}}] {{TITULO}} | {{DESCRIPCION}} | 1) {{PASO_1}}<br>2) {{PASO_2}}<br>3) {{PASO_3}} | {{RESULTADO_ESPERADO}} | Task {{ID}} | Manual | P0 |
|
|
120
|
+
| 2 | TC-{{MODULO_CODE}}-{{SUB}}-002 | {{SUITE_1}} | [{{ETIQUETA}}][{{P}}] {{TITULO}} | {{DESCRIPCION}} | 1) {{PASO_1}}<br>2) {{PASO_2}} | {{RESULTADO_ESPERADO}} | N/A | Automatizado | P1 |
|
|
121
|
+
|
|
122
|
+
> **Etiquetas de título:** `[CONFIRMACION]` | `[SMOKE]` | `[REGRESION]` | `[EXPLORATORIA]`
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 10. Matriz de Trazabilidad
|
|
127
|
+
|
|
128
|
+
| Task ADO | N casos (tabla) |
|
|
129
|
+
|----------|-----------------|
|
|
130
|
+
| Task {{ID}} | 1, 3, 5 |
|
|
131
|
+
| Task {{ID}} | 2, 4 |
|
|
132
|
+
|
|
133
|
+
> Si no hay Tasks ADO, usar esta sección para mapear requerimientos o funcionalidades a N.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 11. Notas de automatización
|
|
138
|
+
|
|
139
|
+
> Para los TCs marcados como `Automatizado` o `Ambos`, el spec file de referencia es:
|
|
140
|
+
> `qa/07-automation/e2e/tests/{{modulo-kebab}}/{{submodulo-kebab}}.spec.ts`
|
|
141
|
+
>
|
|
142
|
+
> Los steps de esta tabla son la fuente autoritativa para los `test.step()` en el spec.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Consolidado de sprint
|
|
147
|
+
|
|
148
|
+
> Si este sprint cubre múltiples módulos, existe un documento consolidado generado automáticamente:
|
|
149
|
+
> `qa/02-test-plans/sprints/Sprint-{{NNN}}/Plan-de-Pruebas-{{PROYECTO}}-Sprint-{{NNN}}.md`
|
|
150
|
+
>
|
|
151
|
+
> El consolidado se genera con el script `@keber/ado-qa consolidate-sprint --sprint {{NNN}}`.
|
|
152
|
+
> **No editar manualmente** — es derivado de los archivos por módulo.
|
package/templates/test-plan.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
> **Deprecation notice (v1.7.0):** This template is superseded by `templates/test-plan-sprint.md`,
|
|
2
|
+
> which combines the test plan and detailed test case table (steps included) in a single document
|
|
3
|
+
> organized by sprint and module. Use `test-plan-sprint.md` for all new work.
|
|
4
|
+
>
|
|
5
|
+
> This file is retained for reference only.
|
|
6
|
+
|
|
1
7
|
# Test Plan — {{MODULE_NAME}}
|
|
2
8
|
|
|
3
9
|
**Plan ID**: TP-{{MODULE}}-{{VERSION}}
|