</>

Technology

Cucumber

Difficulty

Advanced

Interview Question

How do you present Cucumber test results and automation metrics to non-technical management?

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 āœ…

Follow AutomateQA

Related Topics