Software Testing

5 Metrics For Automation Testing To Improve Your CI/CD Pipeline

Posted By: Zunnoor Zafar Posted On:

Summary

Five automation testing metrics show whether your test suite is actually improving your CI/CD pipeline: test execution time, flaky test rate, pass rate with build stability, defect escape rate, and critical-flow coverage. Each comes with a formula, a CI/CD signal, and what to do when the number worsens.

  • Test execution time tracks feedback speed per commit; a ten-minute build is a reasonable starting target, fixed by parallelizing and splitting suites.
  • Flaky test rate measures tests that pass and fail on unchanged code; quarantine repeat offenders and fix the root cause rather than leaving them.
  • Pass rate and build stability show healthy or broken builds, but read pass rate alongside coverage since a very high rate can signal weak tests.
  • Defect escape rate counts bugs found in production versus total defects per release, pointing to missing coverage or unreliable tests.
  • Critical-flow coverage measures how many high-risk journeys like login, checkout, and payments have automated tests; automate the riskiest gaps first.

Editorial summary · Read the full guide below

You introduced automated testing to catch problems before they reach production. Six months later, your test suite takes 40 minutes to run, some tests fail on Tuesday and pass on Wednesday, and a bug still makes it into production.

At this point, nobody can tell whether that automation is actually making the release process better.

These five metrics can help you figure out where your automation is falling short.

Here’s what to track and when the numbers need your attention.

Why Test Automation Metrics Matter In CI/CD

A CI/CD pipeline depends on fast, reliable feedback. Automation metrics help teams track whether their tests are delivering it.

Metrics are only useful when they help the team make a decision. Using them to compare individual testers usually misses the point.

If a metric changes but nobody acts on it, there’s little reason to keep tracking it.

For broader QA indicators, including requirement coverage, see our guide to 6 KPIs for QA testers. Here, we’re focusing specifically on automation metrics within CI/CD.

The 5 Metrics At A Glance

MetricFormulaCI/CD SignalAction When It Worsens
Test Execution TimeTime from the first test starting to the last one finishing, per stageFeedback time per commitParallelize, split suites
Flaky Test Rate(Tests with inconsistent results on the same code / total tests) x 100Unreliable resultsQuarantine, fix the root cause
Pass Rate And Build Stability(Passed tests / tests executed) x 100, plus builds failed by tests / total buildsHealthy or broken buildsFind the commit, separate infrastructure failures
Defect Escape Rate(Defects found in production / total defects found) x 100, per releaseDefects that passed the pipelineReview the root cause, add the missing test
Critical-Flow Coverage(Critical flows with automated tests / total critical flows) x 100Gaps in what the pipeline protectsAutomate high-risk gaps first

Set your targets around how your team actually tests and releases software.

The 5 Metrics For Automation Testing In CI/CD

1. Test Execution Time

  • What It Measures: The total time for all tests to run – from the first test to begin to the last test finishing.
  • Formula: Track the wall-clock time for each stage (unit, integration, and end-to-end). Record the median and 95th percentile to account for unusually slow runs.

In The Pipeline: Record execution time for each stage on every run. Run faster tests first so developers get feedback sooner.

Example Threshold: Agree on a limit per stage. Martin Fowler’s Continuous Integration article cites the Extreme Programming guideline of a ten-minute build as reasonable for many projects. Use it as a starting point.

  • When It Worsens: Start with duplicate tests and unnecessary setup time. If the suite is still slow, look at parallel execution or moving less urgent checks to nightly runs.

2. Flaky Test Rate

  • What It Measures: The percentage of tests that produce different results when run against unchanged code.
  • Formula: (Tests with inconsistent results on the same code / total tests) x 100.

Say 12 out of your 400 tests fail inconsistently. That’s a 3% flaky test rate.

Industry Context: In 2016 Google Testing Blog post by John Micco reported that about 1.5% of Google’s test runs were flaky and almost 16% of its tests had some flakiness. These figures measure different things: one counts test runs, the other counts tests.

If a test fails and then passes on a rerun without any code changes, flag it. Keep an eye on tests that do it repeatedly.

Check whether the failure comes from timing, test data, or the environment. Quarantine the tests if it’s repeatedly blocking merges, but don’t leave it there indefinitely.

3. Test Pass Rate and Build Stability

  • What It Measures: The share of tests that pass, and how often builds fail because of tests.
  • Formula: (Passed tests / tests executed) x 100 for each run. Build stability is (builds failed by tests / total builds) x 100.

In The Pipeline: Report by suite, branch, and environment. Write a rule for infrastructure failures such as runner crashes and network timeouts, so they do not distort the number.

Example Threshold: Set it per suite. A very high pass rate can also point to weak tests, so read it beside coverage and escape rate.

If the pass rate drops suddenly, check the latest changes first. It could be a regression, or something as simple as an unstable test environment.

4. Defect Escape Rate

This metric is also known as defect leakage.

Defect escape rate shows how many bugs were found after release instead of during testing.

  • Formula: (Defects found in production / total defects found for the release) x 100. State the time window, and weight by severity if you can.

