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,137 @@
1
+ ---
2
+ name: qa-rest-assured-writer
3
+ description: Generate REST Assured API tests for Java with BDD-style syntax, JSON/XML schema validation, authentication handling, and Allure reporting.
4
+ output_dir: tests/api
5
+ dependencies:
6
+ recommended:
7
+ - qa-api-contract-curator
8
+ ---
9
+
10
+ # QA REST Assured Writer
11
+
12
+ ## Purpose
13
+
14
+ Write REST Assured API tests from test cases and API contracts. Transform structured test cases (from qa-testcase-from-docs, qa-api-contract-curator, OpenAPI specs) into executable REST Assured test files with BDD-style syntax, JSON/XML schema validation, authentication handling, and Allure reporting.
15
+
16
+ ## Trigger Phrases
17
+
18
+ - "Write REST Assured tests for [API/endpoint]"
19
+ - "Generate REST Assured API tests from OpenAPI"
20
+ - "Create REST Assured tests with schema validation"
21
+ - "Add REST Assured tests for [resource]"
22
+ - "REST Assured BDD-style API tests"
23
+ - "REST Assured tests with Bearer auth"
24
+ - "REST Assured JSON schema validation"
25
+ - "API tests with given/when/then"
26
+ - "Heal my failing REST Assured tests"
27
+
28
+ ## Key Features
29
+
30
+ | Feature | Description |
31
+ | ------- | ----------- |
32
+ | **BDD-style** | given().when().then() fluent API for readable tests |
33
+ | **JSON schema** | JsonSchemaValidator for response schema validation |
34
+ | **XML schema** | XML schema validation support |
35
+ | **Authentication** | Basic, Bearer, OAuth2, custom headers |
36
+ | **Request/Response spec** | RequestSpecification, ResponseSpecification for reuse |
37
+ | **Serialization** | Jackson/Gson for POJO serialization/deserialization |
38
+ | **Extraction** | extract().response(), path(), jsonPath() for assertions |
39
+ | **Allure** | @Step, @Description, @Severity for reporting |
40
+
41
+ ## Workflow
42
+
43
+ 1. **Read test cases / API contract** — From specs, OpenAPI, or manual test designs
44
+ 2. **Analyze API** — Endpoints, request/response schemas, auth requirements
45
+ 3. **Generate test classes** — Produce `{Resource}ApiTest.java` with BDD structure
46
+ 4. **Configure base URI and specs** — RequestSpecification for common setup
47
+ 5. **Add validation** — Status codes, body assertions, schema validation
48
+ 6. **Run** — User runs `mvn test` to execute tests
49
+
50
+ ## Key Patterns
51
+
52
+ | Pattern | Usage |
53
+ | ------- | ----- |
54
+ | `given().header().body().when().post().then().statusCode(201)` | Basic request/response |
55
+ | `given().auth().oauth2(token)` | Bearer token auth |
56
+ | `given().auth().basic(user, pass)` | Basic auth |
57
+ | `then().body(JsonSchemaValidator.matchesJsonSchema(schema))` | JSON schema validation |
58
+ | `RequestSpecification` | Reusable request config (base URI, headers) |
59
+ | `ResponseSpecification` | Reusable response assertions |
60
+ | `extract().response()` | Extract response for further assertions |
61
+ | `extract().path("$.id")` | Extract value from JSON path |
62
+
63
+ ## BDD Structure
64
+
65
+ ```java
66
+ @Test
67
+ @DisplayName("Create user returns 201")
68
+ void createUser_returns201() {
69
+ given()
70
+ .contentType(ContentType.JSON)
71
+ .body(userRequest)
72
+ .when()
73
+ .post("/users")
74
+ .then()
75
+ .statusCode(201)
76
+ .body("id", notNullValue())
77
+ .body("email", equalTo("user@example.com"));
78
+ }
79
+ ```
80
+
81
+ ## File Naming
82
+
83
+ - `{Resource}ApiTest.java` — Test classes (e.g., `UserApiTest.java`, `OrderApiTest.java`)
84
+ - Place in `src/test/java` per Maven convention
85
+
86
+ ## Scope
87
+
88
+ **Can do (autonomous):**
89
+ - Generate REST Assured API tests from test case specs or OpenAPI
90
+ - Apply BDD-style given/when/then structure
91
+ - Add JSON/XML schema validation
92
+ - Configure authentication (Basic, Bearer, OAuth2)
93
+ - Use RequestSpecification/ResponseSpecification for reuse
94
+ - Add Allure annotations for reporting
95
+ - Use Context7 MCP for REST Assured docs
96
+ - Delegate to qa-test-healer when tests fail (Heal Mode)
97
+
98
+ **Cannot do (requires confirmation):**
99
+ - Change production code structure
100
+ - Add dependencies not in pom.xml
101
+ - Override project REST Assured config without approval
102
+ - Call APIs not provided or approved
103
+
104
+ **Will not do (out of scope):**
105
+ - Execute tests (user runs `mvn test`)
106
+ - Write Selenium/Playwright tests (use qa-selenium-java-writer, qa-playwright-ts-writer)
107
+ - Modify CI/CD pipelines
108
+ - Bypass security or access restricted APIs
109
+
110
+ ## References
111
+
112
+ - `references/patterns.md` — CRUD, auth, validation, filters, serialization
113
+ - `references/config.md` — Maven config, base URI, logging
114
+ - `references/best-practices.md` — API testing best practices with REST Assured
115
+
116
+ ## Quality Checklist
117
+
118
+ - [ ] BDD-style given/when/then used
119
+ - [ ] Status code assertions on every request
120
+ - [ ] Schema validation where contract exists
121
+ - [ ] No hardcoded credentials (use env vars or test config)
122
+ - [ ] RequestSpecification for shared setup
123
+ - [ ] Tests independent (no shared state)
124
+ - [ ] Allure annotations where applicable
125
+ - [ ] Traceability to test case IDs where applicable
126
+ - [ ] File naming follows `{Resource}ApiTest.java` convention
127
+
128
+ ## Troubleshooting
129
+
130
+ | Symptom | Likely Cause | Fix |
131
+ | ------- | ------------ | --- |
132
+ | Connection refused | Wrong base URI, service not running | Verify baseUri; ensure API is up |
133
+ | 401/403 | Missing or invalid auth | Add auth to given(); check token expiry |
134
+ | Schema validation fails | Schema mismatch, wrong path | Verify schema file; check JSON path |
135
+ | Body assertion fails | Wrong JSON path, type mismatch | Use jsonPath() to debug; ensure correct type |
136
+ | Timeout | Slow API, network | Increase timeout in config |
137
+ | Serialization error | POJO mismatch | Verify POJO fields match JSON; check annotations |
@@ -0,0 +1,50 @@
1
+ # REST Assured Best Practices
2
+
3
+ ## Structure
4
+
5
+ - **One test class per resource** — `UserApiTest.java`, `OrderApiTest.java`
6
+ - **BDD style** — given/when/then for readability
7
+ - **Base class** — Shared RequestSpecification, base URI, auth
8
+ - **Test data** — Use builders or fixtures; avoid hardcoded values in assertions where possible
9
+
10
+ ## Assertions
11
+
12
+ - **Always assert status code** — Every request should validate response status
13
+ - **Schema validation** — Use JsonSchemaValidator when OpenAPI/schema exists
14
+ - **Specific assertions** — Prefer `body("id", notNullValue())` over generic checks
15
+ - **AssertJ for extracted data** — `assertThat(response.path("id")).isNotNull()`
16
+
17
+ ## Authentication
18
+
19
+ - **Never hardcode credentials** — Use env vars, test config, or secrets manager
20
+ - **Token refresh** — For OAuth2, implement token refresh in @BeforeAll or filter
21
+ - **Preemptive when needed** — Use preemptive basic auth if server doesn't send 401 challenge
22
+
23
+ ## Test Data
24
+
25
+ - **Builders** — Use builder pattern for request POJOs
26
+ - **Fixtures** — Centralize test data in fixture classes or JSON files
27
+ - **Cleanup** — Delete created resources in @AfterEach if tests create data
28
+ - **Idempotency** — Prefer idempotent operations when possible
29
+
30
+ ## Performance
31
+
32
+ - **Reuse specs** — RequestSpecification/ResponseSpecification reduce duplication
33
+ - **Connection pooling** — REST Assured uses Apache HttpClient; reuse config
34
+ - **Timeout** — Set reasonable timeouts to fail fast on slow APIs
35
+
36
+ ## Maintainability
37
+
38
+ - **Constants** — Extract endpoints, header names to constants
39
+ - **Page Object–like** — Consider API client wrapper for complex APIs
40
+ - **Traceability** — Link tests to requirements via @Description or test case ID
41
+
42
+ ## Common Pitfalls
43
+
44
+ | Pitfall | Fix |
45
+ | ------- | --- |
46
+ | Forgetting content-type | Set in RequestSpecification or per request |
47
+ | Brittle JSON path | Use schema validation; document path structure |
48
+ | Shared state | Each test independent; cleanup in @AfterEach |
49
+ | No timeout | Set connection/read timeout in config |
50
+ | Logging sensitive data | Filter auth headers in log config |
@@ -0,0 +1,124 @@
1
+ # REST Assured Configuration
2
+
3
+ ## Maven Dependencies
4
+
5
+ ```xml
6
+ <dependencies>
7
+ <dependency>
8
+ <groupId>io.rest-assured</groupId>
9
+ <artifactId>rest-assured</artifactId>
10
+ <version>5.4.0</version>
11
+ <scope>test</scope>
12
+ </dependency>
13
+ <dependency>
14
+ <groupId>io.rest-assured</groupId>
15
+ <artifactId>json-schema-validator</artifactId>
16
+ <version>5.4.0</version>
17
+ <scope>test</scope>
18
+ </dependency>
19
+ <dependency>
20
+ <groupId>org.junit.jupiter</groupId>
21
+ <artifactId>junit-jupiter</artifactId>
22
+ <version>5.10.0</version>
23
+ <scope>test</scope>
24
+ </dependency>
25
+ </dependencies>
26
+ ```
27
+
28
+ ## Base URI Configuration
29
+
30
+ ### Static configuration
31
+ ```java
32
+ @BeforeAll
33
+ static void setupRestAssured() {
34
+ RestAssured.baseURI = "https://api.example.com";
35
+ RestAssured.basePath = "/v1";
36
+ RestAssured.port = 443;
37
+ }
38
+ ```
39
+
40
+ ### From environment
41
+ ```java
42
+ @BeforeAll
43
+ static void setupRestAssured() {
44
+ RestAssured.baseURI = System.getenv().getOrDefault("API_BASE_URI", "http://localhost:8080");
45
+ }
46
+ ```
47
+
48
+ ### Per-test override
49
+ ```java
50
+ given()
51
+ .baseUri("https://staging.api.example.com")
52
+ .when()
53
+ .get("/users")
54
+ .then()
55
+ .statusCode(200);
56
+ ```
57
+
58
+ ## Logging
59
+
60
+ ### Request/Response logging
61
+ ```java
62
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails(LogDetail.ALL);
63
+
64
+ // Or per request
65
+ given()
66
+ .log().all()
67
+ .when()
68
+ .get("/users")
69
+ .then()
70
+ .log().body();
71
+ ```
72
+
73
+ ### Log levels
74
+ - `LogDetail.ALL` — Full request and response
75
+ - `LogDetail.HEADERS` — Headers only
76
+ - `LogDetail.BODY` — Body only
77
+ - `LogDetail.PARAMS` — Query/path params
78
+
79
+ ## Timeouts
80
+
81
+ ```java
82
+ RestAssured.config = RestAssuredConfig.config()
83
+ .httpClient(HttpClientConfig.httpClientConfig()
84
+ .setParam(CoreConnectionPNames.CONNECTION_TIMEOUT, 5000)
85
+ .setParam(CoreConnectionPNames.SO_TIMEOUT, 10000));
86
+ ```
87
+
88
+ ## SSL / TLS
89
+
90
+ ### Relaxed HTTPS (self-signed certs, dev only)
91
+ ```java
92
+ RestAssured.useRelaxedHTTPSValidation();
93
+ ```
94
+
95
+ ### Custom trust store
96
+ ```java
97
+ RestAssured.config = RestAssuredConfig.config()
98
+ .sslConfig(SSLConfig.sslConfig()
99
+ .trustStore(pathToTrustStore, password));
100
+ ```
101
+
102
+ ## Content Type
103
+
104
+ ```java
105
+ RestAssured.defaultContentType = ContentType.JSON;
106
+ ```
107
+
108
+ ## Request Specification (Reusable)
109
+
110
+ ```java
111
+ public class ApiTestBase {
112
+ protected static RequestSpecification requestSpec;
113
+
114
+ @BeforeAll
115
+ static void setup() {
116
+ requestSpec = new RequestSpecBuilder()
117
+ .setBaseUri(System.getenv().getOrDefault("API_URI", "http://localhost:8080"))
118
+ .setContentType(ContentType.JSON)
119
+ .addFilter(new RequestLoggingFilter())
120
+ .addFilter(new ResponseLoggingFilter())
121
+ .build();
122
+ }
123
+ }
124
+ ```
@@ -0,0 +1,192 @@
1
+ # REST Assured Patterns
2
+
3
+ ## CRUD Operations
4
+
5
+ ### GET (single resource)
6
+ ```java
7
+ given()
8
+ .pathParam("id", 1)
9
+ .when()
10
+ .get("/users/{id}")
11
+ .then()
12
+ .statusCode(200)
13
+ .body("id", equalTo(1))
14
+ .body("name", notNullValue());
15
+ ```
16
+
17
+ ### GET (list)
18
+ ```java
19
+ given()
20
+ .queryParam("page", 1)
21
+ .queryParam("size", 10)
22
+ .when()
23
+ .get("/users")
24
+ .then()
25
+ .statusCode(200)
26
+ .body("content", hasSize(lessThanOrEqualTo(10)))
27
+ .body("content[0].id", notNullValue());
28
+ ```
29
+
30
+ ### POST (create)
31
+ ```java
32
+ given()
33
+ .contentType(ContentType.JSON)
34
+ .body(new UserRequest("john@example.com", "John"))
35
+ .when()
36
+ .post("/users")
37
+ .then()
38
+ .statusCode(201)
39
+ .header("Location", containsString("/users/"))
40
+ .body("id", notNullValue());
41
+ ```
42
+
43
+ ### PUT (update)
44
+ ```java
45
+ given()
46
+ .contentType(ContentType.JSON)
47
+ .pathParam("id", 1)
48
+ .body(updatedUser)
49
+ .when()
50
+ .put("/users/{id}")
51
+ .then()
52
+ .statusCode(200)
53
+ .body("name", equalTo(updatedUser.getName()));
54
+ ```
55
+
56
+ ### DELETE
57
+ ```java
58
+ given()
59
+ .pathParam("id", 1)
60
+ .when()
61
+ .delete("/users/{id}")
62
+ .then()
63
+ .statusCode(204);
64
+ ```
65
+
66
+ ## Authentication
67
+
68
+ ### Basic Auth
69
+ ```java
70
+ given()
71
+ .auth().basic("user", "password")
72
+ .when()
73
+ .get("/protected")
74
+ .then()
75
+ .statusCode(200);
76
+ ```
77
+
78
+ ### Bearer Token
79
+ ```java
80
+ given()
81
+ .auth().oauth2(accessToken)
82
+ .when()
83
+ .get("/api/resource")
84
+ .then()
85
+ .statusCode(200);
86
+ ```
87
+
88
+ ### Custom Header
89
+ ```java
90
+ given()
91
+ .header("Authorization", "Bearer " + token)
92
+ .header("X-API-Key", apiKey)
93
+ .when()
94
+ .get("/api/resource")
95
+ .then()
96
+ .statusCode(200);
97
+ ```
98
+
99
+ ### Preemptive Basic
100
+ ```java
101
+ given()
102
+ .auth().preemptive().basic("user", "password")
103
+ .when()
104
+ .get("/protected")
105
+ .then()
106
+ .statusCode(200);
107
+ ```
108
+
109
+ ## JSON Schema Validation
110
+
111
+ ```java
112
+ import static io.restassured.module.jsv.JsonSchemaValidator.matchesJsonSchemaInClasspath;
113
+
114
+ given()
115
+ .when()
116
+ .get("/users/1")
117
+ .then()
118
+ .body(matchesJsonSchemaInClasspath("schemas/user-response.json"));
119
+ ```
120
+
121
+ ## Request/Response Specifications
122
+
123
+ ### RequestSpecification
124
+ ```java
125
+ RequestSpecification requestSpec = new RequestSpecBuilder()
126
+ .setBaseUri("https://api.example.com")
127
+ .setContentType(ContentType.JSON)
128
+ .addHeader("Accept", "application/json")
129
+ .addFilter(new RequestLoggingFilter())
130
+ .build();
131
+
132
+ given()
133
+ .spec(requestSpec)
134
+ .body(payload)
135
+ .when()
136
+ .post("/users")
137
+ .then()
138
+ .statusCode(201);
139
+ ```
140
+
141
+ ### ResponseSpecification
142
+ ```java
143
+ ResponseSpecification responseSpec = new ResponseSpecBuilder()
144
+ .expectStatusCode(200)
145
+ .expectContentType(ContentType.JSON)
146
+ .expectResponseTime(lessThan(2000L), TimeUnit.MILLISECONDS)
147
+ .build();
148
+
149
+ given().when().get("/users").then().spec(responseSpec);
150
+ ```
151
+
152
+ ## Filters
153
+
154
+ - **RequestLoggingFilter** — Log request details
155
+ - **ResponseLoggingFilter** — Log response details
156
+ - **ErrorLoggingFilter** — Log on failure
157
+ - **OAuth2Filter** — OAuth2 token handling
158
+
159
+ ## Extraction
160
+
161
+ ```java
162
+ Response response = given()
163
+ .when()
164
+ .post("/users")
165
+ .then()
166
+ .statusCode(201)
167
+ .extract().response();
168
+
169
+ int id = response.path("id");
170
+ String location = response.header("Location");
171
+
172
+ // Or with JsonPath
173
+ String email = given().when().get("/users/1")
174
+ .then().extract().path("email");
175
+ ```
176
+
177
+ ## Serialization / Deserialization
178
+
179
+ ```java
180
+ // POJO to JSON (serialization)
181
+ UserRequest user = new UserRequest("john@example.com", "John");
182
+ given().body(user).when().post("/users");
183
+
184
+ // JSON to POJO (deserialization)
185
+ UserResponse user = given()
186
+ .when()
187
+ .get("/users/1")
188
+ .as(UserResponse.class);
189
+
190
+ assertThat(user.getId()).isEqualTo(1);
191
+ assertThat(user.getEmail()).isEqualTo("john@example.com");
192
+ ```
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: qa-risk-analyzer
3
+ description: Risk-based testing prioritization with impact analysis for code changes using the formula Risk = Complexity × ChangeFrequency × (1 - TestCoverage).
4
+ output_dir: reports/risk
5
+ dependencies:
6
+ recommended:
7
+ - qa-coverage-analyzer
8
+ ---
9
+
10
+ # QA Risk Analyzer
11
+
12
+ ## Purpose
13
+
14
+ Risk-based testing prioritization and impact analysis for code changes. Calculate risk scores per feature/module, rank testing effort, and produce actionable recommendations using the formula:
15
+
16
+ **Risk = Complexity × ChangeFrequency × (1 - TestCoverage)**
17
+
18
+ ## Trigger Phrases
19
+
20
+ - "Risk analysis for [branch/PR/release]"
21
+ - "Prioritize tests by risk" / "Risk-based test prioritization"
22
+ - "Impact analysis for [git diff/changes]"
23
+ - "Risk heatmap" / "Risk matrix for testing"
24
+ - "Which tests to run first?" / "Test execution order by risk"
25
+ - "Risk index per feature" / "High-risk modules"
26
+
27
+ ## Risk Formula
28
+
29
+ ```
30
+ Risk = Complexity × ChangeFrequency × (1 - TestCoverage)
31
+ ```
32
+
33
+ - **Complexity:** Cyclomatic complexity, coupling, or static analysis metrics
34
+ - **ChangeFrequency:** Commits/changes per file from git history
35
+ - **TestCoverage:** 0–1 from qa-coverage-analyzer (1 = fully covered)
36
+ - **Defect history** and **business criticality** adjust the final ranking
37
+
38
+ See `references/risk-factors.md` for calculation methods.
39
+
40
+ ## Risk Factors
41
+
42
+ | Factor | Source | How to Obtain |
43
+ |--------|--------|---------------|
44
+ | **Code complexity** | Cyclomatic complexity, coupling | SonarQube, ESLint complexity, radon (Python) |
45
+ | **Change frequency** | Git history | `git log --follow` per file; commits per module |
46
+ | **Test coverage** | Coverage reports | qa-coverage-analyzer (Istanbul/JaCoCo/coverage.py) |
47
+ | **Defect history** | Past bugs per module | Memory MCP, Jira/issue tracker |
48
+ | **Business criticality** | Stakeholder input | Manual tagging or config; payment, auth, core flows |
49
+
50
+ ## Impact Analysis
51
+
52
+ Analyze git diff to determine:
53
+
54
+ 1. **Affected modules** — Files changed → map to features/modules
55
+ 2. **Affected tests** — Tests that cover changed code (from coverage or naming)
56
+ 3. **Downstream impact** — Dependencies, imports, API consumers
57
+ 4. **Regression scope** — Suggested regression set based on impact
58
+
59
+ See `references/impact-analysis.md` for git diff patterns and mapping strategies.
60
+
61
+ ## Output Deliverables
62
+
63
+ 1. **Risk Matrix** — Features/modules ranked by risk with testing recommendations
64
+ 2. **Prioritized Test Execution List** — Order tests by risk (high → low)
65
+ 3. **Risk Heatmap** — Visual matrix (complexity × change frequency, colored by coverage)
66
+ 4. **Impact Summary** — Per PR/branch: affected modules, suggested regression scope
67
+
68
+ ### Risk Matrix Template
69
+
70
+ ```markdown
71
+ # Risk Matrix — [Branch/Release]
72
+
73
+ ## Summary
74
+ | Module/Feature | Risk Index | Complexity | Change Freq | Coverage | Recommendation |
75
+ |----------------|------------|------------|-------------|----------|-----------------|
76
+ | [Name] | X.XX | H/M/L | H/M/L | X% | [Action] |
77
+
78
+ ## Prioritized Test Execution
79
+ 1. [High risk] — [Module] — [Tests]
80
+ 2. [Medium risk] — [Module] — [Tests]
81
+ 3. [Low risk] — [Module] — [Tests]
82
+
83
+ ## Heatmap
84
+ [Quadrant: Complexity × ChangeFrequency, color = coverage]
85
+ ```
86
+
87
+ ## Workflow
88
+
89
+ 1. **Input:** Git diff/branch, coverage report, optional defect history (Memory MCP)
90
+ 2. **Impact:** Parse git diff; map changed files to modules/features
91
+ 3. **Factors:** Get complexity (static analysis), change frequency (git log), coverage (qa-coverage-analyzer)
92
+ 4. **Risk score:** Apply formula; apply defect/criticality adjustments
93
+ 5. **Rank:** Sort modules/features by risk
94
+ 6. **Output:** Risk matrix, prioritized test list, heatmap (via qa-diagram-generator)
95
+ 7. **Recommendations:** Suggest tests to run first, coverage gaps to address
96
+
97
+ ## MCP Tools Used
98
+
99
+ - **Sequential Thinking MCP:** Decompose analysis, reconcile conflicting factors, prioritize recommendations
100
+ - **Memory MCP:** Historical defect data per module, past risk trends, baseline comparison
101
+
102
+ ## Integration with Other Skills
103
+
104
+ | Need | Skill | Usage |
105
+ |------|-------|-------|
106
+ | Test coverage data | qa-coverage-analyzer | Code coverage per module |
107
+ | Risk quadrant chart | qa-diagram-generator | Heatmap, quadrant visualization |
108
+ | Test cases for modules | qa-testcase-from-docs, qa-testcase-from-ui | Map tests to modules |
109
+ | Risk matrix patterns | qa-test-strategy | `references/risk-matrix.md` |
110
+
111
+ ## Scope
112
+
113
+ **Can do (autonomous):**
114
+ - Calculate risk scores using the formula
115
+ - Parse git diff and map to modules
116
+ - Obtain change frequency from git history
117
+ - Integrate coverage from qa-coverage-analyzer
118
+ - Produce risk matrix, prioritized test list, heatmap
119
+ - Call qa-diagram-generator for quadrant charts
120
+ - Use Sequential Thinking for analysis; Memory for defect history
121
+
122
+ **Cannot do (requires confirmation):**
123
+ - Override business criticality without stakeholder input
124
+ - Change risk formula or factor weights without agreement
125
+ - Exclude modules from analysis without justification
126
+
127
+ **Will not do (out of scope):**
128
+ - Execute tests or generate coverage (consume existing data)
129
+ - Modify source code or test automation
130
+ - Deploy or change production systems
131
+
132
+ ## Quality Checklist
133
+
134
+ - [ ] Risk formula applied consistently (Complexity × ChangeFrequency × (1 - TestCoverage))
135
+ - [ ] All risk factors sourced (complexity, change freq, coverage)
136
+ - [ ] Git diff impact analysis maps files to modules
137
+ - [ ] Prioritized test list ordered by risk (high → low)
138
+ - [ ] Heatmap/quadrant chart generated via qa-diagram-generator
139
+ - [ ] Recommendations actionable (specific tests, coverage gaps)
140
+ - [ ] No hardcoded secrets; paths/config referenced
141
+
142
+ ## Troubleshooting
143
+
144
+ | Symptom | Likely Cause | Fix |
145
+ |---------|--------------|-----|
146
+ | Risk scores all similar | Factors not normalized | Normalize to 0–1 scale; use relative ranking |
147
+ | Missing coverage data | qa-coverage-analyzer not run | Run coverage first; use 0 if unavailable |
148
+ | Change frequency zero | New files, no git history | Use complexity + criticality only; flag as "new" |
149
+ | Module mapping fails | Unclear file→module mapping | Use directory structure, package.json, or config |
150
+ | Heatmap too dense | Too many modules | Group by feature; show top N by risk |
151
+ | Defect history empty | Memory MCP not populated | Proceed without; note "no defect history" |
152
+
153
+ ## Reference Files
154
+
155
+ | Topic | Reference |
156
+ |-------|-----------|
157
+ | Risk factor calculation | `references/risk-factors.md` |
158
+ | Git diff impact analysis | `references/impact-analysis.md` |