qa-skills 3.0.0 → 3.1.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 +20 -149
  2. package/bin/cli.js +1 -40
  3. package/package.json +23 -26
  4. package/dist/agents/registry.d.ts +0 -5
  5. package/dist/agents/registry.d.ts.map +0 -1
  6. package/dist/agents/registry.js +0 -101
  7. package/dist/agents/registry.js.map +0 -1
  8. package/dist/agents/types.d.ts +0 -9
  9. package/dist/agents/types.d.ts.map +0 -1
  10. package/dist/agents/types.js +0 -2
  11. package/dist/agents/types.js.map +0 -1
  12. package/dist/dependencies.d.ts +0 -21
  13. package/dist/dependencies.d.ts.map +0 -1
  14. package/dist/dependencies.js +0 -125
  15. package/dist/dependencies.js.map +0 -1
  16. package/dist/installer.d.ts +0 -25
  17. package/dist/installer.d.ts.map +0 -1
  18. package/dist/installer.js +0 -437
  19. package/dist/installer.js.map +0 -1
  20. package/dist/scaffold.d.ts +0 -27
  21. package/dist/scaffold.d.ts.map +0 -1
  22. package/dist/scaffold.js +0 -182
  23. package/dist/scaffold.js.map +0 -1
  24. package/skills/qa-accessibility-test-writer/SKILL.md +0 -127
  25. package/skills/qa-accessibility-test-writer/references/axe-core-patterns.md +0 -349
  26. package/skills/qa-accessibility-test-writer/references/best-practices.md +0 -184
  27. package/skills/qa-accessibility-test-writer/references/wcag-tests.md +0 -331
  28. package/skills/qa-api-contract-curator/SKILL.md +0 -104
  29. package/skills/qa-api-contract-curator/references/breaking-changes.md +0 -363
  30. package/skills/qa-api-contract-curator/references/openapi-structure.md +0 -404
  31. package/skills/qa-browser-data-collector/SKILL.md +0 -132
  32. package/skills/qa-browser-data-collector/references/data-collection-checklist.md +0 -91
  33. package/skills/qa-browser-data-collector/references/playwright-mcp-patterns.md +0 -113
  34. package/skills/qa-bug-ticket-creator/SKILL.md +0 -148
  35. package/skills/qa-bug-ticket-creator/references/bug-report-format.md +0 -149
  36. package/skills/qa-bug-ticket-creator/references/severity-guide.md +0 -81
  37. package/skills/qa-bug-ticket-creator/templates/bug-ticket-template.md +0 -39
  38. package/skills/qa-changelog-analyzer/SKILL.md +0 -134
  39. package/skills/qa-changelog-analyzer/references/git-analysis-patterns.md +0 -138
  40. package/skills/qa-changelog-analyzer/references/impact-mapping.md +0 -120
  41. package/skills/qa-clickup-integration/SKILL.md +0 -166
  42. package/skills/qa-clickup-integration/references/api-patterns.md +0 -102
  43. package/skills/qa-clickup-integration/references/field-mapping.md +0 -71
  44. package/skills/qa-codeceptjs-writer/SKILL.md +0 -136
  45. package/skills/qa-codeceptjs-writer/references/best-practices.md +0 -207
  46. package/skills/qa-codeceptjs-writer/references/config.md +0 -255
  47. package/skills/qa-codeceptjs-writer/references/patterns.md +0 -285
  48. package/skills/qa-coverage-analyzer/SKILL.md +0 -166
  49. package/skills/qa-coverage-analyzer/references/best-practices.md +0 -142
  50. package/skills/qa-coverage-analyzer/references/coverage-dimensions.md +0 -155
  51. package/skills/qa-coverage-analyzer/references/tools.md +0 -204
  52. package/skills/qa-cypress-writer/SKILL.md +0 -134
  53. package/skills/qa-cypress-writer/references/assertions.md +0 -121
  54. package/skills/qa-cypress-writer/references/best-practices.md +0 -82
  55. package/skills/qa-cypress-writer/references/config.md +0 -121
  56. package/skills/qa-cypress-writer/references/patterns.md +0 -170
  57. package/skills/qa-data-factory/SKILL.md +0 -126
  58. package/skills/qa-data-factory/references/factory-patterns.md +0 -164
  59. package/skills/qa-data-factory/references/faker-guide.md +0 -131
  60. package/skills/qa-diagram-generator/SKILL.md +0 -125
  61. package/skills/qa-diagram-generator/references/c4-model.md +0 -53
  62. package/skills/qa-diagram-generator/references/charts.md +0 -58
  63. package/skills/qa-diagram-generator/references/class-diagram.md +0 -85
  64. package/skills/qa-diagram-generator/references/er-diagram.md +0 -69
  65. package/skills/qa-diagram-generator/references/flowchart.md +0 -92
  66. package/skills/qa-diagram-generator/references/from-screenshot.md +0 -45
  67. package/skills/qa-diagram-generator/references/gantt.md +0 -49
  68. package/skills/qa-diagram-generator/references/journey.md +0 -50
  69. package/skills/qa-diagram-generator/references/mindmap.md +0 -75
  70. package/skills/qa-diagram-generator/references/sequence.md +0 -69
  71. package/skills/qa-diagram-generator/references/state-diagram.md +0 -56
  72. package/skills/qa-discovery-interview/SKILL.md +0 -182
  73. package/skills/qa-discovery-interview/references/completeness-checklist.md +0 -53
  74. package/skills/qa-discovery-interview/references/conflict-patterns.md +0 -101
  75. package/skills/qa-discovery-interview/references/qa-categories.md +0 -147
  76. package/skills/qa-discovery-interview/templates/qa-brief-template.md +0 -168
  77. package/skills/qa-environment-checker/SKILL.md +0 -142
  78. package/skills/qa-environment-checker/references/dependency-matrix.md +0 -101
  79. package/skills/qa-environment-checker/references/health-checks.md +0 -209
  80. package/skills/qa-environment-checker/templates/env-readiness-template.md +0 -64
  81. package/skills/qa-flaky-detector/SKILL.md +0 -153
  82. package/skills/qa-flaky-detector/references/ci-analysis.md +0 -140
  83. package/skills/qa-flaky-detector/references/flaky-patterns.md +0 -247
  84. package/skills/qa-github-issues-enhanced/SKILL.md +0 -175
  85. package/skills/qa-github-issues-enhanced/references/issue-templates.md +0 -425
  86. package/skills/qa-github-issues-enhanced/references/label-taxonomy.md +0 -130
  87. package/skills/qa-github-issues-enhanced/references/workflow-patterns.md +0 -188
  88. package/skills/qa-httpx-writer/SKILL.md +0 -138
  89. package/skills/qa-httpx-writer/references/assertions.md +0 -195
  90. package/skills/qa-httpx-writer/references/best-practices.md +0 -140
  91. package/skills/qa-httpx-writer/references/config.md +0 -212
  92. package/skills/qa-httpx-writer/references/patterns.md +0 -262
  93. package/skills/qa-jest-writer/SKILL.md +0 -131
  94. package/skills/qa-jest-writer/references/assertions.md +0 -125
  95. package/skills/qa-jest-writer/references/best-practices.md +0 -136
  96. package/skills/qa-jest-writer/references/config.md +0 -134
  97. package/skills/qa-jest-writer/references/patterns.md +0 -172
  98. package/skills/qa-jira-integration/SKILL.md +0 -135
  99. package/skills/qa-jira-integration/references/api-patterns.md +0 -143
  100. package/skills/qa-jira-integration/references/field-mapping.md +0 -79
  101. package/skills/qa-jira-integration/references/xray-integration.md +0 -85
  102. package/skills/qa-jmeter-writer/SKILL.md +0 -171
  103. package/skills/qa-jmeter-writer/references/best-practices.md +0 -157
  104. package/skills/qa-jmeter-writer/references/config.md +0 -204
  105. package/skills/qa-jmeter-writer/references/patterns.md +0 -242
  106. package/skills/qa-junit5-writer/SKILL.md +0 -157
  107. package/skills/qa-junit5-writer/references/assertions.md +0 -118
  108. package/skills/qa-junit5-writer/references/config.md +0 -97
  109. package/skills/qa-junit5-writer/references/patterns.md +0 -162
  110. package/skills/qa-k6-writer/SKILL.md +0 -155
  111. package/skills/qa-k6-writer/references/best-practices.md +0 -236
  112. package/skills/qa-k6-writer/references/config.md +0 -219
  113. package/skills/qa-k6-writer/references/patterns.md +0 -304
  114. package/skills/qa-linear-integration/SKILL.md +0 -137
  115. package/skills/qa-linear-integration/references/api-patterns.md +0 -249
  116. package/skills/qa-linear-integration/references/field-mapping.md +0 -121
  117. package/skills/qa-locust-writer/SKILL.md +0 -151
  118. package/skills/qa-locust-writer/references/best-practices.md +0 -126
  119. package/skills/qa-locust-writer/references/config.md +0 -170
  120. package/skills/qa-locust-writer/references/patterns.md +0 -235
  121. package/skills/qa-manual-test-designer/SKILL.md +0 -145
  122. package/skills/qa-manual-test-designer/references/exploratory-charters.md +0 -138
  123. package/skills/qa-manual-test-designer/references/personas.md +0 -146
  124. package/skills/qa-manual-test-designer/templates/exploratory-charter-template.md +0 -47
  125. package/skills/qa-manual-test-designer/templates/test-case-template.md +0 -31
  126. package/skills/qa-mobile-test-writer/SKILL.md +0 -144
  127. package/skills/qa-mobile-test-writer/references/best-practices.md +0 -214
  128. package/skills/qa-mobile-test-writer/references/config.md +0 -309
  129. package/skills/qa-mobile-test-writer/references/patterns.md +0 -304
  130. package/skills/qa-nfr-analyst/SKILL.md +0 -177
  131. package/skills/qa-nfr-analyst/references/iso-25010-model.md +0 -159
  132. package/skills/qa-nfr-analyst/references/owasp-wstg-baseline.md +0 -202
  133. package/skills/qa-nfr-analyst/references/wcag-checklist.md +0 -184
  134. package/skills/qa-nfr-analyst/templates/owasp-checklist-template.md +0 -89
  135. package/skills/qa-nfr-analyst/templates/wcag-checklist-template.md +0 -48
  136. package/skills/qa-orchestrator/SKILL.md +0 -132
  137. package/skills/qa-orchestrator/references/handoff-chains.md +0 -105
  138. package/skills/qa-orchestrator/references/pipeline-modes.md +0 -115
  139. package/skills/qa-orchestrator/references/scheduler-rules.md +0 -84
  140. package/skills/qa-pact-writer/SKILL.md +0 -133
  141. package/skills/qa-pact-writer/references/best-practices.md +0 -100
  142. package/skills/qa-pact-writer/references/config.md +0 -135
  143. package/skills/qa-pact-writer/references/patterns.md +0 -161
  144. package/skills/qa-plan-creator/SKILL.md +0 -139
  145. package/skills/qa-plan-creator/references/introduction-plan.md +0 -43
  146. package/skills/qa-plan-creator/references/migration-plan.md +0 -44
  147. package/skills/qa-plan-creator/references/onboarding-plan.md +0 -46
  148. package/skills/qa-plan-creator/references/performance-plan.md +0 -44
  149. package/skills/qa-plan-creator/references/regression-plan.md +0 -45
  150. package/skills/qa-plan-creator/references/release-plan.md +0 -45
  151. package/skills/qa-plan-creator/references/sprint-plan.md +0 -44
  152. package/skills/qa-plan-creator/references/test-plan.md +0 -59
  153. package/skills/qa-plan-creator/references/uat-plan.md +0 -43
  154. package/skills/qa-plan-creator/templates/checklist-template.md +0 -36
  155. package/skills/qa-plan-creator/templates/regression-checklist-template.md +0 -49
  156. package/skills/qa-plan-creator/templates/release-checklist-template.md +0 -46
  157. package/skills/qa-plan-creator/templates/test-plan-template.md +0 -74
  158. package/skills/qa-playwright-py-writer/SKILL.md +0 -156
  159. package/skills/qa-playwright-py-writer/references/best-practices.md +0 -194
  160. package/skills/qa-playwright-py-writer/references/config.md +0 -195
  161. package/skills/qa-playwright-py-writer/references/patterns.md +0 -212
  162. package/skills/qa-playwright-ts-writer/SKILL.md +0 -151
  163. package/skills/qa-playwright-ts-writer/references/assertions.md +0 -109
  164. package/skills/qa-playwright-ts-writer/references/best-practices.md +0 -191
  165. package/skills/qa-playwright-ts-writer/references/config.md +0 -144
  166. package/skills/qa-playwright-ts-writer/references/patterns.md +0 -171
  167. package/skills/qa-pytest-writer/SKILL.md +0 -145
  168. package/skills/qa-pytest-writer/references/assertions.md +0 -149
  169. package/skills/qa-pytest-writer/references/best-practices.md +0 -97
  170. package/skills/qa-pytest-writer/references/config.md +0 -176
  171. package/skills/qa-pytest-writer/references/patterns.md +0 -251
  172. package/skills/qa-qase-integration/SKILL.md +0 -149
  173. package/skills/qa-qase-integration/references/api-reference.md +0 -354
  174. package/skills/qa-qase-integration/references/ci-integration.md +0 -196
  175. package/skills/qa-qase-integration/references/field-mapping.md +0 -157
  176. package/skills/qa-requirements-generator/SKILL.md +0 -152
  177. package/skills/qa-requirements-generator/references/iso-29148-structure.md +0 -153
  178. package/skills/qa-requirements-generator/references/requirement-patterns.md +0 -278
  179. package/skills/qa-rest-assured-writer/SKILL.md +0 -137
  180. package/skills/qa-rest-assured-writer/references/best-practices.md +0 -50
  181. package/skills/qa-rest-assured-writer/references/config.md +0 -124
  182. package/skills/qa-rest-assured-writer/references/patterns.md +0 -192
  183. package/skills/qa-risk-analyzer/SKILL.md +0 -158
  184. package/skills/qa-risk-analyzer/references/impact-analysis.md +0 -133
  185. package/skills/qa-risk-analyzer/references/risk-factors.md +0 -123
  186. package/skills/qa-robot-framework-writer/SKILL.md +0 -147
  187. package/skills/qa-robot-framework-writer/references/best-practices.md +0 -249
  188. package/skills/qa-robot-framework-writer/references/config.md +0 -204
  189. package/skills/qa-robot-framework-writer/references/libraries.md +0 -273
  190. package/skills/qa-robot-framework-writer/references/patterns.md +0 -216
  191. package/skills/qa-security-test-writer/SKILL.md +0 -123
  192. package/skills/qa-security-test-writer/references/best-practices.md +0 -155
  193. package/skills/qa-security-test-writer/references/owasp-top10.md +0 -331
  194. package/skills/qa-security-test-writer/references/zap-config.md +0 -258
  195. package/skills/qa-selenium-java-writer/SKILL.md +0 -143
  196. package/skills/qa-selenium-java-writer/references/best-practices.md +0 -59
  197. package/skills/qa-selenium-java-writer/references/config.md +0 -143
  198. package/skills/qa-selenium-java-writer/references/patterns.md +0 -170
  199. package/skills/qa-selenium-py-writer/SKILL.md +0 -150
  200. package/skills/qa-selenium-py-writer/references/best-practices.md +0 -175
  201. package/skills/qa-selenium-py-writer/references/config.md +0 -224
  202. package/skills/qa-selenium-py-writer/references/patterns.md +0 -255
  203. package/skills/qa-shortcut-integration/SKILL.md +0 -143
  204. package/skills/qa-shortcut-integration/references/api-patterns.md +0 -126
  205. package/skills/qa-shortcut-integration/references/field-mapping.md +0 -66
  206. package/skills/qa-spec-auditor/SKILL.md +0 -162
  207. package/skills/qa-spec-auditor/references/audit-checklist.md +0 -144
  208. package/skills/qa-spec-auditor/references/drift-patterns.md +0 -207
  209. package/skills/qa-spec-writer/SKILL.md +0 -143
  210. package/skills/qa-spec-writer/references/gherkin-guide.md +0 -253
  211. package/skills/qa-spec-writer/references/specification-patterns.md +0 -274
  212. package/skills/qa-spring-test-writer/SKILL.md +0 -170
  213. package/skills/qa-spring-test-writer/references/best-practices.md +0 -57
  214. package/skills/qa-spring-test-writer/references/config.md +0 -179
  215. package/skills/qa-spring-test-writer/references/patterns.md +0 -235
  216. package/skills/qa-supertest-writer/SKILL.md +0 -150
  217. package/skills/qa-supertest-writer/references/assertions.md +0 -192
  218. package/skills/qa-supertest-writer/references/best-practices.md +0 -102
  219. package/skills/qa-supertest-writer/references/config.md +0 -166
  220. package/skills/qa-supertest-writer/references/patterns.md +0 -242
  221. package/skills/qa-task-creator/SKILL.md +0 -142
  222. package/skills/qa-task-creator/references/linking-patterns.md +0 -127
  223. package/skills/qa-task-creator/references/task-types.md +0 -169
  224. package/skills/qa-task-creator/templates/task-template.md +0 -24
  225. package/skills/qa-test-doc-compiler/SKILL.md +0 -114
  226. package/skills/qa-test-doc-compiler/references/agile-tailoring.md +0 -220
  227. package/skills/qa-test-doc-compiler/references/iso-29119-3-documents.md +0 -302
  228. package/skills/qa-test-healer/SKILL.md +0 -101
  229. package/skills/qa-test-healer/references/diagnosis-patterns.md +0 -142
  230. package/skills/qa-test-healer/references/fix-strategies.md +0 -177
  231. package/skills/qa-test-reporter/SKILL.md +0 -130
  232. package/skills/qa-test-reporter/references/best-practices.md +0 -162
  233. package/skills/qa-test-reporter/references/iso-29119-reports.md +0 -236
  234. package/skills/qa-test-reporter/references/report-formats.md +0 -287
  235. package/skills/qa-test-reviewer/SKILL.md +0 -142
  236. package/skills/qa-test-reviewer/references/anti-patterns.md +0 -268
  237. package/skills/qa-test-reviewer/references/review-checklist.md +0 -93
  238. package/skills/qa-test-strategy/SKILL.md +0 -133
  239. package/skills/qa-test-strategy/references/entry-exit-criteria.md +0 -176
  240. package/skills/qa-test-strategy/references/risk-matrix.md +0 -102
  241. package/skills/qa-test-strategy/references/testing-types.md +0 -143
  242. package/skills/qa-testcase-from-docs/SKILL.md +0 -161
  243. package/skills/qa-testcase-from-docs/references/test-case-format.md +0 -196
  244. package/skills/qa-testcase-from-docs/references/test-design-techniques.md +0 -126
  245. package/skills/qa-testcase-from-docs/templates/test-case-template.md +0 -31
  246. package/skills/qa-testcase-from-ui/SKILL.md +0 -109
  247. package/skills/qa-testcase-from-ui/references/ui-element-patterns.md +0 -126
  248. package/skills/qa-testcase-from-ui/references/visual-analysis-guide.md +0 -146
  249. package/skills/qa-testcase-from-ui/templates/test-case-template.md +0 -31
  250. package/skills/qa-visual-regression-writer/SKILL.md +0 -175
  251. package/skills/qa-visual-regression-writer/references/best-practices.md +0 -154
  252. package/skills/qa-visual-regression-writer/references/config.md +0 -220
  253. package/skills/qa-visual-regression-writer/references/patterns.md +0 -213
  254. package/skills/qa-vitest-writer/SKILL.md +0 -141
  255. package/skills/qa-vitest-writer/references/assertions.md +0 -105
  256. package/skills/qa-vitest-writer/references/best-practices.md +0 -62
  257. package/skills/qa-vitest-writer/references/config.md +0 -127
  258. package/skills/qa-vitest-writer/references/patterns.md +0 -141
  259. package/skills/qa-webdriverio-writer/SKILL.md +0 -145
  260. package/skills/qa-webdriverio-writer/references/best-practices.md +0 -176
  261. package/skills/qa-webdriverio-writer/references/config.md +0 -240
  262. package/skills/qa-webdriverio-writer/references/patterns.md +0 -269
@@ -1,137 +0,0 @@
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 |
@@ -1,50 +0,0 @@
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 |
@@ -1,124 +0,0 @@
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
- ```
@@ -1,192 +0,0 @@
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
- ```
@@ -1,158 +0,0 @@
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` |