Track where bugs were being caught. If the same type of issue keeps reaching production, it’s worth reviewing the tests that should have caught it.

Example Threshold: Set it by risk. Banking and healthcare teams often hold a stricter target than an internal tool team.

Look at the bugs that escape. Some might point to missing coverage, while others expose problems with test data or unreliable tests.

DORA’s change fail rate counts failed deployments, and defect escape rate counts defects. The two complement each other.

5. Critical-Flow Automation Coverage

This measures how much of your important user journeys are covered by automated tests. Think checkout, login, payments, or account creation.

  • Formula: (Critical flows with automated tests / total critical flows) x 100. You can also report the automated share of all test cases.

Start with the workflows that would cause the most trouble if they broke. For a banking app, that might mean transfers and login before less-used features.

Example Threshold: aim for full coverage of high-risk flows first, then widen.

  • When It Stalls: Automate high-risk gaps before adding tests to flows that already have coverage. Requirement traceability makes those gaps visible.

How These Metrics Connect To DORA

DORA measures software delivery performance through five metrics:

  1. Change lead time
  2. Deployment frequency
  3. Failed deployment recovery time
  4. Change failure rate
  5. Deployment rework rate

The first three measure throughput, while the last two focus on instability.

Older DORA resources may list only four metrics, so check the publication date when comparing sources.

Automation metrics help explain what’s happening behind these delivery results.

Here’s how the automation metrics relate to DORA’s delivery measures:

Test Automation MetricDORA Measure It Relates To
Test Execution TimeChange lead time
Flaky Test Rate And Pass RateChange lead time and deployment frequency, through reruns and blocked merges
Defect Escape RateChange fail rate and deployment rework rate

How To Choose Metrics Without Gaming Them

Before adding a metric to your dashboard, ask four questions:

  1. What decision will this metric help your team make?
  2. Who is responsible for monitoring it, and what should they do when it changes?
  3. What is the agreed target, and when will you review it?
  4. Could this metric be manipulated or used to rank individual team members?

A faster suite isn’t much of a win if more bugs are reaching production. The same goes for a high pass rate when important workflows aren’t covered.

Review these metrics in retrospectives, but don’t use them to rank individual team members.

How To Collect And Report These Metrics

  • CI Tool: Execution time, build outcomes, and reruns from Jenkins, GitHub Actions, Git Lab CI, and other tools. Our top CI/CD tools guide compares how each reports test results.
  • Test Reports: Individual test result output, exported as a standard format such as JUnit XML with each run.
  • Test Management Tool: The links between tests, requirements, and defects. These feed coverage and escape rate.

There are four elements to a simple dashboard:

  1. Speed
  2. Reliability
  3. Outcomes
  4. Coverage

Review the trends weekly and note any significant changes, along with the actions your team plans to take.

We recommend a flaky test rate. Ignoring a red build makes every other metric unreliable.

How Kualitee Helps

When a test fails in Jenkins, its error can easily get lost in the console log. Kualitee lets teams import automation results and associate them with build numbers and test cases. Testers can then log defects and link them to the relevant requirements.

Teams can also review execution history across builds, which makes it easier to spot recurring failures and follow changes in test results over time.

Kualitee integrates with Jenkins, CircleCI, GitHub, Selenium, Playwright, and it can import automation reports.

See your Jenkins or CircleCI results next to your manual test runs. Try Kualitee free for 14 days. No credit card required.

The Bottom Line

You don’t need to track every metric from day one. Start with execution time and flaky tests. Once those numbers are reliable, add defect escape rate and coverage to see where your automation needs work.

Frequently Asked Questions

What Are The Metrics Used In Automation Testing?
The most common metrics are test execution time, flaky test rate, pass rate with build stability, defect escape rate, and critical-flow coverage. They measure speed, predictability, results, and coverage gaps.
What Is A QA Metric?
A QA metric is a quantifiable measurement that can be used to monitor a stage of the testing process, such as pass rate, execution time or defect escape rate.
What Is A KPI In Testing?
It is a metric or target that has an agreement with the associated decision. Escape rate can also be a KPI for a team that has a threshold and an owner.
What Is A Flaky Test?

A flaky test passes and fails on the same code with no change in between.

Flaky test rate = Number of flaky tests/Total tests 100.

What Is Defect Leakage?
Defect leakage is the percentage of defects found in production divided by the total number of defects found for a release.
How Do You Reduce Test Execution Time?
Run tests in parallel. Split suites by stage. Deduplicate tests. Send slower checks to a nightly run. Track the median and 95th percentile to validate the change.
Start Free Trial Elevate Software Excellence with Kualitee Top notch testing platform & one price to rule them all

Author

Zunnoor Zafar

I'm a content writer who enjoys turning ideas into clear and engaging stories for readers. My focus is always on helping the audience find value in what they’re reading, whether it’s informative, thoughtful, or just enjoyable. Outside of writing, I spend most of my free time with my pets, diving into video games, or discovering new music that inspires me. Writing is my craft, but curiosity is what keeps me moving forward.