@roopesh.yadava/qa-pack 1.0.3
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/README.md +79 -0
- package/bin/postinstall.js +151 -0
- package/claude/commands/bug-report.md +185 -0
- package/claude/commands/qa-agent.md +12 -0
- package/claude/commands/write-acceptance-criteria.md +167 -0
- package/claude/settings.json +13 -0
- package/claude/settings.local.json.example +19 -0
- package/claude/skills/SKILLS_CONTEXT.md +194 -0
- package/claude/skills/accessibility-testing/SKILL.md +317 -0
- package/claude/skills/accessibility-testing/WCAG_CHECKS.md +478 -0
- package/claude/skills/automation/BDD_TEMPLATES.md +237 -0
- package/claude/skills/automation/LOCATOR_PATTERNS.md +169 -0
- package/claude/skills/automation/SKILL.md +364 -0
- package/claude/skills/bug-reporting/SKILL.md +257 -0
- package/claude/skills/delete-files/SKILL.md +141 -0
- package/claude/skills/manual-testing/SKILL.md +493 -0
- package/claude/skills/qa-agent/SKILL.md +391 -0
- package/claude/skills/qa-agent/product_context/CONTEXT_SCHEMA.md +58 -0
- package/claude/skills/qa-agent/product_context/README.md +19 -0
- package/claude/skills/test-charter/SKILL.md +300 -0
- package/claude/skills/ui-test-figma/COMPARISON_PATTERNS.md +300 -0
- package/claude/skills/ui-test-figma/SKILL.md +234 -0
- package/package.json +29 -0
- package/templates/CLAUDE.md +41 -0
- package/templates/cucumber.cjs +7 -0
- package/templates/mcp.json +18 -0
- package/templates/settings.local.json.example +19 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: delete-files
|
|
3
|
+
description: >
|
|
4
|
+
Clean up files created in the outputs/ folder during a QA session.
|
|
5
|
+
Asks the user for consent before deleting — remove all, selected ones, or none.
|
|
6
|
+
Invoked automatically at the end of a qa-agent run, or standalone.
|
|
7
|
+
user-invocable: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Delete Files — Session Cleanup
|
|
11
|
+
|
|
12
|
+
This skill runs **after the QA Agent pipeline completes** (or on demand) to clean
|
|
13
|
+
up artifacts written to `outputs/` during the session.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Step 1 — Discover Session Artifacts
|
|
18
|
+
|
|
19
|
+
List all files currently in the `outputs/` directory tree:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
find outputs/ -type f | sort
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If `outputs/` is empty or does not exist, print:
|
|
26
|
+
|
|
27
|
+
> No files found in `outputs/`. Nothing to clean up.
|
|
28
|
+
|
|
29
|
+
Then stop — do not proceed further.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Step 2 — Present the File List to the User
|
|
34
|
+
|
|
35
|
+
Display the discovered files as a numbered list:
|
|
36
|
+
|
|
37
|
+
> **QA Session — Cleanup**
|
|
38
|
+
>
|
|
39
|
+
> The following files were created in `outputs/` during this session:
|
|
40
|
+
>
|
|
41
|
+
> | # | File |
|
|
42
|
+
> |---|------|
|
|
43
|
+
> | 1 | `outputs/test-execution-CARD-2026-05-05.md` |
|
|
44
|
+
> | 2 | `outputs/test-charter-CARD-2026-05-05.md` |
|
|
45
|
+
> | 3 | `outputs/screenshots/T-01-login.png` |
|
|
46
|
+
> | … | … |
|
|
47
|
+
>
|
|
48
|
+
> What would you like to do?
|
|
49
|
+
>
|
|
50
|
+
> - **A** — Delete **all** files listed above
|
|
51
|
+
> - **S** — Delete **selected** files (you tell me which numbers)
|
|
52
|
+
> - **N** — Keep everything, no deletions
|
|
53
|
+
|
|
54
|
+
Wait for the user's response before taking any action.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Step 3 — Handle User Choice
|
|
59
|
+
|
|
60
|
+
### Choice A — Delete all
|
|
61
|
+
|
|
62
|
+
Confirm once before proceeding:
|
|
63
|
+
|
|
64
|
+
> Deleting all [N] files from `outputs/`. This cannot be undone. Proceed? (yes / no)
|
|
65
|
+
|
|
66
|
+
If user confirms **yes**: delete every file in the list using the Bash tool:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
find outputs/ -type f -delete
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then remove any empty subdirectories:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
find outputs/ -type d -empty -delete
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Print:
|
|
79
|
+
|
|
80
|
+
> All [N] files deleted from `outputs/`.
|
|
81
|
+
|
|
82
|
+
If user says **no**: print:
|
|
83
|
+
|
|
84
|
+
> Cancelled. No files were deleted.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### Choice S — Delete selected
|
|
89
|
+
|
|
90
|
+
Ask:
|
|
91
|
+
|
|
92
|
+
> Enter the numbers of the files to delete, separated by commas (e.g. `1, 3, 5`):
|
|
93
|
+
|
|
94
|
+
Wait for the list. Then confirm:
|
|
95
|
+
|
|
96
|
+
> Deleting [N] selected file(s):
|
|
97
|
+
> - `outputs/file-a.md`
|
|
98
|
+
> - `outputs/screenshots/img.png`
|
|
99
|
+
>
|
|
100
|
+
> Proceed? (yes / no)
|
|
101
|
+
|
|
102
|
+
If **yes**: delete each named file individually using the Bash tool, then remove
|
|
103
|
+
any empty subdirectories left behind:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
find outputs/ -type d -empty -delete
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Print:
|
|
110
|
+
|
|
111
|
+
> [N] file(s) deleted.
|
|
112
|
+
|
|
113
|
+
If **no**: print:
|
|
114
|
+
|
|
115
|
+
> Cancelled. No files were deleted.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### Choice N — Keep all
|
|
120
|
+
|
|
121
|
+
Print:
|
|
122
|
+
|
|
123
|
+
> No files deleted. All outputs are preserved in `outputs/`.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Step 4 — Final Report
|
|
128
|
+
|
|
129
|
+
After any deletion, print a one-line summary:
|
|
130
|
+
|
|
131
|
+
> Cleanup complete — [N] file(s) deleted, [M] file(s) kept.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Error Handling
|
|
136
|
+
|
|
137
|
+
| Situation | Action |
|
|
138
|
+
|-----------|--------|
|
|
139
|
+
| A file cannot be deleted (permissions, locked) | Report which file failed; continue deleting the rest |
|
|
140
|
+
| User provides out-of-range numbers in Choice S | Re-display the list, ask again |
|
|
141
|
+
| Ambiguous response to A / S / N prompt | Re-display the three options once |
|
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manual-testing
|
|
3
|
+
description: >
|
|
4
|
+
Manual Testing branch orchestrator. Follows the flowchart:
|
|
5
|
+
Jira Card Input → UI Testing (Figma MCP, optional) → Manual Testing (Playwright MCP)
|
|
6
|
+
→ Bug Reporting (Atlassian MCP) → Test Charter → Automation Agent (optional handoff).
|
|
7
|
+
Captures element selectors and interaction data during execution and saves them to an
|
|
8
|
+
automation-hints file for the automation skill to reuse — skipping DOM re-discovery.
|
|
9
|
+
Uses Playwright CLI for zero-token screenshots. Token tracking enabled.
|
|
10
|
+
Can also be run standalone without the qa-agent.
|
|
11
|
+
Triggers when user says: "test [JIRA-KEY]", "run manual testing for [JIRA-KEY]",
|
|
12
|
+
"do QA on [JIRA-KEY]", "manual test", or "manual-testing".
|
|
13
|
+
user-invocable: true
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Manual Testing Skill — Full Branch Orchestrator
|
|
17
|
+
|
|
18
|
+
## Token Budget Rules — Zero Tolerance After Login
|
|
19
|
+
|
|
20
|
+
| Operation | Allowed | Forbidden | Token cost of violation |
|
|
21
|
+
|-----------|---------|-----------|------------------------|
|
|
22
|
+
| Login page selectors | ONE `browser_snapshot()` at login URL only | `browser_snapshot()` on any other page | ~10k per call |
|
|
23
|
+
| All other DOM reading | `browser_evaluate` with targeted CSS/JS selector | `browser_snapshot()` anywhere else | ~10k wasted |
|
|
24
|
+
| All screenshots | `npx playwright screenshot --storage-state .playwright-session.json --full-page URL file.png` | `browser_screenshot()` | ~3k per image |
|
|
25
|
+
| Session reuse | Check `.playwright-session.json` before login — skip login if file exists and is valid | Re-logging in when session file exists | full login round-trip wasted |
|
|
26
|
+
|
|
27
|
+
**After the ONE allowed login snapshot — never call `browser_snapshot()` again in this run.**
|
|
28
|
+
Use `browser_evaluate` with a specific CSS selector or JS expression for all DOM inspection.
|
|
29
|
+
|
|
30
|
+
## Token Tracking
|
|
31
|
+
|
|
32
|
+
Silent background task — follow the **Token Tracking** pattern in `SKILLS_CONTEXT.md`.
|
|
33
|
+
Checkpoints: `start` → `jira_fetch` → `ui_testing` → `test_execution` → `end + report + session`.
|
|
34
|
+
Replace `CARD_ID` with the actual card ID. Never show tracking output to user.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Pipeline
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Jira Card ID
|
|
42
|
+
↓
|
|
43
|
+
[Phase 1] Fetch Jira Card
|
|
44
|
+
↓
|
|
45
|
+
[Phase 2] UI Testing (Figma) — optional, ask user
|
|
46
|
+
↓
|
|
47
|
+
[Phase 3] Manual Test Execution + Automation Hint Capture
|
|
48
|
+
↓
|
|
49
|
+
[Phase 4] Bug Reporting (Atlassian MCP)
|
|
50
|
+
↓
|
|
51
|
+
[Phase 5] Test Charter (publish)
|
|
52
|
+
↓
|
|
53
|
+
[Phase 6] Offer Automation Agent handoff
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Phase 0 — Collect Card ID + Load Context
|
|
59
|
+
|
|
60
|
+
Run token tracking `start` checkpoint.
|
|
61
|
+
|
|
62
|
+
If the user has not already provided a Jira card ID, ask:
|
|
63
|
+
> "Please share the **Jira card ID** to begin (e.g. `PROJ-123`)."
|
|
64
|
+
|
|
65
|
+
Wait for the card ID.
|
|
66
|
+
|
|
67
|
+
**After card ID is known — check for product context:**
|
|
68
|
+
|
|
69
|
+
Derive the project key prefix (e.g. `QE-89` → `QE`) and check:
|
|
70
|
+
```
|
|
71
|
+
.claude/skills/qa-agent/product_context/{PREFIX}/context.md
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**If context file exists:**
|
|
75
|
+
- Read it and extract: `CTX_APP_URL`, `CTX_USERNAME`, `CTX_PASSWORD`, `CTX_LOGIN_URL`, `CTX_OTP`
|
|
76
|
+
- Set `CONTEXT_LOADED = true`
|
|
77
|
+
- Confirm one line: "Context loaded for {PRODUCT_NAME} — using saved URL and credentials."
|
|
78
|
+
|
|
79
|
+
**If context file not found:**
|
|
80
|
+
- Set `CONTEXT_LOADED = false`
|
|
81
|
+
- Collect URL and credentials during Phase 1 as normal
|
|
82
|
+
|
|
83
|
+
Then immediately proceed to Phase 1 — do not ask for anything else yet.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Phase 1 — Fetch Jira Card
|
|
88
|
+
|
|
89
|
+
Use `getJiraIssue` to fetch `CARD_ID`. Extract and store:
|
|
90
|
+
- `CARD_TITLE` — summary
|
|
91
|
+
- `CARD_DESCRIPTION` — full description
|
|
92
|
+
- `ACCEPTANCE_CRITERIA` — look for "AC:", "Given/When/Then", numbered/checklist items
|
|
93
|
+
- `FIGMA_URL_FROM_CARD` — any Figma link found in description or comments
|
|
94
|
+
- `PROJECT_KEY` — for bug filing later
|
|
95
|
+
|
|
96
|
+
Run token tracking `jira_fetch` checkpoint.
|
|
97
|
+
|
|
98
|
+
### 1b — Truncate Jira data if card is verbose
|
|
99
|
+
|
|
100
|
+
After fetching, check `CARD_DESCRIPTION` length:
|
|
101
|
+
- If it exceeds 800 words AND contains sections beyond acceptance criteria (e.g. technical notes, design references, comment threads, embedded images):
|
|
102
|
+
- Keep: Title, all Acceptance Criteria / Given-When-Then blocks, any Figma links
|
|
103
|
+
- Discard: Lengthy prose, embedded image references, comment threads, implementation notes
|
|
104
|
+
- Note internally: "Jira description truncated — AC only retained"
|
|
105
|
+
- If it is under 800 words or contains only AC — keep in full
|
|
106
|
+
|
|
107
|
+
Do NOT tell the user the description was truncated. This prevents verbose cards from consuming 5k+ tokens before testing even starts.
|
|
108
|
+
|
|
109
|
+
If no AC found:
|
|
110
|
+
> "No Acceptance Criteria found on this card. What should be tested?"
|
|
111
|
+
Wait for user response before continuing.
|
|
112
|
+
|
|
113
|
+
After fetch, ask these **one at a time**:
|
|
114
|
+
|
|
115
|
+
**Question A — UI Testing:**
|
|
116
|
+
> "Do you want to compare the app against a Figma design before testing? (yes / no)"
|
|
117
|
+
|
|
118
|
+
- If yes: ask for Figma URL (suggest `FIGMA_URL_FROM_CARD` if found), then app URL + credentials
|
|
119
|
+
- If no: ask for app URL + credentials only
|
|
120
|
+
|
|
121
|
+
Store:
|
|
122
|
+
- `RUN_UI_TEST` — true/false
|
|
123
|
+
- `FIGMA_URL` — if yes
|
|
124
|
+
- `APP_URL` — full base URL of the app
|
|
125
|
+
- `USERNAME`, `PASSWORD` — login credentials (ask only if not obvious from card)
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Phase 2 — UI Testing (optional)
|
|
130
|
+
|
|
131
|
+
**Skip if `RUN_UI_TEST = false`** — note "UI Testing: skipped" in final summary.
|
|
132
|
+
|
|
133
|
+
If running:
|
|
134
|
+
> **[Step 1/4] UI Testing — comparing [CARD_ID] live app against Figma...**
|
|
135
|
+
|
|
136
|
+
Invoke the ui-test-figma skill. Pre-fill its questions using collected values:
|
|
137
|
+
- Figma URL → `FIGMA_URL`
|
|
138
|
+
- App URL → `APP_URL`
|
|
139
|
+
- Credentials → `USERNAME` / `PASSWORD`
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Skill: ui-test-figma
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Run token tracking `ui_testing` checkpoint after completion.
|
|
146
|
+
|
|
147
|
+
Brief summary:
|
|
148
|
+
> "UI Testing complete — [N] failures, [N] warnings. Proceeding to manual tests."
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Phase 3 — Manual Test Execution + Automation Hint Capture
|
|
153
|
+
|
|
154
|
+
> **[Step 2/4] Manual Testing — executing tests for [CARD_ID]...**
|
|
155
|
+
|
|
156
|
+
Initialize an empty hints log in memory:
|
|
157
|
+
```
|
|
158
|
+
HINTS = {
|
|
159
|
+
card: CARD_ID,
|
|
160
|
+
baseUrl: BASE_URL,
|
|
161
|
+
appUrl: APP_URL,
|
|
162
|
+
pages: [],
|
|
163
|
+
elements: {}, // keyed by page URL
|
|
164
|
+
testCases: [],
|
|
165
|
+
notes: []
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 3a — Generate Test Plan
|
|
170
|
+
|
|
171
|
+
From the AC, generate numbered test ideas:
|
|
172
|
+
- 1–3 tests per AC item
|
|
173
|
+
- 2+ negative/edge case tests
|
|
174
|
+
- 1+ error state test
|
|
175
|
+
|
|
176
|
+
Show as a compact table (T-01, T-02 ... with name and expected outcome).
|
|
177
|
+
Ask: `"Ready to run these tests? (yes / no or edit)"`
|
|
178
|
+
Proceed on confirmation.
|
|
179
|
+
|
|
180
|
+
### 3b — Setup Browser + Capture Login Selectors
|
|
181
|
+
|
|
182
|
+
**Before navigating — check for an existing session:**
|
|
183
|
+
```bash
|
|
184
|
+
ls .playwright-session.json 2>/dev/null && echo "SESSION_EXISTS" || echo "NO_SESSION"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**If `.playwright-session.json` exists:**
|
|
188
|
+
- Use it for all CLI screenshots in Phase 3c — skip the entire login flow below
|
|
189
|
+
- Verify the session is still valid by navigating to `APP_URL`:
|
|
190
|
+
- If the dashboard/home loads → session valid, proceed directly to 3a test plan generation
|
|
191
|
+
- If redirected to login → session expired, delete the file and proceed with login below
|
|
192
|
+
|
|
193
|
+
**If no session file (or session expired):**
|
|
194
|
+
|
|
195
|
+
1. `browser_navigate(url: APP_URL)`
|
|
196
|
+
2. `browser_wait_for(state: "networkidle")`
|
|
197
|
+
|
|
198
|
+
**If login required:**
|
|
199
|
+
3. `browser_snapshot()` — ONE allowed snapshot to read login form selectors
|
|
200
|
+
4. Record all login elements found into `HINTS.elements[LOGIN_URL]`:
|
|
201
|
+
- For each input/button interacted with, note: tag, locator used, role/text, data-testid if present
|
|
202
|
+
5. Fill email → `browser_fill`
|
|
203
|
+
6. Fill password → `browser_fill`
|
|
204
|
+
7. Click login button → `browser_click`
|
|
205
|
+
8. `browser_wait_for(state: "networkidle")`
|
|
206
|
+
|
|
207
|
+
**If OTP screen appears:**
|
|
208
|
+
9. Click first OTP box → `browser_click`
|
|
209
|
+
10. `browser_type(text: "999999")` — always this value
|
|
210
|
+
11. Click verify → `browser_click`
|
|
211
|
+
12. `browser_wait_for(state: "networkidle")`
|
|
212
|
+
|
|
213
|
+
Confirm login success before proceeding.
|
|
214
|
+
|
|
215
|
+
**Save session state immediately after successful login:**
|
|
216
|
+
```javascript
|
|
217
|
+
browser_evaluate({
|
|
218
|
+
expression: `(() => JSON.stringify({
|
|
219
|
+
ls: Object.fromEntries(Object.entries(localStorage)),
|
|
220
|
+
ss: Object.fromEntries(Object.entries(sessionStorage)),
|
|
221
|
+
url: window.location.href
|
|
222
|
+
}))()`
|
|
223
|
+
})
|
|
224
|
+
```
|
|
225
|
+
Write the result to `.playwright-session.json`. All Phase 3c CLI screenshots must now use:
|
|
226
|
+
```bash
|
|
227
|
+
npx playwright screenshot \
|
|
228
|
+
--storage-state .playwright-session.json \
|
|
229
|
+
--browser chromium \
|
|
230
|
+
--full-page \
|
|
231
|
+
--wait-for-timeout 2000 \
|
|
232
|
+
"TARGET_URL" \
|
|
233
|
+
outputs/screenshots/T-[N]-[status].png
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Add to `HINTS.pages`: `{ url: LOGIN_URL, description: "Login page" }`
|
|
237
|
+
Add to `HINTS.notes`: any special login behavior observed (OTP type, error format, redirect URL)
|
|
238
|
+
|
|
239
|
+
### 3c — Execute Tests + Log Automation Hints
|
|
240
|
+
|
|
241
|
+
For each test T-01, T-02, ...:
|
|
242
|
+
|
|
243
|
+
1. Navigate to the feature area via Playwright MCP (preserves session)
|
|
244
|
+
2. Add current URL to `HINTS.pages` if not already present
|
|
245
|
+
|
|
246
|
+
3. For each browser interaction (`browser_fill`, `browser_click`, `browser_select_option`):
|
|
247
|
+
- Execute the interaction
|
|
248
|
+
- Immediately run element capture (zero-token, targeted JS):
|
|
249
|
+
```javascript
|
|
250
|
+
browser_evaluate({ expression: `
|
|
251
|
+
(() => {
|
|
252
|
+
const el = document.activeElement;
|
|
253
|
+
if (!el || el === document.body) return null;
|
|
254
|
+
return {
|
|
255
|
+
tag: el.tagName.toLowerCase(),
|
|
256
|
+
id: el.id || null,
|
|
257
|
+
testid: el.getAttribute('data-testid') || null,
|
|
258
|
+
role: el.getAttribute('role') || el.type || null,
|
|
259
|
+
text: el.innerText?.trim().slice(0, 60) || el.value?.slice(0, 60) || null,
|
|
260
|
+
name: el.name || null,
|
|
261
|
+
type: el.type || null,
|
|
262
|
+
nth: [...document.querySelectorAll(el.tagName)].indexOf(el)
|
|
263
|
+
};
|
|
264
|
+
})()
|
|
265
|
+
` })
|
|
266
|
+
```
|
|
267
|
+
- Append result to `HINTS.elements[CURRENT_URL]` with a label (e.g. "email input", "submit button")
|
|
268
|
+
|
|
269
|
+
4. Take screenshot via Playwright CLI (zero response tokens):
|
|
270
|
+
```bash
|
|
271
|
+
mkdir -p outputs/screenshots
|
|
272
|
+
npx playwright screenshot \
|
|
273
|
+
--browser chromium \
|
|
274
|
+
--full-page \
|
|
275
|
+
--wait-for-timeout 2000 \
|
|
276
|
+
"CURRENT_URL" \
|
|
277
|
+
outputs/screenshots/T-[N]-[pass|fail|observation].png
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
5. Assert expected result via targeted `browser_evaluate` on specific selectors
|
|
281
|
+
|
|
282
|
+
6. Log test result (to file only, not chat):
|
|
283
|
+
`T-N | title | status | expected | actual | screenshot path`
|
|
284
|
+
|
|
285
|
+
7. Append to `HINTS.testCases`:
|
|
286
|
+
```
|
|
287
|
+
{ id: "T-N", name: "...", status: "PASS|FAIL|OBSERVATION|BLOCKED",
|
|
288
|
+
actions: ["fill email", "click submit", "type OTP 999999"],
|
|
289
|
+
url: "CURRENT_URL" }
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Show only running count in chat: `T-01 ✅ T-02 ❌ T-03 ✅ ...`
|
|
293
|
+
|
|
294
|
+
Status codes: ✅ PASS | ❌ FAIL | ⚠️ OBSERVATION | 🔒 BLOCKED
|
|
295
|
+
|
|
296
|
+
Never skip a test.
|
|
297
|
+
|
|
298
|
+
### 3d — Save Execution Report
|
|
299
|
+
|
|
300
|
+
Save to `outputs/test-execution-[CARD_ID]-[YYYYMMDD].md`:
|
|
301
|
+
- Tester, date, environment, session duration
|
|
302
|
+
- All test results with expected vs actual
|
|
303
|
+
- Screenshot references
|
|
304
|
+
- Observations, risks
|
|
305
|
+
|
|
306
|
+
### 3e — Save Automation Hints File
|
|
307
|
+
|
|
308
|
+
After all tests complete, write `outputs/automation-hints-[CARD_ID]-[YYYYMMDD].md`:
|
|
309
|
+
|
|
310
|
+
```markdown
|
|
311
|
+
# Automation Hints — [CARD_ID]
|
|
312
|
+
Generated: [date] by manual-testing skill
|
|
313
|
+
Card: [JIRA_URL]
|
|
314
|
+
Base URL: [BASE_URL]
|
|
315
|
+
|
|
316
|
+
## Environment
|
|
317
|
+
App URL: [APP_URL]
|
|
318
|
+
Login: [USERNAME] / [PASSWORD REDACTED]
|
|
319
|
+
|
|
320
|
+
## Pages Visited
|
|
321
|
+
| URL | Description |
|
|
322
|
+
|-----|-------------|
|
|
323
|
+
| [url] | [description] |
|
|
324
|
+
|
|
325
|
+
## Elements Discovered
|
|
326
|
+
|
|
327
|
+
### [Page Name] ([URL])
|
|
328
|
+
| Element | Locator | Method | data-testid | Notes |
|
|
329
|
+
|---------|---------|--------|-------------|-------|
|
|
330
|
+
| [label] | [selector] | [positional/testid/role/text] | [value or none] | [observations] |
|
|
331
|
+
|
|
332
|
+
## Test Cases Executed
|
|
333
|
+
| ID | Name | Status | Key Actions |
|
|
334
|
+
|----|------|--------|-------------|
|
|
335
|
+
| T-01 | [name] | PASS | [comma-separated action list] |
|
|
336
|
+
|
|
337
|
+
## Automation Notes
|
|
338
|
+
[freeform observations: OTP behavior, error message format, API seeding needed,
|
|
339
|
+
redirect URLs, any elements that need data-testid added, etc.]
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Tell the user (one line):
|
|
343
|
+
> "Automation hints saved: `outputs/automation-hints-[CARD_ID]-[YYYYMMDD].md`"
|
|
344
|
+
|
|
345
|
+
Run token tracking `test_execution` checkpoint.
|
|
346
|
+
|
|
347
|
+
### 3f — Write Selector Context Update
|
|
348
|
+
|
|
349
|
+
After saving the automation hints file, silently update the product context.
|
|
350
|
+
|
|
351
|
+
Derive `PRODUCT_FOLDER` from `PROJECT_KEY` fetched in Phase 1 (uppercase, spaces → `_`).
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
CONTEXT_FILE = .claude/skills/qa-agent/product_context/{PRODUCT_FOLDER}/context.md
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**If context file exists:**
|
|
358
|
+
1. For each entry in `HINTS.elements` — append one row to `Element Selectors` if the Element Label is not already present:
|
|
359
|
+
- Element Label | Page URL | Locator | Method (testid/role/css) | data-testid value or "none" | Card ID
|
|
360
|
+
2. For each entry in `HINTS.pages` — if the URL is a new module pattern not seen before, add a note to `Environment Notes` with the URL and its description
|
|
361
|
+
|
|
362
|
+
Use the Edit tool to append rows — do not overwrite any existing content.
|
|
363
|
+
|
|
364
|
+
**If context file does not exist — skip silently.** qa-agent Step 6 will create it at the end of the run.
|
|
365
|
+
|
|
366
|
+
One-line confirmation (only if rows were actually added):
|
|
367
|
+
```
|
|
368
|
+
Selectors added to product context ({N} elements merged).
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## Phase 4 — Bug Reporting (Fully Automated)
|
|
374
|
+
|
|
375
|
+
> **[Step 3/4] Bug Reporting — filing bugs for [CARD_ID]...**
|
|
376
|
+
|
|
377
|
+
Do NOT invoke the `bug-reporting` skill. File bugs directly using Atlassian MCP inline —
|
|
378
|
+
this keeps context contiguous and avoids a second skill invocation.
|
|
379
|
+
|
|
380
|
+
**Step 4a — Build bug payload for each ❌ FAIL and ⚠️ OBSERVATION**
|
|
381
|
+
|
|
382
|
+
Derive all fields from test execution data — no user input needed:
|
|
383
|
+
|
|
384
|
+
| Field | Source |
|
|
385
|
+
|-------|--------|
|
|
386
|
+
| Summary | `"T-{N}: {test name} — {actual outcome in one line}"` |
|
|
387
|
+
| Description | Steps from test case + expected vs actual from execution log |
|
|
388
|
+
| Severity | AC explicitly failed → High · Assertion failed → Medium · Observation → Low |
|
|
389
|
+
| Screenshot | Match `outputs/screenshots/T-{N}-*.png` by test ID — use exact filename |
|
|
390
|
+
|
|
391
|
+
**Step 4b — File each bug via Atlassian MCP (parallelise where possible)**
|
|
392
|
+
|
|
393
|
+
For each failure:
|
|
394
|
+
1. `createJiraIssue` — issuetype: Bug, summary and description derived above, project: same as `CARD_ID`
|
|
395
|
+
2. `createIssueLink` — link new bug "relates to" `CARD_ID`
|
|
396
|
+
3. Screenshot attachment — use Jira REST API curl (same method as bug-reporting SKILL.md Step 6b); skip silently if `.env` credentials not set
|
|
397
|
+
|
|
398
|
+
**Step 4c — Add summary comment to original card**
|
|
399
|
+
|
|
400
|
+
`addCommentToJiraIssue` on `CARD_ID`:
|
|
401
|
+
```
|
|
402
|
+
🧪 Manual Testing Complete
|
|
403
|
+
|
|
404
|
+
Results: {X} Pass | {X} Fail | {X} Observation | {X} Blocked | {X} Total
|
|
405
|
+
Bugs filed: {BUG-KEY1}, {BUG-KEY2}, ...
|
|
406
|
+
Report: outputs/test-execution-{CARD_ID}-{YYYYMMDD}.md
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
**Step 4d — Announce**
|
|
410
|
+
```
|
|
411
|
+
Bug Reporting complete — {N} bug(s) filed: {BUG-KEY1}, {BUG-KEY2}, ...
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
Run `bug_reporting` token checkpoint.
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## Phase 5 — Test Charter (Publish)
|
|
419
|
+
|
|
420
|
+
> **[Step 4/4] Test Charter — generating and publishing for [CARD_ID]...**
|
|
421
|
+
|
|
422
|
+
Invoke test-charter skill. Pre-fill its context:
|
|
423
|
+
- Report file: `outputs/test-execution-[CARD_ID]-[YYYYMMDD].md`
|
|
424
|
+
- Card key, tester name, and date already known
|
|
425
|
+
|
|
426
|
+
```
|
|
427
|
+
Skill: test-charter
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
Run token tracking `end + report + session` close-out after charter publishes.
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## Phase 6 — Automation Handoff
|
|
435
|
+
|
|
436
|
+
After charter completes, show the final summary:
|
|
437
|
+
|
|
438
|
+
```
|
|
439
|
+
Manual Testing Complete — [CARD_ID]
|
|
440
|
+
|
|
441
|
+
UI Testing (Figma) : [completed / skipped]
|
|
442
|
+
Manual Testing : X Pass | X Fail | X Observation | X Blocked
|
|
443
|
+
Bug Reporting : [N] bug(s) filed — [keys]
|
|
444
|
+
Test Charter : [published URL or "saved locally"]
|
|
445
|
+
Automation hints : outputs/automation-hints-[CARD_ID]-[YYYYMMDD].md
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**If AUTO_APPROVE = true (called from qa-agent full pipeline):**
|
|
449
|
+
|
|
450
|
+
Do NOT ask. Immediately chain to automation:
|
|
451
|
+
> "Auto-invoking Automation Agent — generating BDD tests from execution results.
|
|
452
|
+
> Hints file ready: `outputs/automation-hints-[CARD_ID]-[YYYYMMDD].md` — DOM re-discovery skipped for captured elements."
|
|
453
|
+
|
|
454
|
+
Invoke:
|
|
455
|
+
```
|
|
456
|
+
Skill: automation args: [CARD_ID] AUTO_APPROVE=true hints: outputs/automation-hints-[CARD_ID]-[YYYYMMDD].md
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
**If AUTO_APPROVE = false (standalone run):**
|
|
460
|
+
|
|
461
|
+
Ask once:
|
|
462
|
+
> "Would you like to run the **Automation Agent** now to generate BDD tests from these results?
|
|
463
|
+
> The hints file is ready — DOM re-discovery will be skipped for captured elements.
|
|
464
|
+
> (yes / no)"
|
|
465
|
+
|
|
466
|
+
- **If yes:** invoke automation with hints file path:
|
|
467
|
+
```
|
|
468
|
+
Skill: automation
|
|
469
|
+
```
|
|
470
|
+
- **If no:** exit with the summary above.
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## Chat Output (Minimized)
|
|
475
|
+
|
|
476
|
+
Show in chat: phase announcements (1 line), test count running total, failure details only, bug keys, final summary.
|
|
477
|
+
|
|
478
|
+
Do NOT stream: full charter text, all test results (save to file), full bug reports, verbose execution logs.
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## Error Handling
|
|
483
|
+
|
|
484
|
+
| Situation | Action |
|
|
485
|
+
|-----------|--------|
|
|
486
|
+
| Jira card not found | Ask user to verify key |
|
|
487
|
+
| Auth fails | Stop, ask to verify credentials |
|
|
488
|
+
| Feature not deployed | Mark related tests 🔒 BLOCKED, continue |
|
|
489
|
+
| AC missing | Ask user to describe what to test |
|
|
490
|
+
| Playwright MCP unavailable | Stop, ask user to confirm it is running |
|
|
491
|
+
| Figma URL missing / user says no | Skip UI Testing, note in final summary |
|
|
492
|
+
| `browser_evaluate` returns null for element | Log "element not captured" in hints, continue |
|
|
493
|
+
| Bug creation fails | Note failure, continue with remaining bugs, report at end |
|