specweave 0.23.18 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +93 -49
- package/CLAUDE.md +137 -4
- package/dist/src/cli/helpers/ado-area-path-mapper.d.ts +89 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.d.ts.map +1 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.js +213 -0
- package/dist/src/cli/helpers/ado-area-path-mapper.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts +29 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.d.ts.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js +109 -0
- package/dist/src/cli/helpers/issue-tracker/ado-auto-discover.js.map +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts +1 -0
- package/dist/src/cli/helpers/issue-tracker/ado.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/ado.js +2 -0
- package/dist/src/cli/helpers/issue-tracker/ado.js.map +1 -1
- package/dist/src/cli/helpers/smart-filter.d.ts +83 -0
- package/dist/src/cli/helpers/smart-filter.d.ts.map +1 -0
- package/dist/src/cli/helpers/smart-filter.js +265 -0
- package/dist/src/cli/helpers/smart-filter.js.map +1 -0
- package/dist/src/core/qa/quality-gate-decider.d.ts +1 -1
- package/dist/src/core/qa/quality-gate-decider.js +2 -2
- package/dist/src/core/qa/quality-gate-decider.js.map +1 -1
- package/dist/src/core/qa/risk-calculator.d.ts +2 -2
- package/dist/src/core/qa/risk-calculator.js +2 -2
- package/dist/src/core/validators/ac-presence-validator.d.ts +56 -0
- package/dist/src/core/validators/ac-presence-validator.d.ts.map +1 -0
- package/dist/src/core/validators/ac-presence-validator.js +149 -0
- package/dist/src/core/validators/ac-presence-validator.js.map +1 -0
- package/dist/src/integrations/ado/area-path-mapper.d.ts +137 -0
- package/dist/src/integrations/ado/area-path-mapper.d.ts.map +1 -0
- package/dist/src/integrations/ado/area-path-mapper.js +267 -0
- package/dist/src/integrations/ado/area-path-mapper.js.map +1 -0
- package/dist/src/integrations/jira/filter-processor.d.ts +126 -0
- package/dist/src/integrations/jira/filter-processor.d.ts.map +1 -0
- package/dist/src/integrations/jira/filter-processor.js +207 -0
- package/dist/src/integrations/jira/filter-processor.js.map +1 -0
- package/dist/src/integrations/jira/jira-client.d.ts +13 -0
- package/dist/src/integrations/jira/jira-client.d.ts.map +1 -1
- package/dist/src/integrations/jira/jira-client.js +33 -0
- package/dist/src/integrations/jira/jira-client.js.map +1 -1
- package/dist/src/utils/ac-embedder.d.ts +63 -0
- package/dist/src/utils/ac-embedder.d.ts.map +1 -0
- package/dist/src/utils/ac-embedder.js +217 -0
- package/dist/src/utils/ac-embedder.js.map +1 -0
- package/dist/src/utils/env-manager.d.ts +86 -0
- package/dist/src/utils/env-manager.d.ts.map +1 -0
- package/dist/src/utils/env-manager.js +188 -0
- package/dist/src/utils/env-manager.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave/agents/AGENTS-INDEX.md +1 -1
- package/plugins/specweave/agents/increment-quality-judge-v2/AGENT.md +9 -9
- package/plugins/specweave/commands/specweave-do.md +37 -0
- package/plugins/specweave/commands/specweave-done.md +159 -0
- package/plugins/specweave/commands/specweave-embed-acs.md +446 -0
- package/plugins/specweave/commands/specweave-next.md +148 -3
- package/plugins/specweave/commands/specweave-qa.md +2 -2
- package/plugins/specweave/hooks/pre-increment-start.sh +168 -0
- package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
- package/plugins/specweave-ado/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-ado/commands/specweave-ado-import-projects.md +331 -0
- package/plugins/specweave-alternatives/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-alternatives/commands/alternatives-analyze.md +336 -0
- package/plugins/specweave-alternatives/skills/architecture-alternatives/SKILL.md +651 -0
- package/plugins/specweave-alternatives/skills/bmad-method/SKILL.md +420 -0
- package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +487 -0
- package/plugins/specweave-backend/commands/api-scaffold.md +80 -0
- package/plugins/specweave-backend/commands/crud-generate.md +109 -0
- package/plugins/specweave-backend/commands/migration-generate.md +139 -0
- package/plugins/specweave-confluent/commands/connector-deploy.md +154 -0
- package/plugins/specweave-confluent/commands/ksqldb-query.md +179 -0
- package/plugins/specweave-confluent/commands/schema-register.md +123 -0
- package/plugins/specweave-core/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-core/commands/architecture-review.md +288 -0
- package/plugins/specweave-core/commands/code-review.md +213 -0
- package/plugins/specweave-core/commands/refactor-plan.md +249 -0
- package/plugins/specweave-core/skills/code-quality/SKILL.md +157 -0
- package/plugins/specweave-core/skills/design-patterns/SKILL.md +244 -0
- package/plugins/specweave-core/skills/software-architecture/SKILL.md +83 -0
- package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +22 -0
- package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +360 -0
- package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +480 -0
- package/plugins/specweave-cost-optimizer/skills/aws-cost-expert/SKILL.md +416 -0
- package/plugins/specweave-cost-optimizer/skills/cloud-pricing/SKILL.md +325 -0
- package/plugins/specweave-cost-optimizer/skills/cost-optimization/SKILL.md +337 -0
- package/plugins/specweave-diagrams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-diagrams/commands/diagrams-generate.md +168 -0
- package/plugins/specweave-docs/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-docs/commands/docs-generate.md +441 -0
- package/plugins/specweave-docs/commands/docs-init.md +334 -0
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +581 -0
- package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +689 -0
- package/plugins/specweave-docs/skills/technical-writing/SKILL.md +1039 -0
- package/plugins/specweave-docs-preview/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-figma/.claude-plugin/plugin.json +23 -0
- package/plugins/specweave-figma/commands/figma-import.md +690 -0
- package/plugins/specweave-figma/commands/figma-to-react.md +834 -0
- package/plugins/specweave-figma/commands/figma-tokens.md +815 -0
- package/plugins/specweave-frontend/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-frontend/agents/frontend-architect/AGENT.md +387 -0
- package/plugins/specweave-frontend/agents/frontend-architect/README.md +385 -0
- package/plugins/specweave-frontend/agents/frontend-architect/examples.md +590 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/component-template.tsx +152 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/hook-template.ts +311 -0
- package/plugins/specweave-frontend/agents/frontend-architect/templates/page-template.tsx +228 -0
- package/plugins/specweave-frontend/commands/component-generate.md +510 -0
- package/plugins/specweave-frontend/commands/design-system-init.md +494 -0
- package/plugins/specweave-frontend/commands/frontend-scaffold.md +207 -0
- package/plugins/specweave-frontend/commands/nextjs-setup.md +396 -0
- package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +278 -0
- package/plugins/specweave-frontend/skills/frontend/SKILL.md +420 -0
- package/plugins/specweave-frontend/skills/nextjs/SKILL.md +546 -0
- package/plugins/specweave-github/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +194 -0
- package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-jira/commands/import-projects.js +183 -0
- package/plugins/specweave-jira/commands/import-projects.md +97 -0
- package/plugins/specweave-jira/commands/import-projects.ts +288 -0
- package/plugins/specweave-jira/commands/specweave-jira-import-projects.md +298 -0
- package/plugins/specweave-kafka/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kafka-streams/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-kubernetes/commands/cluster-setup.md +262 -0
- package/plugins/specweave-kubernetes/commands/deployment-generate.md +242 -0
- package/plugins/specweave-kubernetes/commands/helm-scaffold.md +333 -0
- package/plugins/specweave-ml/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-mobile/commands/app-scaffold.md +233 -0
- package/plugins/specweave-mobile/commands/build-config.md +256 -0
- package/plugins/specweave-mobile/commands/screen-generate.md +289 -0
- package/plugins/specweave-n8n/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-plugin-dev/.claude-plugin/plugin.json +13 -12
- package/plugins/specweave-plugin-dev/commands/plugin-create.md +333 -0
- package/plugins/specweave-plugin-dev/commands/plugin-publish.md +339 -0
- package/plugins/specweave-plugin-dev/commands/plugin-test.md +293 -0
- package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +162 -0
- package/plugins/specweave-plugin-dev/skills/marketplace-publishing/SKILL.md +263 -0
- package/plugins/specweave-plugin-dev/skills/plugin-development/SKILL.md +316 -0
- package/plugins/specweave-release/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave-release/commands/specweave-release-npm.md +110 -0
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +168 -0
- package/plugins/specweave-testing/.claude-plugin/plugin.json +21 -0
- package/plugins/specweave-testing/agents/qa-engineer/AGENT.md +797 -0
- package/plugins/specweave-testing/agents/qa-engineer/README.md +443 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/playwright-e2e-test.ts +470 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/test-data-factory.ts +507 -0
- package/plugins/specweave-testing/agents/qa-engineer/templates/vitest-unit-test.ts +400 -0
- package/plugins/specweave-testing/agents/qa-engineer/test-strategies.md +726 -0
- package/plugins/specweave-testing/commands/e2e-setup.md +1081 -0
- package/plugins/specweave-testing/commands/test-coverage.md +979 -0
- package/plugins/specweave-testing/commands/test-generate.md +1156 -0
- package/plugins/specweave-testing/commands/test-init.md +409 -0
- package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +769 -0
- package/plugins/specweave-testing/skills/tdd-expert/SKILL.md +934 -0
- package/plugins/specweave-testing/skills/unit-testing-expert/SKILL.md +1011 -0
- package/plugins/specweave-tooling/.claude-plugin/plugin.json +22 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-create.md +691 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-package.md +751 -0
- package/plugins/specweave-tooling/commands/specweave-tooling-skill-validate.md +858 -0
- package/plugins/specweave-ui/.claude-plugin/plugin.json +10 -0
- package/plugins/specweave-ui/commands/ui-automate.md +199 -0
- package/plugins/specweave-ui/commands/ui-inspect.md +70 -0
- package/plugins/specweave-ui/skills/browser-automation/SKILL.md +314 -0
- package/plugins/specweave-ui/skills/ui-testing/SKILL.md +716 -0
- package/plugins/specweave-ui/skills/visual-regression/SKILL.md +728 -0
- package/plugins/specweave/commands/check-hooks.md +0 -257
- package/plugins/specweave/commands/specweave-archive-increments.md +0 -82
- package/plugins/specweave-plugin-dev/skills/plugin-expert/SKILL.md +0 -1231
- /package/plugins/specweave/{agents/code-reviewer.md → skills/code-reviewer/SKILL.md} +0 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
# QA Engineer Agent
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The QA Engineer agent is a specialized AI agent designed to help with test strategy, test planning, test automation, and comprehensive quality assurance for modern software projects.
|
|
6
|
+
|
|
7
|
+
## When to Use This Agent
|
|
8
|
+
|
|
9
|
+
Invoke this agent when you need:
|
|
10
|
+
|
|
11
|
+
- **Test Strategy**: Design comprehensive testing approaches (unit, integration, E2E)
|
|
12
|
+
- **Test Planning**: Break down features into testable scenarios
|
|
13
|
+
- **Test Automation**: Set up Playwright, Vitest, Cypress, or other testing frameworks
|
|
14
|
+
- **TDD Workflow**: Implement test-driven development practices
|
|
15
|
+
- **Quality Gates**: Define coverage thresholds and quality metrics
|
|
16
|
+
- **Performance Testing**: Load testing, stress testing, benchmarking
|
|
17
|
+
- **Accessibility Testing**: WCAG compliance, a11y automation
|
|
18
|
+
- **Security Testing**: Vulnerability scanning, penetration testing
|
|
19
|
+
- **CI/CD Integration**: Automated testing in pipelines
|
|
20
|
+
- **Test Maintenance**: Refactor flaky tests, improve test reliability
|
|
21
|
+
|
|
22
|
+
## How to Invoke
|
|
23
|
+
|
|
24
|
+
Use the Task tool with `subagent_type`:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
Task({
|
|
28
|
+
subagent_type: "specweave-testing:qa-engineer:qa-engineer",
|
|
29
|
+
prompt: "Design a comprehensive test strategy for a React e-commerce application with Vitest unit tests, Playwright E2E tests, and accessibility testing"
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Agent Capabilities
|
|
34
|
+
|
|
35
|
+
### 1. Testing Frameworks
|
|
36
|
+
|
|
37
|
+
**JavaScript/TypeScript**:
|
|
38
|
+
- Vitest for unit and integration testing
|
|
39
|
+
- Playwright for cross-browser E2E testing
|
|
40
|
+
- Cypress for browser automation
|
|
41
|
+
- Testing Library (React, Vue, Angular)
|
|
42
|
+
- MSW (Mock Service Worker) for API mocking
|
|
43
|
+
- Jest with modern features
|
|
44
|
+
|
|
45
|
+
**Other Languages**:
|
|
46
|
+
- pytest (Python) with fixtures
|
|
47
|
+
- JUnit 5 (Java) with Mockito
|
|
48
|
+
- RSpec (Ruby) with factories
|
|
49
|
+
- Go testing package with testify
|
|
50
|
+
|
|
51
|
+
**Specialized Testing**:
|
|
52
|
+
- Percy/Chromatic for visual regression
|
|
53
|
+
- axe-core for accessibility
|
|
54
|
+
- k6 for load testing
|
|
55
|
+
- OWASP ZAP for security
|
|
56
|
+
|
|
57
|
+
### 2. Testing Strategies
|
|
58
|
+
|
|
59
|
+
**Testing Pyramid**:
|
|
60
|
+
- Unit Tests (70%): Fast, isolated, single responsibility
|
|
61
|
+
- Integration Tests (20%): Module interactions, API contracts
|
|
62
|
+
- E2E Tests (10%): Critical user journeys
|
|
63
|
+
|
|
64
|
+
**Test-Driven Development (TDD)**:
|
|
65
|
+
- Red-Green-Refactor cycle
|
|
66
|
+
- Behavior-driven naming
|
|
67
|
+
- Design through tests
|
|
68
|
+
- Refactoring safety net
|
|
69
|
+
|
|
70
|
+
**Behavior-Driven Development (BDD)**:
|
|
71
|
+
- Given-When-Then format
|
|
72
|
+
- Cucumber/Gherkin syntax
|
|
73
|
+
- Living documentation
|
|
74
|
+
- Stakeholder-readable tests
|
|
75
|
+
|
|
76
|
+
### 3. Test Coverage & Quality
|
|
77
|
+
|
|
78
|
+
- Code coverage (line, branch, statement, function)
|
|
79
|
+
- Mutation testing (Stryker)
|
|
80
|
+
- Risk-based prioritization
|
|
81
|
+
- Boundary value analysis
|
|
82
|
+
- State transition testing
|
|
83
|
+
- Quality gates and thresholds
|
|
84
|
+
|
|
85
|
+
### 4. Test Organization
|
|
86
|
+
|
|
87
|
+
- AAA pattern (Arrange-Act-Assert)
|
|
88
|
+
- Page Object Model (POM) for E2E
|
|
89
|
+
- Test fixtures and factories
|
|
90
|
+
- Tagging and categorization
|
|
91
|
+
- Parallel test execution
|
|
92
|
+
- Test data management
|
|
93
|
+
|
|
94
|
+
### 5. CI/CD Integration
|
|
95
|
+
|
|
96
|
+
- GitHub Actions workflows
|
|
97
|
+
- GitLab CI pipelines
|
|
98
|
+
- Pre-commit hooks (Husky)
|
|
99
|
+
- Pull request checks
|
|
100
|
+
- Automated regression runs
|
|
101
|
+
- Test result reporting
|
|
102
|
+
|
|
103
|
+
## Common Use Cases
|
|
104
|
+
|
|
105
|
+
### 1. Design Test Strategy
|
|
106
|
+
|
|
107
|
+
**Prompt**:
|
|
108
|
+
```
|
|
109
|
+
"Design a test strategy for a Next.js SaaS application with:
|
|
110
|
+
- User authentication (OAuth, email/password)
|
|
111
|
+
- Real-time dashboard with WebSocket
|
|
112
|
+
- Payment processing (Stripe)
|
|
113
|
+
- Admin panel with RBAC
|
|
114
|
+
- Multi-tenancy support
|
|
115
|
+
|
|
116
|
+
Target: 80%+ code coverage, < 5 min test execution, zero flaky tests"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**What the agent provides**:
|
|
120
|
+
- Testing pyramid breakdown
|
|
121
|
+
- Framework selection (Vitest, Playwright, etc.)
|
|
122
|
+
- Coverage targets per layer
|
|
123
|
+
- Test data management strategy
|
|
124
|
+
- CI/CD integration plan
|
|
125
|
+
- Quality gates definition
|
|
126
|
+
|
|
127
|
+
### 2. Implement Unit Tests
|
|
128
|
+
|
|
129
|
+
**Prompt**:
|
|
130
|
+
```
|
|
131
|
+
"Set up Vitest for a TypeScript React project with:
|
|
132
|
+
- Unit tests for custom hooks
|
|
133
|
+
- Component tests with Testing Library
|
|
134
|
+
- API mocking with MSW
|
|
135
|
+
- Coverage thresholds (80%+ lines, 75%+ branches)
|
|
136
|
+
- Watch mode for development
|
|
137
|
+
- CI integration"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**What the agent provides**:
|
|
141
|
+
- Vitest configuration
|
|
142
|
+
- Test file structure
|
|
143
|
+
- Mock setup examples
|
|
144
|
+
- Coverage configuration
|
|
145
|
+
- CI workflow YAML
|
|
146
|
+
- Best practices documentation
|
|
147
|
+
|
|
148
|
+
### 3. Implement E2E Tests
|
|
149
|
+
|
|
150
|
+
**Prompt**:
|
|
151
|
+
```
|
|
152
|
+
"Set up Playwright E2E tests for an e-commerce checkout flow:
|
|
153
|
+
- Product search and filtering
|
|
154
|
+
- Add to cart
|
|
155
|
+
- Checkout with guest and authenticated users
|
|
156
|
+
- Payment processing (test mode)
|
|
157
|
+
- Order confirmation
|
|
158
|
+
|
|
159
|
+
Cross-browser testing (Chrome, Firefox, Safari)
|
|
160
|
+
Mobile emulation (iPhone, Android)
|
|
161
|
+
Visual regression testing
|
|
162
|
+
Parallel execution"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**What the agent provides**:
|
|
166
|
+
- Playwright configuration
|
|
167
|
+
- Page Object Model architecture
|
|
168
|
+
- Test fixtures for authentication
|
|
169
|
+
- API mocking strategies
|
|
170
|
+
- Visual regression setup
|
|
171
|
+
- Parallelization strategy
|
|
172
|
+
|
|
173
|
+
### 4. Implement TDD Workflow
|
|
174
|
+
|
|
175
|
+
**Prompt**:
|
|
176
|
+
```
|
|
177
|
+
"Guide me through TDD for implementing a shopping cart feature:
|
|
178
|
+
- Add item to cart
|
|
179
|
+
- Remove item from cart
|
|
180
|
+
- Update quantity
|
|
181
|
+
- Calculate total with tax
|
|
182
|
+
- Apply discount code
|
|
183
|
+
|
|
184
|
+
Use Vitest, follow red-green-refactor strictly"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**What the agent provides**:
|
|
188
|
+
- Step-by-step TDD cycle
|
|
189
|
+
- Failing test examples (RED)
|
|
190
|
+
- Minimal implementation (GREEN)
|
|
191
|
+
- Refactoring strategies
|
|
192
|
+
- Test-first design patterns
|
|
193
|
+
- Best practices checklist
|
|
194
|
+
|
|
195
|
+
### 5. Accessibility Testing
|
|
196
|
+
|
|
197
|
+
**Prompt**:
|
|
198
|
+
```
|
|
199
|
+
"Set up automated accessibility testing for a React application:
|
|
200
|
+
- WCAG AA compliance
|
|
201
|
+
- axe-core integration in Vitest
|
|
202
|
+
- Playwright accessibility assertions
|
|
203
|
+
- Keyboard navigation tests
|
|
204
|
+
- Screen reader compatibility
|
|
205
|
+
- Color contrast validation
|
|
206
|
+
|
|
207
|
+
Target: Lighthouse accessibility score 95+"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**What the agent provides**:
|
|
211
|
+
- axe-core setup with Vitest
|
|
212
|
+
- Playwright accessibility tests
|
|
213
|
+
- Keyboard navigation test examples
|
|
214
|
+
- Manual testing checklist
|
|
215
|
+
- WCAG compliance guide
|
|
216
|
+
- Accessibility audit process
|
|
217
|
+
|
|
218
|
+
### 6. Performance Testing
|
|
219
|
+
|
|
220
|
+
**Prompt**:
|
|
221
|
+
```
|
|
222
|
+
"Set up performance testing for a REST API:
|
|
223
|
+
- Load testing (1000 concurrent users)
|
|
224
|
+
- Stress testing (find breaking point)
|
|
225
|
+
- Soak testing (24 hour sustained load)
|
|
226
|
+
- Metrics: p50, p95, p99 response times
|
|
227
|
+
|
|
228
|
+
Use k6, integrate with CI/CD, track trends"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**What the agent provides**:
|
|
232
|
+
- k6 test scripts
|
|
233
|
+
- Load testing scenarios
|
|
234
|
+
- Performance thresholds
|
|
235
|
+
- CI integration (GitHub Actions)
|
|
236
|
+
- Grafana dashboard setup
|
|
237
|
+
- Performance budget definition
|
|
238
|
+
|
|
239
|
+
## Example Workflows
|
|
240
|
+
|
|
241
|
+
### Workflow 1: TDD Feature Development
|
|
242
|
+
|
|
243
|
+
1. **Write Failing Test (RED)**: Define expected behavior
|
|
244
|
+
2. **Implement Minimally (GREEN)**: Make test pass
|
|
245
|
+
3. **Refactor**: Improve code quality
|
|
246
|
+
4. **Repeat**: Next requirement
|
|
247
|
+
|
|
248
|
+
### Workflow 2: E2E Test Setup
|
|
249
|
+
|
|
250
|
+
1. **Install Playwright**: `npm install -D @playwright/test`
|
|
251
|
+
2. **Configure**: Browser setup, base URL, screenshots
|
|
252
|
+
3. **Create Page Objects**: Reusable page interactions
|
|
253
|
+
4. **Write Tests**: Critical user journeys
|
|
254
|
+
5. **CI Integration**: Run on every PR
|
|
255
|
+
6. **Monitor**: Track flakiness and execution time
|
|
256
|
+
|
|
257
|
+
### Workflow 3: Quality Audit
|
|
258
|
+
|
|
259
|
+
1. **Analyze Coverage**: Identify gaps
|
|
260
|
+
2. **Review Test Quality**: Flaky tests, slow tests
|
|
261
|
+
3. **Refactor**: Improve reliability
|
|
262
|
+
4. **Set Thresholds**: Enforce quality gates
|
|
263
|
+
5. **Monitor**: Track metrics over time
|
|
264
|
+
|
|
265
|
+
## Input Format
|
|
266
|
+
|
|
267
|
+
The agent expects a clear, specific prompt describing:
|
|
268
|
+
|
|
269
|
+
1. **Context**: What are you testing? What technology stack?
|
|
270
|
+
2. **Requirements**: What features need tests?
|
|
271
|
+
3. **Quality Targets**: Coverage %, performance, accessibility
|
|
272
|
+
4. **Constraints**: Team size, timeline, CI/CD platform
|
|
273
|
+
|
|
274
|
+
**Good prompt**:
|
|
275
|
+
```
|
|
276
|
+
"Design test strategy for Node.js REST API with:
|
|
277
|
+
- 50+ endpoints (CRUD operations)
|
|
278
|
+
- Authentication (JWT)
|
|
279
|
+
- Rate limiting
|
|
280
|
+
- PostgreSQL database
|
|
281
|
+
- Redis caching
|
|
282
|
+
|
|
283
|
+
Stack: TypeScript, Express, Prisma
|
|
284
|
+
Target: 85%+ coverage, < 2 min test execution
|
|
285
|
+
CI: GitHub Actions
|
|
286
|
+
Team: 5 developers, all familiar with Jest"
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Poor prompt**:
|
|
290
|
+
```
|
|
291
|
+
"Need tests for my API"
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Output Format
|
|
295
|
+
|
|
296
|
+
The agent provides:
|
|
297
|
+
|
|
298
|
+
1. **Test Strategy**: High-level approach and distribution
|
|
299
|
+
2. **Framework Setup**: Configuration files and installation
|
|
300
|
+
3. **Test Examples**: Code samples for each test type
|
|
301
|
+
4. **Best Practices**: Patterns and anti-patterns
|
|
302
|
+
5. **CI/CD Integration**: Workflow files
|
|
303
|
+
6. **Quality Metrics**: Coverage targets, thresholds
|
|
304
|
+
7. **Documentation**: Testing guidelines for team
|
|
305
|
+
|
|
306
|
+
## Best Practices
|
|
307
|
+
|
|
308
|
+
### 1. Test Behavior, Not Implementation
|
|
309
|
+
Focus on what code does, not how it does it.
|
|
310
|
+
|
|
311
|
+
### 2. Independent Tests
|
|
312
|
+
No shared state between tests.
|
|
313
|
+
|
|
314
|
+
### 3. Fast Feedback
|
|
315
|
+
Unit tests should run in seconds.
|
|
316
|
+
|
|
317
|
+
### 4. Readable Tests
|
|
318
|
+
Self-documenting test names and structure.
|
|
319
|
+
|
|
320
|
+
### 5. Maintainable Tests
|
|
321
|
+
Page Object Model, fixtures, utilities.
|
|
322
|
+
|
|
323
|
+
### 6. Realistic Tests
|
|
324
|
+
Test against production-like environment.
|
|
325
|
+
|
|
326
|
+
### 7. Coverage Targets
|
|
327
|
+
80%+ code coverage, 100% critical paths.
|
|
328
|
+
|
|
329
|
+
### 8. Flakiness Zero Tolerance
|
|
330
|
+
Fix or quarantine flaky tests immediately.
|
|
331
|
+
|
|
332
|
+
## Integration with SpecWeave
|
|
333
|
+
|
|
334
|
+
### Use with /specweave:increment
|
|
335
|
+
|
|
336
|
+
When planning a feature increment:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
# 1. Plan increment
|
|
340
|
+
/specweave:increment "Implement user authentication with OAuth"
|
|
341
|
+
|
|
342
|
+
# 2. Generate test strategy
|
|
343
|
+
Task({
|
|
344
|
+
subagent_type: "specweave-testing:qa-engineer:qa-engineer",
|
|
345
|
+
prompt: "Design test strategy for OAuth authentication with Google, GitHub, and email/password. Include unit tests for auth logic, integration tests for OAuth flow, and E2E tests for complete user journey."
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
# 3. Implement with TDD
|
|
349
|
+
/specweave:do
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Use with /specweave:qa
|
|
353
|
+
|
|
354
|
+
After implementation, validate test coverage:
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
# Run quality assessment
|
|
358
|
+
/specweave:qa 0123
|
|
359
|
+
|
|
360
|
+
# Agent checks:
|
|
361
|
+
# - Test coverage (lines, branches, functions)
|
|
362
|
+
# - Test quality (independent, fast, readable)
|
|
363
|
+
# - Critical path coverage
|
|
364
|
+
# - E2E test completeness
|
|
365
|
+
# - Accessibility test coverage
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
## Troubleshooting
|
|
369
|
+
|
|
370
|
+
### Issue: Flaky tests
|
|
371
|
+
|
|
372
|
+
**Solution**:
|
|
373
|
+
- Use proper wait strategies (no hardcoded delays)
|
|
374
|
+
- Isolate test data
|
|
375
|
+
- Mock external dependencies
|
|
376
|
+
- Use fake timers for time-based code
|
|
377
|
+
|
|
378
|
+
### Issue: Slow tests
|
|
379
|
+
|
|
380
|
+
**Solution**:
|
|
381
|
+
- Mock expensive operations (DB, API, file I/O)
|
|
382
|
+
- Use fake timers
|
|
383
|
+
- Run tests in parallel
|
|
384
|
+
- Profile slow tests
|
|
385
|
+
|
|
386
|
+
### Issue: Low coverage
|
|
387
|
+
|
|
388
|
+
**Solution**:
|
|
389
|
+
- Identify untested paths
|
|
390
|
+
- Add tests for edge cases
|
|
391
|
+
- Test error handling
|
|
392
|
+
- Use mutation testing to find weak tests
|
|
393
|
+
|
|
394
|
+
## Advanced Usage
|
|
395
|
+
|
|
396
|
+
### Contract Testing
|
|
397
|
+
|
|
398
|
+
```typescript
|
|
399
|
+
Task({
|
|
400
|
+
subagent_type: "specweave-testing:qa-engineer:qa-engineer",
|
|
401
|
+
prompt: `Set up Pact contract testing between:
|
|
402
|
+
- Frontend (React SPA)
|
|
403
|
+
- Backend API (Node.js)
|
|
404
|
+
- Third-party payment API (Stripe)
|
|
405
|
+
|
|
406
|
+
Ensure API compatibility across teams`
|
|
407
|
+
});
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Visual Regression Testing
|
|
411
|
+
|
|
412
|
+
```typescript
|
|
413
|
+
Task({
|
|
414
|
+
subagent_type: "specweave-testing:qa-engineer:qa-engineer",
|
|
415
|
+
prompt: `Set up visual regression testing with Percy for:
|
|
416
|
+
- 20+ pages across 3 breakpoints (mobile, tablet, desktop)
|
|
417
|
+
- 5+ themes (light, dark, high-contrast)
|
|
418
|
+
- Component library (Storybook integration)
|
|
419
|
+
|
|
420
|
+
CI integration, baseline management`
|
|
421
|
+
});
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
## Resources
|
|
425
|
+
|
|
426
|
+
- **Vitest Docs**: https://vitest.dev
|
|
427
|
+
- **Playwright Docs**: https://playwright.dev
|
|
428
|
+
- **Testing Library**: https://testing-library.com
|
|
429
|
+
- **TDD Guide**: https://martinfowler.com/bliki/TestDrivenDevelopment.html
|
|
430
|
+
- **Testing Best Practices**: https://testingjavascript.com
|
|
431
|
+
|
|
432
|
+
## Version History
|
|
433
|
+
|
|
434
|
+
- **v1.0.0** (2025-01-22): Initial release with Vitest, Playwright, TDD expertise
|
|
435
|
+
- **v1.1.0** (TBD): Add mobile testing support (Appium, Detox)
|
|
436
|
+
- **v1.2.0** (TBD): Add chaos engineering guidance
|
|
437
|
+
|
|
438
|
+
## Support
|
|
439
|
+
|
|
440
|
+
For issues or questions:
|
|
441
|
+
- GitHub Issues: https://github.com/anton-abyzov/specweave/issues
|
|
442
|
+
- Discord: https://discord.gg/specweave
|
|
443
|
+
- Documentation: https://spec-weave.com
|