// Measure quality effectively with actionable metrics. Use when establishing quality dashboards, defining KPIs, or evaluating test effectiveness.
| name | quality-metrics |
| description | Measure quality effectively with actionable metrics. Use when establishing quality dashboards, defining KPIs, or evaluating test effectiveness. |
| version | 1.0.0 |
| category | quality-engineering |
| tags | ["metrics","kpis","quality-dashboards","dora-metrics","measurement","continuous-improvement"] |
| difficulty | intermediate |
| estimated_time | 30-45 minutes |
| author | user |
Measure what matters, not what's easy to measure.
Metrics should drive better decisions, not just prettier dashboards. If a metric doesn't change behavior or inform action, stop tracking it.
Test Count
Code Coverage Percentage
Test Cases Executed
Bugs Found
Story Points Completed
What: Percentage of bugs that reach production vs. caught before release
Why it matters: Measures effectiveness of your quality process
How to measure:
Defect Escape Rate = (Production Bugs / Total Bugs Found) ร 100
Good: < 5% escape rate Needs work: > 15% escape rate
Actions:
What: How long from bug introduction to discovery
Why it matters: Faster detection = cheaper fixes
How to measure:
MTTD = Time bug found - Time bug introduced
Good: < 1 day for critical paths Needs work: > 1 week
Actions:
What: Time from bug discovery to fix deployed
Why it matters: Indicates team efficiency and process friction
How to measure:
MTTR = Time fix deployed - Time bug discovered
Good: < 24 hours for critical bugs, < 1 week for minor Needs work: > 1 week for critical bugs
Actions:
What: How often you deploy to production
Why it matters: Proxy for team confidence and process maturity
How to measure:
Deployments per week (or day)
Good: Multiple per day Decent: Multiple per week Needs work: Less than weekly
Actions:
What: Percentage of deployments that cause production issues
Why it matters: Measures release quality
How to measure:
Change Failure Rate = (Failed Deployments / Total Deployments) ร 100
Good: < 5% Needs work: > 15%
Actions:
What: How long your test suite takes to run
Why it matters: Slow tests = slow feedback = less frequent testing
How to measure:
Time from commit to test completion
Good: < 10 minutes for unit tests, < 30 minutes for full suite Needs work: > 1 hour
Actions:
What: Percentage of tests that fail intermittently
Why it matters: Flaky tests destroy confidence
How to measure:
Flaky Test Rate = (Flaky Tests / Total Tests) ร 100
Good: < 1% Needs work: > 5%
Actions:
Focus on:
Skip:
Focus on:
Don't skip:
Focus on:
Balance:
Use for: Understanding what happened, trending over time
Use for: Predicting problems, early intervention
Language: Technical, actionable
Language: Business outcomes, not technical details
Language: Business impact, strategic
Top Row (Health)
Middle Row (Speed)
Bottom Row (Trends)
Add:
Problem: Optimizing for metrics instead of quality
Example: Writing useless tests to hit coverage targets
Fix: Focus on outcomes (can we deploy confidently?) not numbers
Problem: Dashboard overload, no clear priorities
Example: Tracking 30+ metrics that no one understands
Fix: Start with 5-7 core metrics, add only if they drive decisions
Problem: Tracking numbers but not changing behavior
Example: Watching MTTR climb for months without investigating
Fix: For every metric, define thresholds and actions
Problem: People optimize for metrics, not quality
Example: Marking bugs as "won't fix" to improve resolution time
Fix: Multiple complementary metrics, qualitative reviews
Problem: Using same metrics for all teams/contexts
Example: Measuring startup team same as regulated medical device team
Fix: Context-driven metric selection
Before:
After:
Before:
After:
What decision does this inform?
What action do we take if it's red?
Can this be gamed?
Does this reflect actual quality?
Who needs to see this?
Good metrics:
Bad metrics:
Start small: 5-7 metrics that matter Review often: Quarterly at minimum Kill ruthlessly: Remove metrics that don't drive action Stay contextual: What matters changes with your situation
qe-quality-analyzer collects and analyzes quality metrics:
// Agent collects comprehensive metrics automatically
await agent.collectMetrics({
scope: 'all',
timeframe: '30d',
categories: [
'deployment-frequency',
'defect-escape-rate',
'test-execution-time',
'flaky-test-rate',
'coverage-trends'
]
});
// Returns real-time dashboard data
// No manual tracking required
qe-quality-analyzer identifies trends and anomalies:
// Agent detects metric anomalies
const analysis = await agent.analyzeTrends({
metric: 'defect-escape-rate',
timeframe: '90d',
alertThreshold: 0.15
});
// Returns:
// {
// trend: 'increasing',
// currentValue: 0.18,
// avgValue: 0.08,
// anomaly: true,
// recommendation: 'Increase pre-release testing focus',
// relatedMetrics: ['test-coverage: decreasing', 'MTTR: increasing']
// }
qe-quality-gate uses metrics for decision-making:
// Agent makes GO/NO-GO decisions based on metrics
const decision = await agent.evaluateMetrics({
release: 'v3.2',
thresholds: {
defectEscapeRate: '<5%',
changeFailureRate: '<10%',
testExecutionTime: '<15min',
flakyTestRate: '<2%'
}
});
// Returns:
// {
// decision: 'NO-GO',
// blockers: [
// 'Flaky test rate: 4.2% (threshold: 2%)'
// ],
// recommendations: [
// 'Run qe-flaky-test-hunter to stabilize tests'
// ]
// }
qe-quality-analyzer generates live dashboards:
// Agent creates context-specific dashboards
await agent.createDashboard({
audience: 'executive', // or 'developer', 'product'
focus: 'release-readiness',
updateFrequency: 'real-time'
});
// Executive Dashboard:
// - Defect escape rate: 3.2% โ
// - Deployment frequency: 5/day โ
// - Change failure rate: 7% โ
// - Customer-impacting incidents: 1 (down from 3)
qe-regression-risk-analyzer uses metrics to optimize testing:
// Agent identifies which tests provide most value
const optimization = await agent.optimizeTestSuite({
metrics: {
executionTime: 'per-test',
defectDetectionRate: 'per-test',
maintenanceCost: 'per-test'
},
goal: 'maximize-value-per-minute'
});
// Recommends:
// - Remove 50 tests with 0% defect detection (save 15 min)
// - Keep top 200 tests (95% defect detection)
// - Result: 40% faster suite, 5% defect detection loss
// Multiple agents collaborate on metrics collection and analysis
const metricsFleet = await FleetManager.coordinate({
strategy: 'quality-metrics',
agents: [
'qe-test-executor', // Collect execution metrics
'qe-coverage-analyzer', // Collect coverage metrics
'qe-production-intelligence', // Collect production metrics
'qe-quality-analyzer', // Analyze and visualize
'qe-quality-gate' // Make decisions
],
topology: 'hierarchical'
});
// Continuous metrics pipeline
await metricsFleet.execute({
schedule: 'continuous',
aggregationInterval: '5min'
});
// Agent recommends metrics based on context
const recommendation = await qe-quality-analyzer.recommendMetrics({
context: 'startup',
stage: 'early',
team: 'small',
compliance: 'none'
});
// Recommends:
// - deployment-frequency (speed to market)
// - critical-path-coverage (protect revenue)
// - MTTR (move fast, fix fast)
//
// Skip:
// - comprehensive coverage %
// - detailed traceability
// - process compliance metrics
Core Quality Practices:
Testing Approaches:
Development Practices:
Metrics are tools for better decisions, not scorecards for performance reviews. Use them wisely.
With Agents: Agents automate metrics collection, detect trends and anomalies, and provide context-aware recommendations. Use agents to make metrics actionable and avoid vanity metrics. Agents continuously analyze what drives quality outcomes in your specific context.