Answer
Reporting Cucumber Metrics to Management
What Management Actually Wants to Know
Management does NOT care about:
- āWhich step definitions passed
- āWhat the assertion message was
- āHow many Gherkin keywords were used
Management DOES care about:
- ā"Is the product ready to release?"
- ā"Are we finding bugs before production?"
- ā"Is automation saving us money?"
- ā"Are we getting better or worse?"
Key Metrics to Track and Report
CODE
1. AUTOMATION COVERAGE (%)
Automated / Total test cases Ć 100
Target: > 70% of regression test cases
2. PASS RATE (%)
Passed scenarios / Total scenarios Ć 100
Target: > 95% for release
3. DEFECTS FOUND BY AUTOMATION
Bugs caught in CI before manual QA
Target: > 60% defects caught by automation
4. TIME SAVED (Hours/Month)
Manual execution time - Automated execution time
Example: 40 manual hours/month ā 0.5 hours automated = 39.5h saved
5. ROI
(Hours saved Ć hourly cost) / Framework investment cost Ć 100
Example: (39.5h Ć $50) / $10,000 = 19.75% monthly ROI
6. FLAKINESS RATE (%)
Flaky scenarios / Total Ć 100
Target: < 2%
7. MEAN TIME TO DETECT (MTTD)
How quickly automation finds a regression after deployment
Target: < 30 minutes
Weekly Slack Digest (Automated)
Java
// Jenkins post-build: send Slack summary
post {
always {
script {
def passed = sh(script: "grep -o '\"passed\":[0-9]*' target/cucumber.json | awk -F: '{sum+=$2} END {print sum}'", returnStdout: true).trim()
def failed = sh(script: "grep -o '\"failed\":[0-9]*' target/cucumber.json | awk -F: '{sum+=$2} END {print sum}'", returnStdout: true).trim()
def total = passed.toInteger() + failed.toInteger()
def passRate = (passed.toInteger() * 100 / total).toInteger()
}
slackSend channel: '#qa-metrics', color: passRate >= 95 ? 'good' : 'danger',
message: """
*š Daily Automation Report ā ${params.ENV}*
ā
Passed: ${passed}/${total} (${passRate}%)
ā Failed: ${failed}
ā±ļø Duration: ${currentBuild.durationString}
š Report: ${env.BUILD_URL}cucumber-html-reports/overview-features.html
"""
}
}
Monthly Management Dashboard (Confluence/PowerPoint)
CODE
Slide 1: Executive Summary
"Automation caught 12 production-equivalent bugs this month
before any user was affected. Time saved: 160 hours."
Slide 2: Coverage Trend Chart
[Jan: 45%] [Feb: 58%] [Mar: 71%] [Apr: 78%] ā visual trend
Slide 3: Pass Rate (last 30 days)
Week 1: 91% Week 2: 94% Week 3: 97% Week 4: 98%
Status: ā
Improving trend, above 95% threshold
Slide 4: ROI Calculation
Manual testing would cost: 160h Ć $50 = $8,000/month
Automation maintenance: 10h Ć $50 = $500/month
NET SAVING: $7,500/month
Framework paid off in: Month 2
Slide 5: Top 5 Failures This Month (with root cause)
1. Payment timeout on staging (env issue ā not a bug)
2. Search filter regression (real bug ā caught before release)
...
Release Go/No-Go Dashboard
CODE
GREEN (Release now): @smoke ā„ 100%, @regression ā„ 95%
YELLOW (Release with risk): @smoke 100%, @regression 85-94%
RED (Do NOT release): @smoke < 100% OR @regression < 85%
Current status: š¢ GREEN ā smoke 100%, regression 97%
Release recommendation: APPROVED ā
