qa-skills 3.0.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.
Files changed (262) hide show
  1. package/README.md +168 -0
  2. package/bin/cli.js +42 -0
  3. package/dist/agents/registry.d.ts +5 -0
  4. package/dist/agents/registry.d.ts.map +1 -0
  5. package/dist/agents/registry.js +101 -0
  6. package/dist/agents/registry.js.map +1 -0
  7. package/dist/agents/types.d.ts +9 -0
  8. package/dist/agents/types.d.ts.map +1 -0
  9. package/dist/agents/types.js +2 -0
  10. package/dist/agents/types.js.map +1 -0
  11. package/dist/dependencies.d.ts +21 -0
  12. package/dist/dependencies.d.ts.map +1 -0
  13. package/dist/dependencies.js +125 -0
  14. package/dist/dependencies.js.map +1 -0
  15. package/dist/installer.d.ts +25 -0
  16. package/dist/installer.d.ts.map +1 -0
  17. package/dist/installer.js +437 -0
  18. package/dist/installer.js.map +1 -0
  19. package/dist/scaffold.d.ts +27 -0
  20. package/dist/scaffold.d.ts.map +1 -0
  21. package/dist/scaffold.js +182 -0
  22. package/dist/scaffold.js.map +1 -0
  23. package/package.json +40 -0
  24. package/skills/qa-accessibility-test-writer/SKILL.md +127 -0
  25. package/skills/qa-accessibility-test-writer/references/axe-core-patterns.md +349 -0
  26. package/skills/qa-accessibility-test-writer/references/best-practices.md +184 -0
  27. package/skills/qa-accessibility-test-writer/references/wcag-tests.md +331 -0
  28. package/skills/qa-api-contract-curator/SKILL.md +104 -0
  29. package/skills/qa-api-contract-curator/references/breaking-changes.md +363 -0
  30. package/skills/qa-api-contract-curator/references/openapi-structure.md +404 -0
  31. package/skills/qa-browser-data-collector/SKILL.md +132 -0
  32. package/skills/qa-browser-data-collector/references/data-collection-checklist.md +91 -0
  33. package/skills/qa-browser-data-collector/references/playwright-mcp-patterns.md +113 -0
  34. package/skills/qa-bug-ticket-creator/SKILL.md +148 -0
  35. package/skills/qa-bug-ticket-creator/references/bug-report-format.md +149 -0
  36. package/skills/qa-bug-ticket-creator/references/severity-guide.md +81 -0
  37. package/skills/qa-bug-ticket-creator/templates/bug-ticket-template.md +39 -0
  38. package/skills/qa-changelog-analyzer/SKILL.md +134 -0
  39. package/skills/qa-changelog-analyzer/references/git-analysis-patterns.md +138 -0
  40. package/skills/qa-changelog-analyzer/references/impact-mapping.md +120 -0
  41. package/skills/qa-clickup-integration/SKILL.md +166 -0
  42. package/skills/qa-clickup-integration/references/api-patterns.md +102 -0
  43. package/skills/qa-clickup-integration/references/field-mapping.md +71 -0
  44. package/skills/qa-codeceptjs-writer/SKILL.md +136 -0
  45. package/skills/qa-codeceptjs-writer/references/best-practices.md +207 -0
  46. package/skills/qa-codeceptjs-writer/references/config.md +255 -0
  47. package/skills/qa-codeceptjs-writer/references/patterns.md +285 -0
  48. package/skills/qa-coverage-analyzer/SKILL.md +166 -0
  49. package/skills/qa-coverage-analyzer/references/best-practices.md +142 -0
  50. package/skills/qa-coverage-analyzer/references/coverage-dimensions.md +155 -0
  51. package/skills/qa-coverage-analyzer/references/tools.md +204 -0
  52. package/skills/qa-cypress-writer/SKILL.md +134 -0
  53. package/skills/qa-cypress-writer/references/assertions.md +121 -0
  54. package/skills/qa-cypress-writer/references/best-practices.md +82 -0
  55. package/skills/qa-cypress-writer/references/config.md +121 -0
  56. package/skills/qa-cypress-writer/references/patterns.md +170 -0
  57. package/skills/qa-data-factory/SKILL.md +126 -0
  58. package/skills/qa-data-factory/references/factory-patterns.md +164 -0
  59. package/skills/qa-data-factory/references/faker-guide.md +131 -0
  60. package/skills/qa-diagram-generator/SKILL.md +125 -0
  61. package/skills/qa-diagram-generator/references/c4-model.md +53 -0
  62. package/skills/qa-diagram-generator/references/charts.md +58 -0
  63. package/skills/qa-diagram-generator/references/class-diagram.md +85 -0
  64. package/skills/qa-diagram-generator/references/er-diagram.md +69 -0
  65. package/skills/qa-diagram-generator/references/flowchart.md +92 -0
  66. package/skills/qa-diagram-generator/references/from-screenshot.md +45 -0
  67. package/skills/qa-diagram-generator/references/gantt.md +49 -0
  68. package/skills/qa-diagram-generator/references/journey.md +50 -0
  69. package/skills/qa-diagram-generator/references/mindmap.md +75 -0
  70. package/skills/qa-diagram-generator/references/sequence.md +69 -0
  71. package/skills/qa-diagram-generator/references/state-diagram.md +56 -0
  72. package/skills/qa-discovery-interview/SKILL.md +182 -0
  73. package/skills/qa-discovery-interview/references/completeness-checklist.md +53 -0
  74. package/skills/qa-discovery-interview/references/conflict-patterns.md +101 -0
  75. package/skills/qa-discovery-interview/references/qa-categories.md +147 -0
  76. package/skills/qa-discovery-interview/templates/qa-brief-template.md +168 -0
  77. package/skills/qa-environment-checker/SKILL.md +142 -0
  78. package/skills/qa-environment-checker/references/dependency-matrix.md +101 -0
  79. package/skills/qa-environment-checker/references/health-checks.md +209 -0
  80. package/skills/qa-environment-checker/templates/env-readiness-template.md +64 -0
  81. package/skills/qa-flaky-detector/SKILL.md +153 -0
  82. package/skills/qa-flaky-detector/references/ci-analysis.md +140 -0
  83. package/skills/qa-flaky-detector/references/flaky-patterns.md +247 -0
  84. package/skills/qa-github-issues-enhanced/SKILL.md +175 -0
  85. package/skills/qa-github-issues-enhanced/references/issue-templates.md +425 -0
  86. package/skills/qa-github-issues-enhanced/references/label-taxonomy.md +130 -0
  87. package/skills/qa-github-issues-enhanced/references/workflow-patterns.md +188 -0
  88. package/skills/qa-httpx-writer/SKILL.md +138 -0
  89. package/skills/qa-httpx-writer/references/assertions.md +195 -0
  90. package/skills/qa-httpx-writer/references/best-practices.md +140 -0
  91. package/skills/qa-httpx-writer/references/config.md +212 -0
  92. package/skills/qa-httpx-writer/references/patterns.md +262 -0
  93. package/skills/qa-jest-writer/SKILL.md +131 -0
  94. package/skills/qa-jest-writer/references/assertions.md +125 -0
  95. package/skills/qa-jest-writer/references/best-practices.md +136 -0
  96. package/skills/qa-jest-writer/references/config.md +134 -0
  97. package/skills/qa-jest-writer/references/patterns.md +172 -0
  98. package/skills/qa-jira-integration/SKILL.md +135 -0
  99. package/skills/qa-jira-integration/references/api-patterns.md +143 -0
  100. package/skills/qa-jira-integration/references/field-mapping.md +79 -0
  101. package/skills/qa-jira-integration/references/xray-integration.md +85 -0
  102. package/skills/qa-jmeter-writer/SKILL.md +171 -0
  103. package/skills/qa-jmeter-writer/references/best-practices.md +157 -0
  104. package/skills/qa-jmeter-writer/references/config.md +204 -0
  105. package/skills/qa-jmeter-writer/references/patterns.md +242 -0
  106. package/skills/qa-junit5-writer/SKILL.md +157 -0
  107. package/skills/qa-junit5-writer/references/assertions.md +118 -0
  108. package/skills/qa-junit5-writer/references/config.md +97 -0
  109. package/skills/qa-junit5-writer/references/patterns.md +162 -0
  110. package/skills/qa-k6-writer/SKILL.md +155 -0
  111. package/skills/qa-k6-writer/references/best-practices.md +236 -0
  112. package/skills/qa-k6-writer/references/config.md +219 -0
  113. package/skills/qa-k6-writer/references/patterns.md +304 -0
  114. package/skills/qa-linear-integration/SKILL.md +137 -0
  115. package/skills/qa-linear-integration/references/api-patterns.md +249 -0
  116. package/skills/qa-linear-integration/references/field-mapping.md +121 -0
  117. package/skills/qa-locust-writer/SKILL.md +151 -0
  118. package/skills/qa-locust-writer/references/best-practices.md +126 -0
  119. package/skills/qa-locust-writer/references/config.md +170 -0
  120. package/skills/qa-locust-writer/references/patterns.md +235 -0
  121. package/skills/qa-manual-test-designer/SKILL.md +145 -0
  122. package/skills/qa-manual-test-designer/references/exploratory-charters.md +138 -0
  123. package/skills/qa-manual-test-designer/references/personas.md +146 -0
  124. package/skills/qa-manual-test-designer/templates/exploratory-charter-template.md +47 -0
  125. package/skills/qa-manual-test-designer/templates/test-case-template.md +31 -0
  126. package/skills/qa-mobile-test-writer/SKILL.md +144 -0
  127. package/skills/qa-mobile-test-writer/references/best-practices.md +214 -0
  128. package/skills/qa-mobile-test-writer/references/config.md +309 -0
  129. package/skills/qa-mobile-test-writer/references/patterns.md +304 -0
  130. package/skills/qa-nfr-analyst/SKILL.md +177 -0
  131. package/skills/qa-nfr-analyst/references/iso-25010-model.md +159 -0
  132. package/skills/qa-nfr-analyst/references/owasp-wstg-baseline.md +202 -0
  133. package/skills/qa-nfr-analyst/references/wcag-checklist.md +184 -0
  134. package/skills/qa-nfr-analyst/templates/owasp-checklist-template.md +89 -0
  135. package/skills/qa-nfr-analyst/templates/wcag-checklist-template.md +48 -0
  136. package/skills/qa-orchestrator/SKILL.md +132 -0
  137. package/skills/qa-orchestrator/references/handoff-chains.md +105 -0
  138. package/skills/qa-orchestrator/references/pipeline-modes.md +115 -0
  139. package/skills/qa-orchestrator/references/scheduler-rules.md +84 -0
  140. package/skills/qa-pact-writer/SKILL.md +133 -0
  141. package/skills/qa-pact-writer/references/best-practices.md +100 -0
  142. package/skills/qa-pact-writer/references/config.md +135 -0
  143. package/skills/qa-pact-writer/references/patterns.md +161 -0
  144. package/skills/qa-plan-creator/SKILL.md +139 -0
  145. package/skills/qa-plan-creator/references/introduction-plan.md +43 -0
  146. package/skills/qa-plan-creator/references/migration-plan.md +44 -0
  147. package/skills/qa-plan-creator/references/onboarding-plan.md +46 -0
  148. package/skills/qa-plan-creator/references/performance-plan.md +44 -0
  149. package/skills/qa-plan-creator/references/regression-plan.md +45 -0
  150. package/skills/qa-plan-creator/references/release-plan.md +45 -0
  151. package/skills/qa-plan-creator/references/sprint-plan.md +44 -0
  152. package/skills/qa-plan-creator/references/test-plan.md +59 -0
  153. package/skills/qa-plan-creator/references/uat-plan.md +43 -0
  154. package/skills/qa-plan-creator/templates/checklist-template.md +36 -0
  155. package/skills/qa-plan-creator/templates/regression-checklist-template.md +49 -0
  156. package/skills/qa-plan-creator/templates/release-checklist-template.md +46 -0
  157. package/skills/qa-plan-creator/templates/test-plan-template.md +74 -0
  158. package/skills/qa-playwright-py-writer/SKILL.md +156 -0
  159. package/skills/qa-playwright-py-writer/references/best-practices.md +194 -0
  160. package/skills/qa-playwright-py-writer/references/config.md +195 -0
  161. package/skills/qa-playwright-py-writer/references/patterns.md +212 -0
  162. package/skills/qa-playwright-ts-writer/SKILL.md +151 -0
  163. package/skills/qa-playwright-ts-writer/references/assertions.md +109 -0
  164. package/skills/qa-playwright-ts-writer/references/best-practices.md +191 -0
  165. package/skills/qa-playwright-ts-writer/references/config.md +144 -0
  166. package/skills/qa-playwright-ts-writer/references/patterns.md +171 -0
  167. package/skills/qa-pytest-writer/SKILL.md +145 -0
  168. package/skills/qa-pytest-writer/references/assertions.md +149 -0
  169. package/skills/qa-pytest-writer/references/best-practices.md +97 -0
  170. package/skills/qa-pytest-writer/references/config.md +176 -0
  171. package/skills/qa-pytest-writer/references/patterns.md +251 -0
  172. package/skills/qa-qase-integration/SKILL.md +149 -0
  173. package/skills/qa-qase-integration/references/api-reference.md +354 -0
  174. package/skills/qa-qase-integration/references/ci-integration.md +196 -0
  175. package/skills/qa-qase-integration/references/field-mapping.md +157 -0
  176. package/skills/qa-requirements-generator/SKILL.md +152 -0
  177. package/skills/qa-requirements-generator/references/iso-29148-structure.md +153 -0
  178. package/skills/qa-requirements-generator/references/requirement-patterns.md +278 -0
  179. package/skills/qa-rest-assured-writer/SKILL.md +137 -0
  180. package/skills/qa-rest-assured-writer/references/best-practices.md +50 -0
  181. package/skills/qa-rest-assured-writer/references/config.md +124 -0
  182. package/skills/qa-rest-assured-writer/references/patterns.md +192 -0
  183. package/skills/qa-risk-analyzer/SKILL.md +158 -0
  184. package/skills/qa-risk-analyzer/references/impact-analysis.md +133 -0
  185. package/skills/qa-risk-analyzer/references/risk-factors.md +123 -0
  186. package/skills/qa-robot-framework-writer/SKILL.md +147 -0
  187. package/skills/qa-robot-framework-writer/references/best-practices.md +249 -0
  188. package/skills/qa-robot-framework-writer/references/config.md +204 -0
  189. package/skills/qa-robot-framework-writer/references/libraries.md +273 -0
  190. package/skills/qa-robot-framework-writer/references/patterns.md +216 -0
  191. package/skills/qa-security-test-writer/SKILL.md +123 -0
  192. package/skills/qa-security-test-writer/references/best-practices.md +155 -0
  193. package/skills/qa-security-test-writer/references/owasp-top10.md +331 -0
  194. package/skills/qa-security-test-writer/references/zap-config.md +258 -0
  195. package/skills/qa-selenium-java-writer/SKILL.md +143 -0
  196. package/skills/qa-selenium-java-writer/references/best-practices.md +59 -0
  197. package/skills/qa-selenium-java-writer/references/config.md +143 -0
  198. package/skills/qa-selenium-java-writer/references/patterns.md +170 -0
  199. package/skills/qa-selenium-py-writer/SKILL.md +150 -0
  200. package/skills/qa-selenium-py-writer/references/best-practices.md +175 -0
  201. package/skills/qa-selenium-py-writer/references/config.md +224 -0
  202. package/skills/qa-selenium-py-writer/references/patterns.md +255 -0
  203. package/skills/qa-shortcut-integration/SKILL.md +143 -0
  204. package/skills/qa-shortcut-integration/references/api-patterns.md +126 -0
  205. package/skills/qa-shortcut-integration/references/field-mapping.md +66 -0
  206. package/skills/qa-spec-auditor/SKILL.md +162 -0
  207. package/skills/qa-spec-auditor/references/audit-checklist.md +144 -0
  208. package/skills/qa-spec-auditor/references/drift-patterns.md +207 -0
  209. package/skills/qa-spec-writer/SKILL.md +143 -0
  210. package/skills/qa-spec-writer/references/gherkin-guide.md +253 -0
  211. package/skills/qa-spec-writer/references/specification-patterns.md +274 -0
  212. package/skills/qa-spring-test-writer/SKILL.md +170 -0
  213. package/skills/qa-spring-test-writer/references/best-practices.md +57 -0
  214. package/skills/qa-spring-test-writer/references/config.md +179 -0
  215. package/skills/qa-spring-test-writer/references/patterns.md +235 -0
  216. package/skills/qa-supertest-writer/SKILL.md +150 -0
  217. package/skills/qa-supertest-writer/references/assertions.md +192 -0
  218. package/skills/qa-supertest-writer/references/best-practices.md +102 -0
  219. package/skills/qa-supertest-writer/references/config.md +166 -0
  220. package/skills/qa-supertest-writer/references/patterns.md +242 -0
  221. package/skills/qa-task-creator/SKILL.md +142 -0
  222. package/skills/qa-task-creator/references/linking-patterns.md +127 -0
  223. package/skills/qa-task-creator/references/task-types.md +169 -0
  224. package/skills/qa-task-creator/templates/task-template.md +24 -0
  225. package/skills/qa-test-doc-compiler/SKILL.md +114 -0
  226. package/skills/qa-test-doc-compiler/references/agile-tailoring.md +220 -0
  227. package/skills/qa-test-doc-compiler/references/iso-29119-3-documents.md +302 -0
  228. package/skills/qa-test-healer/SKILL.md +101 -0
  229. package/skills/qa-test-healer/references/diagnosis-patterns.md +142 -0
  230. package/skills/qa-test-healer/references/fix-strategies.md +177 -0
  231. package/skills/qa-test-reporter/SKILL.md +130 -0
  232. package/skills/qa-test-reporter/references/best-practices.md +162 -0
  233. package/skills/qa-test-reporter/references/iso-29119-reports.md +236 -0
  234. package/skills/qa-test-reporter/references/report-formats.md +287 -0
  235. package/skills/qa-test-reviewer/SKILL.md +142 -0
  236. package/skills/qa-test-reviewer/references/anti-patterns.md +268 -0
  237. package/skills/qa-test-reviewer/references/review-checklist.md +93 -0
  238. package/skills/qa-test-strategy/SKILL.md +133 -0
  239. package/skills/qa-test-strategy/references/entry-exit-criteria.md +176 -0
  240. package/skills/qa-test-strategy/references/risk-matrix.md +102 -0
  241. package/skills/qa-test-strategy/references/testing-types.md +143 -0
  242. package/skills/qa-testcase-from-docs/SKILL.md +161 -0
  243. package/skills/qa-testcase-from-docs/references/test-case-format.md +196 -0
  244. package/skills/qa-testcase-from-docs/references/test-design-techniques.md +126 -0
  245. package/skills/qa-testcase-from-docs/templates/test-case-template.md +31 -0
  246. package/skills/qa-testcase-from-ui/SKILL.md +109 -0
  247. package/skills/qa-testcase-from-ui/references/ui-element-patterns.md +126 -0
  248. package/skills/qa-testcase-from-ui/references/visual-analysis-guide.md +146 -0
  249. package/skills/qa-testcase-from-ui/templates/test-case-template.md +31 -0
  250. package/skills/qa-visual-regression-writer/SKILL.md +175 -0
  251. package/skills/qa-visual-regression-writer/references/best-practices.md +154 -0
  252. package/skills/qa-visual-regression-writer/references/config.md +220 -0
  253. package/skills/qa-visual-regression-writer/references/patterns.md +213 -0
  254. package/skills/qa-vitest-writer/SKILL.md +141 -0
  255. package/skills/qa-vitest-writer/references/assertions.md +105 -0
  256. package/skills/qa-vitest-writer/references/best-practices.md +62 -0
  257. package/skills/qa-vitest-writer/references/config.md +127 -0
  258. package/skills/qa-vitest-writer/references/patterns.md +141 -0
  259. package/skills/qa-webdriverio-writer/SKILL.md +145 -0
  260. package/skills/qa-webdriverio-writer/references/best-practices.md +176 -0
  261. package/skills/qa-webdriverio-writer/references/config.md +240 -0
  262. package/skills/qa-webdriverio-writer/references/patterns.md +269 -0
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: qa-test-healer
3
+ description: Self-healing test system that runs failing tests, debugs with MCP tools, auto-fixes broken selectors/assertions/waits, and marks unfixable tests as test.fixme() with explanation.
4
+ ---
5
+
6
+ # QA Test Healer
7
+
8
+ ## Purpose
9
+
10
+ Automatically fix broken tests after code changes. Inspired by fugazi/test-automation-skills-agents, this skill runs failing tests in headed/debug mode, analyzes failures, applies targeted fixes, and either restores passing tests or marks unfixable cases as `test.fixme()` with a clear explanation.
11
+
12
+ ## Trigger Phrases
13
+
14
+ - "Heal my failing tests"
15
+ - "Fix broken Playwright/Cypress tests"
16
+ - "Auto-fix test failures"
17
+ - "Tests are failing after my changes"
18
+ - "Debug and fix selector/assertion failures"
19
+ - "Run failing test and fix it"
20
+
21
+ ## Healing Workflow
22
+
23
+ 1. **Receive failing test(s)** — User provides failing test path(s), error output, or CI failure logs
24
+ 2. **Run test in headed mode / with debug output** — Execute the test with visible browser and verbose logging to capture failure context
25
+ 3. **Analyze failure** — Determine root cause: selector broken? assertion changed? timeout? missing element? network change?
26
+ 4. **Apply fix strategy** — Use the appropriate strategy from `references/fix-strategies.md`
27
+ 5. **Re-run to verify fix** — Execute the test again; confirm it passes
28
+ 6. **If unfixable** — Mark as `test.fixme('explanation')` with a clear reason for manual review
29
+
30
+ ## Fix Strategies
31
+
32
+ | Failure Type | Strategy | Action |
33
+ |--------------|----------|--------|
34
+ | **Broken selectors** | Find new locator | Use accessibility snapshot (Playwright MCP) to inspect DOM; update POM/test with stable locator (getByRole, getByTestId preferred) |
35
+ | **Changed assertions** | Compare expected vs actual | If intentional product change, update expected values; otherwise flag for review |
36
+ | **Timeout issues** | Add explicit waits | Increase timeout thresholds, add `expect` with timeout, or use `waitFor` for async content |
37
+ | **Missing elements** | Check feature status | Determine if feature was removed/redesigned; flag for manual review or mark fixme |
38
+ | **Network changes** | Update mocks/routes | Update intercepted routes, mocks, or add retry logic for flaky endpoints |
39
+
40
+ See `references/fix-strategies.md` for detailed before/after examples.
41
+
42
+ ## Diagnosis Patterns
43
+
44
+ Use `references/diagnosis-patterns.md` for:
45
+
46
+ - **Error message parsing** — Extract selector, assertion, timeout from stack traces and failure output
47
+ - **DOM comparison** — Use browser snapshot to compare expected vs actual structure
48
+ - **Network analysis** — Inspect requests/responses when API or mock changes cause failures
49
+
50
+ ## MCP Integration
51
+
52
+ - **Playwright MCP (cursor-ide-browser)** — Run tests, navigate to failure state, take accessibility snapshots, inspect DOM, verify fixes
53
+ - **Lock/unlock workflow** — Lock browser before interactions; unlock when done
54
+
55
+ ## Scope
56
+
57
+ **Can do (autonomous):**
58
+ - Fix broken selectors by finding new locators via DOM inspection
59
+ - Update assertions when expected values have legitimately changed
60
+ - Add or adjust waits and timeouts for flaky/timeout failures
61
+ - Update network mocks, routes, or retry logic
62
+ - Mark unfixable tests as `test.fixme()` with explanation
63
+ - Run tests in headed mode to reproduce and verify fixes
64
+
65
+ **Cannot do (requires confirmation):**
66
+ - Rewrite test logic or change test intent
67
+ - Add new test cases or modify test structure significantly
68
+ - Change production code
69
+
70
+ **Will not do (out of scope):**
71
+ - Modify production/application code
72
+ - Execute tests in CI without user request
73
+ - Approve or merge code changes
74
+
75
+ ## References
76
+
77
+ | Topic | File |
78
+ |-------|------|
79
+ | Detailed fix strategies with before/after examples | `references/fix-strategies.md` |
80
+ | Error parsing, DOM comparison, network analysis | `references/diagnosis-patterns.md` |
81
+
82
+ ## Quality Checklist
83
+
84
+ - [ ] Root cause correctly identified before applying fix
85
+ - [ ] Fix strategy matches failure type per `references/fix-strategies.md`
86
+ - [ ] Test passes after fix (re-run verified)
87
+ - [ ] Unfixable tests marked with `test.fixme('clear explanation')`
88
+ - [ ] No production code modified
89
+ - [ ] POM updated if selector changed in shared locator
90
+ - [ ] Traceability preserved (test case IDs, comments)
91
+
92
+ ## Troubleshooting
93
+
94
+ | Symptom | Likely Cause | Fix |
95
+ |---------|--------------|-----|
96
+ | Can't reproduce failure locally | Environment difference, flaky test | Run with `--retries=0`; check CI env vars; use same baseURL |
97
+ | Snapshot shows different structure | Dynamic content, A/B test | Wait for stable state; use more resilient locators |
98
+ | Fix works once then fails | Race condition, shared state | Add proper wait; ensure test isolation |
99
+ | Multiple failures in one file | Cascading failure, setup issue | Fix setup/fixture first; run tests individually |
100
+ | test.fixme() not recognized | Framework difference | Use `test.skip()` or equivalent for Cypress/pytest |
101
+ | MCP browser not available | Playwright MCP not configured | Use terminal to run tests; analyze error output only |
@@ -0,0 +1,142 @@
1
+ # Diagnosis Patterns for Test Failures
2
+
3
+ Patterns for diagnosing test failures: error message parsing, DOM comparison, and network analysis.
4
+
5
+ ## 1. Error Message Parsing
6
+
7
+ ### Playwright Error Structure
8
+
9
+ Playwright failures typically include:
10
+ - **Error type** — `TimeoutError`, `Error`, `AssertionError`
11
+ - **Locator** — The selector that failed
12
+ - **Action** — click, fill, toBeVisible, etc.
13
+ - **Expected vs actual** — For assertions
14
+
15
+ ### Extraction Patterns
16
+
17
+ | Pattern | Regex/Approach | Use |
18
+ |---------|----------------|-----|
19
+ | Selector in error | `locator\('([^']+)'\)` or `getByRole\('([^']+)'` | Identify which locator failed |
20
+ | Timeout value | `Timeout (\d+)ms` | Check if timeout is too short |
21
+ | Expected text | `Expected: (.*)` | Compare with actual |
22
+ | Actual text | `Received: (.*)` | Compare with expected |
23
+ | Stack trace file:line | `at.*\(([^:]+):(\d+):\d+\)` | Locate exact line in test file |
24
+
25
+ ### Example Parse
26
+
27
+ ```
28
+ Error: expect(locator).toHaveText(expected)
29
+ Expected: "Welcome"
30
+ Received: "Welcome back!"
31
+ ```
32
+
33
+ **Extracted:** Assertion `toHaveText`; expected `"Welcome"`; actual `"Welcome back!"` → Likely intentional product change.
34
+
35
+ ### Cypress Error Structure
36
+
37
+ - `cy.get(...).should(...)` — Selector and assertion in chain
38
+ - `Timed out retrying` — Timeout/visibility issue
39
+ - `Expected X to equal Y` — Assertion mismatch
40
+
41
+ ### pytest/Playwright Python
42
+
43
+ - `TimeoutError` with locator repr
44
+ - `AssertionError: assert X == Y`
45
+
46
+ ---
47
+
48
+ ## 2. DOM Comparison
49
+
50
+ ### Using Accessibility Snapshot
51
+
52
+ 1. **Navigate to failure state** — Run test in headed mode; stop at failure or use `page.pause()`
53
+ 2. **Take snapshot** — `browser_snapshot` (Playwright MCP) returns accessibility tree
54
+ 3. **Compare expected vs actual** — Look for:
55
+ - Missing elements (role/name not in tree)
56
+ - Renamed elements (text changed)
57
+ - Structure change (nested differently)
58
+ - New overlays (modal, loading) blocking interaction
59
+
60
+ ### Snapshot Analysis Checklist
61
+
62
+ - [ ] Is the target element present? (search by role, name, or ref)
63
+ - [ ] Is it visible/enabled? (check `aria-hidden`, `disabled`)
64
+ - [ ] Is it obscured? (modal, overlay, another element on top)
65
+ - [ ] Has the hierarchy changed? (element moved under different parent)
66
+ - [ ] Are there multiple matches? (strict mode violation)
67
+
68
+ ### Interpreting Snapshot Output
69
+
70
+ ```
71
+ button "Submit" [ref=abc123]
72
+ - enabled, visible
73
+ ```
74
+
75
+ If test expects `button "Save"` but snapshot shows `button "Submit"` → Update locator or mark as product change.
76
+
77
+ ### Scoped Snapshots
78
+
79
+ Use `selector` parameter to snapshot a subtree (e.g., a form or modal) when the full page is large.
80
+
81
+ ---
82
+
83
+ ## 3. Network Analysis
84
+
85
+ ### When to Use
86
+
87
+ - Test fails after API call
88
+ - Mock not applied
89
+ - Request timeout or 404
90
+ - Response body/status changed
91
+
92
+ ### Inspection Steps
93
+
94
+ 1. **List requests** — `browser_network_requests` (Playwright MCP) or test trace
95
+ 2. **Filter by URL** — Find the request that failed or returned unexpected data
96
+ 3. **Check method/URL** — Did endpoint path change? (e.g., `/api/users` → `/api/v2/users`)
97
+ 4. **Check response** — Status code, body shape
98
+ 5. **Check timing** — Request took too long?
99
+
100
+ ### Common Network Failure Causes
101
+
102
+ | Cause | Symptom | Fix |
103
+ |-------|---------|-----|
104
+ | Endpoint renamed | 404 | Update `page.route` URL pattern |
105
+ | Response shape changed | Assertion on body fails | Update mock response or assertion |
106
+ | Request not sent | No matching request | Ensure route registered before `goto` |
107
+ | Slow API | Timeout | Increase timeout or add retry |
108
+ | CORS/auth | Request blocked | Update route handler or headers |
109
+
110
+ ### Route Registration Order
111
+
112
+ ```typescript
113
+ // Correct: route before navigation
114
+ await page.route('**/api/data', handler);
115
+ await page.goto('/page');
116
+ ```
117
+
118
+ ```typescript
119
+ // Wrong: navigation may complete before route is set
120
+ await page.goto('/page');
121
+ await page.route('**/api/data', handler);
122
+ ```
123
+
124
+ ---
125
+
126
+ ## 4. Combining Diagnosis Methods
127
+
128
+ For complex failures, combine:
129
+
130
+ 1. **Parse error** → Get selector, assertion, expected/actual
131
+ 2. **Snapshot DOM** → Verify element exists and state
132
+ 3. **Check network** → If failure involves API, verify requests
133
+
134
+ ### Decision Flow
135
+
136
+ ```
137
+ Parse error
138
+ → Selector timeout? → Snapshot: is element present? → Yes: increase timeout / add wait
139
+ → Selector timeout? → Snapshot: element missing? → Fixme or update flow
140
+ → Assertion mismatch? → Compare expected vs actual → Update or fixme
141
+ → Network error? → Inspect requests → Update route/mock
142
+ ```
@@ -0,0 +1,177 @@
1
+ # Fix Strategies for Test Healing
2
+
3
+ Detailed strategies for each failure type with before/after examples.
4
+
5
+ ## 1. Broken Selectors
6
+
7
+ ### Symptoms
8
+ - `TimeoutError: locator resolved to X elements` or `strict mode violation`
9
+ - `Error: No element found for selector`
10
+ - `Locator.click: Target closed`
11
+
12
+ ### Strategy
13
+ 1. Run test in headed mode; pause at failure point
14
+ 2. Take accessibility snapshot via Playwright MCP (`browser_snapshot`)
15
+ 3. Identify the target element in the snapshot (role, name, testid)
16
+ 4. Choose stable locator: `getByRole` > `getByTestId` > `getByLabel` > `getByText` > CSS
17
+ 5. Update POM or test file with new locator
18
+
19
+ ### Before
20
+ ```typescript
21
+ await page.click('button.submit-btn');
22
+ ```
23
+
24
+ ### After
25
+ ```typescript
26
+ await page.getByRole('button', { name: 'Submit' }).click();
27
+ ```
28
+
29
+ ### POM Update
30
+ If the selector lives in a Page Object, update the locator there so all tests using it benefit.
31
+
32
+ ```typescript
33
+ // Before (LoginPage.ts)
34
+ get submitButton() { return this.page.locator('button.submit-btn'); }
35
+
36
+ // After
37
+ get submitButton() { return this.page.getByRole('button', { name: 'Submit' }); }
38
+ ```
39
+
40
+ ---
41
+
42
+ ## 2. Changed Assertions
43
+
44
+ ### Symptoms
45
+ - `expect(locator).toHaveText(expected)` — actual text differs
46
+ - `expect(locator).toHaveValue(expected)` — value mismatch
47
+ - Snapshot/visual diff mismatch
48
+
49
+ ### Strategy
50
+ 1. Compare expected vs actual from error output
51
+ 2. Determine if change is intentional (product update) or a bug
52
+ 3. If intentional: update expected value in test
53
+ 4. If unintentional: mark as fixme with "Product regression: expected X, got Y"
54
+
55
+ ### Before
56
+ ```typescript
57
+ await expect(page.getByRole('heading')).toHaveText('Welcome, User');
58
+ ```
59
+
60
+ ### After (intentional product change)
61
+ ```typescript
62
+ await expect(page.getByRole('heading')).toHaveText('Welcome back!');
63
+ ```
64
+
65
+ ### After (unintentional — mark fixme)
66
+ ```typescript
67
+ test.fixme('Product regression: heading shows "Error" instead of "Welcome, User"');
68
+ ```
69
+
70
+ ---
71
+
72
+ ## 3. Timeout Issues
73
+
74
+ ### Symptoms
75
+ - `Timeout 5000ms exceeded`
76
+ - `Waiting for locator`
77
+ - Element appears but after a long delay
78
+
79
+ ### Strategy
80
+ 1. Identify what is slow: network, animation, lazy load?
81
+ 2. Add explicit wait for the condition (prefer `expect` with timeout over `waitForTimeout`)
82
+ 3. Increase timeout only when necessary (e.g., known slow API)
83
+
84
+ ### Before
85
+ ```typescript
86
+ await page.goto('/dashboard');
87
+ await page.getByText('Data loaded').click(); // Fails: element appears after 3s
88
+ ```
89
+
90
+ ### After
91
+ ```typescript
92
+ await page.goto('/dashboard');
93
+ await expect(page.getByText('Data loaded')).toBeVisible({ timeout: 10000 });
94
+ await page.getByText('Data loaded').click();
95
+ ```
96
+
97
+ ### For slow API
98
+ ```typescript
99
+ await expect(page.getByRole('status', { name: 'Loaded' })).toBeVisible({ timeout: 15000 });
100
+ ```
101
+
102
+ ---
103
+
104
+ ## 4. Missing Elements
105
+
106
+ ### Symptoms
107
+ - `Locator not found`
108
+ - Element was removed from DOM
109
+ - Feature redesigned
110
+
111
+ ### Strategy
112
+ 1. Take snapshot; confirm element is absent
113
+ 2. Check if feature was removed or moved (e.g., new modal, different page)
114
+ 3. If moved: update navigation/flow and locator
115
+ 4. If removed: mark test as fixme with "Feature removed: [description]"
116
+ 5. If uncertain: mark fixme with "Manual review: element not found"
117
+
118
+ ### Before
119
+ ```typescript
120
+ await page.getByRole('button', { name: 'Old CTA' }).click();
121
+ ```
122
+
123
+ ### After (feature removed)
124
+ ```typescript
125
+ test.fixme('Feature removed: "Old CTA" button no longer exists in UI');
126
+ ```
127
+
128
+ ### After (element moved)
129
+ ```typescript
130
+ await page.getByRole('link', { name: 'Settings' }).click();
131
+ await page.getByRole('button', { name: 'New CTA' }).click();
132
+ ```
133
+
134
+ ---
135
+
136
+ ## 5. Network Changes
137
+
138
+ ### Symptoms
139
+ - API returns different status/body
140
+ - Mock route no longer matches
141
+ - Request timeout or 404
142
+
143
+ ### Strategy
144
+ 1. Inspect network requests via `browser_network_requests` or test logs
145
+ 2. Update `page.route` URL pattern if endpoint changed
146
+ 3. Update mock response body/status if API contract changed
147
+ 4. Add retry logic for flaky endpoints (use sparingly)
148
+
149
+ ### Before
150
+ ```typescript
151
+ await page.route('**/api/users', route => route.fulfill({ status: 200, body: '[]' }));
152
+ ```
153
+
154
+ ### After (endpoint changed)
155
+ ```typescript
156
+ await page.route('**/api/v2/users', route => route.fulfill({ status: 200, body: '[]' }));
157
+ ```
158
+
159
+ ### After (response shape changed)
160
+ ```typescript
161
+ await page.route('**/api/users', route => route.fulfill({
162
+ status: 200,
163
+ body: JSON.stringify({ data: [] }),
164
+ }));
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Locator Priority (Stability)
170
+
171
+ When replacing selectors, prefer in this order:
172
+
173
+ 1. **getByRole** — Most resilient to DOM structure changes
174
+ 2. **getByTestId** — Explicit, requires `data-testid` in app
175
+ 3. **getByLabel** — Good for form fields
176
+ 4. **getByText** — Use for unique visible text
177
+ 5. **CSS/XPath** — Last resort; brittle
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: qa-test-reporter
3
+ description: Aggregate test results from all frameworks, parse JUnit XML/JSON/Allure reports, generate HTML/markdown dashboards with trends, and produce ISO 29119-3 compliant test status and completion reports.
4
+ output_dir: reports/test-runs
5
+ ---
6
+
7
+ # QA Test Reporter
8
+
9
+ ## Purpose
10
+
11
+ Aggregate, analyze, and report test results across all testing types and frameworks. Parse outputs from Jest, Vitest, Playwright, pytest, Cypress, k6, JMeter, and other tools; produce unified dashboards, trend analysis, and ISO 29119-3 compliant reports with go/no-go recommendations.
12
+
13
+ ## Input Formats
14
+
15
+ | Format | Source | Key Fields |
16
+ | ------ | ------ | ---------- |
17
+ | **JUnit XML** | Jest, pytest, Maven, Gradle, most CI runners | `testsuites`, `testsuite`, `testcase`, `failure`, `skipped`, `time` |
18
+ | **JSON reports** | Custom runners, Vitest, Playwright JSON reporter | Varies; see `references/report-formats.md` |
19
+ | **Allure results** | Allure adapter (any framework) | `result.json`, `container.json`, attachments |
20
+ | **CI/CD output** | GitHub Actions, GitLab CI, Jenkins | Job logs, artifact paths, workflow status |
21
+ | **Coverage reports** | Istanbul, c8, pytest-cov, JaCoCo | Line/branch/function coverage JSON |
22
+
23
+ See `references/report-formats.md` for schemas and parsing rules.
24
+
25
+ ## Output Formats
26
+
27
+ | Output | Description |
28
+ | ------ | ----------- |
29
+ | **HTML report** | Interactive dashboard with pass/fail/skip charts, drill-down by category/priority/type |
30
+ | **Markdown summary** | Concise summary for PR comments, Slack, or documentation |
31
+ | **ISO 29119-3 Test Status Report** | Periodic progress report during execution |
32
+ | **ISO 29119-3 Test Completion Report** | Final report with exit criteria and recommendations |
33
+ | **Executive summary** | Go/no-go recommendation with risk areas and open defects |
34
+
35
+ ## Report Sections
36
+
37
+ Every report includes (where data is available):
38
+
39
+ 1. **Summary metrics** — Total pass/fail/skip, duration, pass rate %
40
+ 2. **Test results by category** — By suite, module, priority, or test type
41
+ 3. **Failure analysis** — Top failures by frequency, flaky test detection
42
+ 4. **Coverage summary** — Line/branch/function coverage if provided
43
+ 5. **Risk areas** — Low coverage, high failure density, blocked tests
44
+ 6. **Open defects** — Linked incidents, severity distribution
45
+ 7. **Go/no-go recommendation** — Clear recommendation with rationale
46
+
47
+ ## Trend Analysis
48
+
49
+ Track pass/fail rates over time using **Memory MCP** for history persistence:
50
+
51
+ - Store run metadata: date, build ID, pass rate, fail count, duration
52
+ - Compare current run vs. previous runs (e.g., last 7 days, last 10 builds)
53
+ - Surface regressions: pass rate drop, new flaky tests, duration increase
54
+ - Use stored trends in executive summary and status reports
55
+
56
+ ## Integrations
57
+
58
+ | Integration | Use |
59
+ | ----------- | --- |
60
+ | **GitHub MCP** | Fetch Actions workflow runs, job logs, artifact URLs for test results |
61
+ | **Memory MCP** | Persist and retrieve trend data for historical comparison |
62
+ | **qa-diagram-generator** | Generate trend charts (line, bar) for HTML dashboards |
63
+
64
+ ## Trigger Phrases
65
+
66
+ - "Aggregate test results from [paths/artifacts]"
67
+ - "Generate test report from JUnit XML / Allure / JSON"
68
+ - "Create HTML test dashboard"
69
+ - "ISO 29119-3 test status report" / "test completion report"
70
+ - "Go/no-go recommendation for release"
71
+ - "Test trend analysis" / "pass rate over time"
72
+ - "Parse GitHub Actions test results"
73
+
74
+ ## Workflow
75
+
76
+ 1. **Collect** — Parse one or more report files (JUnit XML, JSON, Allure) or fetch from GitHub Actions
77
+ 2. **Normalize** — Map to common model: test name, suite, result, duration, failure message
78
+ 3. **Analyze** — Compute metrics, detect flaky tests, identify top failures
79
+ 4. **Trend** — Query Memory MCP for history; compare with current run
80
+ 5. **Generate** — Produce requested outputs (HTML, Markdown, ISO reports, executive summary)
81
+
82
+ ## Scope
83
+
84
+ **Can do (autonomous):**
85
+ - Parse JUnit XML, JSON, Allure results from provided paths or URLs
86
+ - Aggregate results from multiple frameworks into unified view
87
+ - Generate HTML dashboard, Markdown summary, ISO 29119-3 reports
88
+ - Produce go/no-go recommendation from metrics and risk areas
89
+ - Use Memory MCP to store/retrieve trend data
90
+ - Use GitHub MCP to fetch Actions results when configured
91
+ - Call qa-diagram-generator for trend charts
92
+
93
+ **Cannot do (requires confirmation):**
94
+ - Fetch from private repos or artifacts without access
95
+ - Override stakeholder-defined go/no-go criteria
96
+ - Modify test execution or CI configuration
97
+
98
+ **Will not do (out of scope):**
99
+ - Execute tests or automation
100
+ - Modify production code or environments
101
+ - Approve release (approval is stakeholder responsibility)
102
+
103
+ ## Quality Checklist
104
+
105
+ - [ ] All input formats correctly parsed per `references/report-formats.md`
106
+ - [ ] Summary metrics accurate (pass/fail/skip counts match source)
107
+ - [ ] ISO 29119-3 reports include mandatory sections per `references/iso-29119-reports.md`
108
+ - [ ] Go/no-go recommendation supported by metrics and risk analysis
109
+ - [ ] Trend data stored/retrieved correctly via Memory MCP
110
+ - [ ] No hardcoded secrets; artifact URLs from env or user input
111
+ - [ ] HTML dashboard accessible (semantic structure, readable charts)
112
+
113
+ ## Troubleshooting
114
+
115
+ | Symptom | Likely Cause | Fix |
116
+ | ------- | ------------ | --- |
117
+ | Parse errors on JUnit XML | Non-standard or malformed XML | Validate against schema in `references/report-formats.md`; handle missing attributes |
118
+ | Missing trend data | Memory MCP not configured or empty | Verify MCP config; run without trends or prompt for manual history |
119
+ | GitHub Actions fetch fails | Token missing, private repo | Check GitHub MCP auth; use local artifact paths instead |
120
+ | Flaky detection inaccurate | Insufficient run history | Require minimum runs (e.g., 5+) before flagging flaky |
121
+ | ISO report incomplete | Mandatory sections missing | Map available data to template; flag gaps for user input |
122
+ | Go/no-go unclear | Conflicting metrics | Document rationale; present risk areas for stakeholder decision |
123
+
124
+ ## Reference Files
125
+
126
+ | Topic | File |
127
+ | ----- | ---- |
128
+ | Report format schemas (JUnit, Allure, coverage) | `references/report-formats.md` |
129
+ | ISO 29119-3 status & completion report templates | `references/iso-29119-reports.md` |
130
+ | Reporting best practices | `references/best-practices.md` |