agentic-qe 2.0.0 → 2.1.1
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/agents/qx-partner.md +17 -4
- package/.claude/skills/accessibility-testing/SKILL.md +144 -692
- package/.claude/skills/agentic-quality-engineering/SKILL.md +176 -529
- package/.claude/skills/api-testing-patterns/SKILL.md +180 -560
- package/.claude/skills/brutal-honesty-review/SKILL.md +113 -603
- package/.claude/skills/bug-reporting-excellence/SKILL.md +116 -517
- package/.claude/skills/chaos-engineering-resilience/SKILL.md +127 -72
- package/.claude/skills/cicd-pipeline-qe-orchestrator/SKILL.md +209 -404
- package/.claude/skills/code-review-quality/SKILL.md +158 -608
- package/.claude/skills/compatibility-testing/SKILL.md +148 -38
- package/.claude/skills/compliance-testing/SKILL.md +132 -63
- package/.claude/skills/consultancy-practices/SKILL.md +114 -446
- package/.claude/skills/context-driven-testing/SKILL.md +117 -381
- package/.claude/skills/contract-testing/SKILL.md +176 -141
- package/.claude/skills/database-testing/SKILL.md +137 -130
- package/.claude/skills/exploratory-testing-advanced/SKILL.md +160 -629
- package/.claude/skills/holistic-testing-pact/SKILL.md +140 -188
- package/.claude/skills/localization-testing/SKILL.md +145 -33
- package/.claude/skills/mobile-testing/SKILL.md +132 -448
- package/.claude/skills/mutation-testing/SKILL.md +147 -41
- package/.claude/skills/performance-testing/SKILL.md +200 -546
- package/.claude/skills/quality-metrics/SKILL.md +164 -519
- package/.claude/skills/refactoring-patterns/SKILL.md +132 -699
- package/.claude/skills/regression-testing/SKILL.md +120 -926
- package/.claude/skills/risk-based-testing/SKILL.md +157 -660
- package/.claude/skills/security-testing/SKILL.md +199 -538
- package/.claude/skills/sherlock-review/SKILL.md +163 -699
- package/.claude/skills/shift-left-testing/SKILL.md +161 -465
- package/.claude/skills/shift-right-testing/SKILL.md +161 -519
- package/.claude/skills/six-thinking-hats/SKILL.md +175 -1110
- package/.claude/skills/skills-manifest.json +71 -20
- package/.claude/skills/tdd-london-chicago/SKILL.md +131 -448
- package/.claude/skills/technical-writing/SKILL.md +103 -154
- package/.claude/skills/test-automation-strategy/SKILL.md +166 -772
- package/.claude/skills/test-data-management/SKILL.md +126 -910
- package/.claude/skills/test-design-techniques/SKILL.md +179 -89
- package/.claude/skills/test-environment-management/SKILL.md +136 -91
- package/.claude/skills/test-reporting-analytics/SKILL.md +169 -92
- package/.claude/skills/testability-scoring/SKILL.md +172 -538
- package/.claude/skills/testability-scoring/scripts/generate-html-report.js +0 -0
- package/.claude/skills/visual-testing-advanced/SKILL.md +155 -78
- package/.claude/skills/xp-practices/SKILL.md +151 -587
- package/CHANGELOG.md +86 -0
- package/README.md +23 -16
- package/dist/agents/QXPartnerAgent.d.ts +47 -1
- package/dist/agents/QXPartnerAgent.d.ts.map +1 -1
- package/dist/agents/QXPartnerAgent.js +2086 -125
- package/dist/agents/QXPartnerAgent.js.map +1 -1
- package/dist/agents/lifecycle/AgentLifecycleManager.d.ts.map +1 -1
- package/dist/agents/lifecycle/AgentLifecycleManager.js +34 -31
- package/dist/agents/lifecycle/AgentLifecycleManager.js.map +1 -1
- package/dist/cli/commands/init-claude-md-template.d.ts.map +1 -1
- package/dist/cli/commands/init-claude-md-template.js +14 -0
- package/dist/cli/commands/init-claude-md-template.js.map +1 -1
- package/dist/core/SwarmCoordinator.d.ts +180 -0
- package/dist/core/SwarmCoordinator.d.ts.map +1 -0
- package/dist/core/SwarmCoordinator.js +473 -0
- package/dist/core/SwarmCoordinator.js.map +1 -0
- package/dist/core/memory/ReflexionMemoryAdapter.d.ts +109 -0
- package/dist/core/memory/ReflexionMemoryAdapter.d.ts.map +1 -0
- package/dist/core/memory/ReflexionMemoryAdapter.js +306 -0
- package/dist/core/memory/ReflexionMemoryAdapter.js.map +1 -0
- package/dist/core/memory/RuVectorPatternStore.d.ts +28 -0
- package/dist/core/memory/RuVectorPatternStore.d.ts.map +1 -1
- package/dist/core/memory/RuVectorPatternStore.js +70 -0
- package/dist/core/memory/RuVectorPatternStore.js.map +1 -1
- package/dist/core/memory/SparseVectorSearch.d.ts +55 -0
- package/dist/core/memory/SparseVectorSearch.d.ts.map +1 -0
- package/dist/core/memory/SparseVectorSearch.js +130 -0
- package/dist/core/memory/SparseVectorSearch.js.map +1 -0
- package/dist/core/memory/TieredCompression.d.ts +81 -0
- package/dist/core/memory/TieredCompression.d.ts.map +1 -0
- package/dist/core/memory/TieredCompression.js +270 -0
- package/dist/core/memory/TieredCompression.js.map +1 -0
- package/dist/core/memory/index.d.ts +6 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +29 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/metrics/MetricsAggregator.d.ts +228 -0
- package/dist/core/metrics/MetricsAggregator.d.ts.map +1 -0
- package/dist/core/metrics/MetricsAggregator.js +482 -0
- package/dist/core/metrics/MetricsAggregator.js.map +1 -0
- package/dist/core/metrics/index.d.ts +5 -0
- package/dist/core/metrics/index.d.ts.map +1 -0
- package/dist/core/metrics/index.js +11 -0
- package/dist/core/metrics/index.js.map +1 -0
- package/dist/core/optimization/SwarmOptimizer.d.ts +5 -0
- package/dist/core/optimization/SwarmOptimizer.d.ts.map +1 -1
- package/dist/core/optimization/SwarmOptimizer.js +17 -0
- package/dist/core/optimization/SwarmOptimizer.js.map +1 -1
- package/dist/core/orchestration/AdaptiveScheduler.d.ts +190 -0
- package/dist/core/orchestration/AdaptiveScheduler.d.ts.map +1 -0
- package/dist/core/orchestration/AdaptiveScheduler.js +460 -0
- package/dist/core/orchestration/AdaptiveScheduler.js.map +1 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts +13 -0
- package/dist/core/orchestration/WorkflowOrchestrator.d.ts.map +1 -1
- package/dist/core/orchestration/WorkflowOrchestrator.js +32 -0
- package/dist/core/orchestration/WorkflowOrchestrator.js.map +1 -1
- package/dist/core/recovery/CircuitBreaker.d.ts +176 -0
- package/dist/core/recovery/CircuitBreaker.d.ts.map +1 -0
- package/dist/core/recovery/CircuitBreaker.js +382 -0
- package/dist/core/recovery/CircuitBreaker.js.map +1 -0
- package/dist/core/recovery/RecoveryOrchestrator.d.ts +186 -0
- package/dist/core/recovery/RecoveryOrchestrator.d.ts.map +1 -0
- package/dist/core/recovery/RecoveryOrchestrator.js +476 -0
- package/dist/core/recovery/RecoveryOrchestrator.js.map +1 -0
- package/dist/core/recovery/RetryStrategy.d.ts +127 -0
- package/dist/core/recovery/RetryStrategy.d.ts.map +1 -0
- package/dist/core/recovery/RetryStrategy.js +314 -0
- package/dist/core/recovery/RetryStrategy.js.map +1 -0
- package/dist/core/recovery/index.d.ts +8 -0
- package/dist/core/recovery/index.d.ts.map +1 -0
- package/dist/core/recovery/index.js +27 -0
- package/dist/core/recovery/index.js.map +1 -0
- package/dist/core/skills/DependencyResolver.d.ts +99 -0
- package/dist/core/skills/DependencyResolver.d.ts.map +1 -0
- package/dist/core/skills/DependencyResolver.js +260 -0
- package/dist/core/skills/DependencyResolver.js.map +1 -0
- package/dist/core/skills/ManifestGenerator.d.ts +114 -0
- package/dist/core/skills/ManifestGenerator.d.ts.map +1 -0
- package/dist/core/skills/ManifestGenerator.js +449 -0
- package/dist/core/skills/ManifestGenerator.js.map +1 -0
- package/dist/core/skills/index.d.ts +9 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/skills/index.js +24 -0
- package/dist/core/skills/index.js.map +1 -0
- package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts +5 -0
- package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js +36 -2
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts +5 -0
- package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js +36 -2
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -1
- package/dist/mcp/server.d.ts +9 -9
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +1 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/types/qx.d.ts +113 -7
- package/dist/types/qx.d.ts.map +1 -1
- package/dist/types/qx.js.map +1 -1
- package/dist/visualization/api/RestEndpoints.js +1 -1
- package/dist/visualization/api/RestEndpoints.js.map +1 -1
- package/package.json +15 -54
|
@@ -1,66 +1,100 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mutation-testing
|
|
3
|
-
description: Test quality validation through mutation testing, assessing test suite effectiveness by introducing code mutations and measuring kill rate. Use when evaluating test quality, identifying weak tests, or proving tests actually catch bugs.
|
|
3
|
+
description: "Test quality validation through mutation testing, assessing test suite effectiveness by introducing code mutations and measuring kill rate. Use when evaluating test quality, identifying weak tests, or proving tests actually catch bugs."
|
|
4
|
+
category: specialized-testing
|
|
5
|
+
priority: high
|
|
6
|
+
tokenEstimate: 900
|
|
7
|
+
agents: [qe-test-generator, qe-coverage-analyzer, qe-quality-analyzer]
|
|
8
|
+
implementation_status: optimized
|
|
9
|
+
optimization_version: 1.0
|
|
10
|
+
last_optimized: 2025-12-02
|
|
11
|
+
dependencies: []
|
|
12
|
+
quick_reference_card: true
|
|
13
|
+
tags: [mutation, stryker, test-quality, kill-rate, assertions, effectiveness]
|
|
4
14
|
---
|
|
5
15
|
|
|
6
16
|
# Mutation Testing
|
|
7
17
|
|
|
8
|
-
|
|
18
|
+
<default_to_action>
|
|
19
|
+
When validating test quality or improving test effectiveness:
|
|
20
|
+
1. MUTATE code (change + to -, >= to >, remove statements)
|
|
21
|
+
2. RUN tests against each mutant
|
|
22
|
+
3. VERIFY tests catch mutations (kill mutants)
|
|
23
|
+
4. IDENTIFY surviving mutants (tests need improvement)
|
|
24
|
+
5. STRENGTHEN tests to kill surviving mutants
|
|
25
|
+
|
|
26
|
+
**Quick Mutation Metrics:**
|
|
27
|
+
- Mutation Score = Killed / (Killed + Survived)
|
|
28
|
+
- Target: > 80% mutation score
|
|
29
|
+
- Surviving mutants = weak tests
|
|
30
|
+
|
|
31
|
+
**Critical Success Factors:**
|
|
32
|
+
- High coverage ≠ good tests (100% coverage, 0% assertions)
|
|
33
|
+
- Mutation testing proves tests actually catch bugs
|
|
34
|
+
- Focus on critical code paths first
|
|
35
|
+
</default_to_action>
|
|
36
|
+
|
|
37
|
+
## Quick Reference Card
|
|
38
|
+
|
|
39
|
+
### When to Use
|
|
40
|
+
- Evaluating test suite quality
|
|
41
|
+
- Finding gaps in test assertions
|
|
42
|
+
- Proving tests catch bugs
|
|
43
|
+
- Before critical releases
|
|
44
|
+
|
|
45
|
+
### Mutation Score Interpretation
|
|
46
|
+
| Score | Interpretation |
|
|
47
|
+
|-------|----------------|
|
|
48
|
+
| **90%+** | Excellent test quality |
|
|
49
|
+
| **80-90%** | Good, minor improvements |
|
|
50
|
+
| **60-80%** | Needs attention |
|
|
51
|
+
| **< 60%** | Significant gaps |
|
|
52
|
+
|
|
53
|
+
### Common Mutation Operators
|
|
54
|
+
| Category | Original | Mutant |
|
|
55
|
+
|----------|----------|--------|
|
|
56
|
+
| **Arithmetic** | `a + b` | `a - b` |
|
|
57
|
+
| **Relational** | `x >= 18` | `x > 18` |
|
|
58
|
+
| **Logical** | `a && b` | `a \|\| b` |
|
|
59
|
+
| **Conditional** | `if (x)` | `if (true)` |
|
|
60
|
+
| **Statement** | `return x` | *(removed)* |
|
|
9
61
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Mutation testing validates test quality by introducing small code changes (mutations) and verifying tests catch them. High mutation score = effective tests.
|
|
13
|
-
|
|
14
|
-
## What is Mutation Testing?
|
|
15
|
-
|
|
16
|
-
**Process:**
|
|
17
|
-
1. Mutate code (change + to -, < to <=, remove if statements)
|
|
18
|
-
2. Run tests against mutated code
|
|
19
|
-
3. If tests fail → Mutation "killed" ✅ (good)
|
|
20
|
-
4. If tests pass → Mutation "survived" ❌ (weak tests)
|
|
62
|
+
---
|
|
21
63
|
|
|
22
|
-
|
|
64
|
+
## How Mutation Testing Works
|
|
23
65
|
|
|
24
|
-
**Example:**
|
|
25
66
|
```javascript
|
|
26
67
|
// Original code
|
|
27
68
|
function isAdult(age) {
|
|
28
|
-
return age >= 18; // ←
|
|
69
|
+
return age >= 18; // ← Mutant: change >= to >
|
|
29
70
|
}
|
|
30
71
|
|
|
31
|
-
//
|
|
72
|
+
// Strong test (catches mutation)
|
|
32
73
|
test('18 is adult', () => {
|
|
33
|
-
expect(isAdult(18)).toBe(true); //
|
|
74
|
+
expect(isAdult(18)).toBe(true); // Kills mutant!
|
|
34
75
|
});
|
|
35
|
-
```
|
|
36
76
|
|
|
37
|
-
|
|
38
|
-
```javascript
|
|
77
|
+
// Weak test (mutation survives)
|
|
39
78
|
test('19 is adult', () => {
|
|
40
79
|
expect(isAdult(19)).toBe(true); // Doesn't catch >= vs >
|
|
41
80
|
});
|
|
42
|
-
//
|
|
81
|
+
// Surviving mutant → Test needs boundary value
|
|
43
82
|
```
|
|
44
83
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
**Arithmetic:** `+ → -`, `* → /`
|
|
48
|
-
**Relational:** `< → <=`, `== → !=`
|
|
49
|
-
**Logical:** `&& → ||`, `! removed`
|
|
50
|
-
**Conditional:** `if (x) → if (true)`, `if (x) → if (false)`
|
|
51
|
-
**Statement:** Remove return, remove function call
|
|
84
|
+
---
|
|
52
85
|
|
|
53
86
|
## Using Stryker
|
|
54
87
|
|
|
55
|
-
**Install:**
|
|
56
88
|
```bash
|
|
89
|
+
# Install
|
|
57
90
|
npm install --save-dev @stryker-mutator/core @stryker-mutator/jest-runner
|
|
91
|
+
|
|
92
|
+
# Initialize
|
|
58
93
|
npx stryker init
|
|
59
94
|
```
|
|
60
95
|
|
|
61
96
|
**Configuration:**
|
|
62
|
-
```
|
|
63
|
-
// stryker.conf.json
|
|
97
|
+
```json
|
|
64
98
|
{
|
|
65
99
|
"packageManager": "npm",
|
|
66
100
|
"reporters": ["html", "clear-text", "progress"],
|
|
@@ -92,14 +126,45 @@ No Coverage: 3
|
|
|
92
126
|
Timeout: 1
|
|
93
127
|
```
|
|
94
128
|
|
|
95
|
-
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Fixing Surviving Mutants
|
|
132
|
+
|
|
133
|
+
```javascript
|
|
134
|
+
// Surviving mutant: >= changed to >
|
|
135
|
+
function calculateDiscount(quantity) {
|
|
136
|
+
if (quantity >= 10) { // Mutant survives!
|
|
137
|
+
return 0.1;
|
|
138
|
+
}
|
|
139
|
+
return 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Original weak test
|
|
143
|
+
test('large order gets discount', () => {
|
|
144
|
+
expect(calculateDiscount(15)).toBe(0.1); // Doesn't test boundary
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// Fixed: Add boundary test
|
|
148
|
+
test('exactly 10 gets discount', () => {
|
|
149
|
+
expect(calculateDiscount(10)).toBe(0.1); // Kills mutant!
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
test('9 does not get discount', () => {
|
|
153
|
+
expect(calculateDiscount(9)).toBe(0); // Tests below boundary
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Agent-Driven Mutation Testing
|
|
96
160
|
|
|
97
161
|
```typescript
|
|
98
|
-
//
|
|
99
|
-
|
|
162
|
+
// Analyze mutation score and generate fixes
|
|
163
|
+
await Task("Mutation Analysis", {
|
|
100
164
|
targetFile: 'src/payment.ts',
|
|
101
|
-
generateMissingTests: true
|
|
102
|
-
|
|
165
|
+
generateMissingTests: true,
|
|
166
|
+
minScore: 80
|
|
167
|
+
}, "qe-test-generator");
|
|
103
168
|
|
|
104
169
|
// Returns:
|
|
105
170
|
// {
|
|
@@ -111,13 +176,54 @@ const mutationAnalysis = await agent.analyzeMutations({
|
|
|
111
176
|
// 'test for boundary at line 45'
|
|
112
177
|
// ]
|
|
113
178
|
// }
|
|
179
|
+
|
|
180
|
+
// Coverage + mutation correlation
|
|
181
|
+
await Task("Coverage Quality Analysis", {
|
|
182
|
+
coverageData: coverageReport,
|
|
183
|
+
mutationData: mutationReport,
|
|
184
|
+
identifyWeakCoverage: true
|
|
185
|
+
}, "qe-coverage-analyzer");
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Agent Coordination Hints
|
|
191
|
+
|
|
192
|
+
### Memory Namespace
|
|
114
193
|
```
|
|
194
|
+
aqe/mutation-testing/
|
|
195
|
+
├── mutation-results/* - Stryker reports
|
|
196
|
+
├── surviving/* - Surviving mutants
|
|
197
|
+
├── generated-tests/* - Tests to kill mutants
|
|
198
|
+
└── trends/* - Mutation score over time
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Fleet Coordination
|
|
202
|
+
```typescript
|
|
203
|
+
const mutationFleet = await FleetManager.coordinate({
|
|
204
|
+
strategy: 'mutation-testing',
|
|
205
|
+
agents: [
|
|
206
|
+
'qe-test-generator', // Generate tests for survivors
|
|
207
|
+
'qe-coverage-analyzer', // Coverage correlation
|
|
208
|
+
'qe-quality-analyzer' // Quality assessment
|
|
209
|
+
],
|
|
210
|
+
topology: 'sequential'
|
|
211
|
+
});
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Related Skills
|
|
217
|
+
- [tdd-london-chicago](../tdd-london-chicago/) - Write effective tests first
|
|
218
|
+
- [test-design-techniques](../test-design-techniques/) - Boundary value analysis
|
|
219
|
+
- [quality-metrics](../quality-metrics/) - Measure test effectiveness
|
|
220
|
+
|
|
221
|
+
---
|
|
115
222
|
|
|
116
223
|
## Remember
|
|
117
224
|
|
|
118
|
-
**High code coverage ≠ good tests
|
|
225
|
+
**High code coverage ≠ good tests.** 100% coverage but weak assertions = useless. Mutation testing proves tests actually catch bugs.
|
|
119
226
|
|
|
120
|
-
-
|
|
121
|
-
- Mutation testing proves tests work
|
|
227
|
+
**Focus on critical paths first.** Don't mutation test everything - prioritize payment, authentication, data integrity code.
|
|
122
228
|
|
|
123
|
-
**With Agents:**
|
|
229
|
+
**With Agents:** Agents run mutation analysis, identify surviving mutants, and generate missing test cases to kill them. Automated improvement of test quality.
|