Non-FictionAI OperatorTest OptimizationCI/CD
Regression Test Selection Manual eBook
Analyze code changes to predict which tests are li
Analyze code changes to predict which tests are likely to fail. Run only relevant subsets of your test suite, reducing CI wait times dramatically.
Formats
Free sample
Chapter 1: The 98% Lie--Every engineering leader believes they have a CI problem. They do not. They have a trust problem dressed up in green checkmarks.You have stared at a CI dashboard for forty-seven minutes waiting for a build to finish. You have refreshed Slack, read Hacker News, refilled your coffee, and watched the little yellow circle spin. Then the tests passed.
They almost always pass. Ninety-eight percent of the time, to be precise. That is not a guess. That is the average across five hundred engineering teams studied between 2022 and 2024. For every one hundred test executions in pre-submit pipelines, ninety-eight return green.
Your team waits nearly an hour per commit for confirmation of what everyone already suspected: the code probably works.This chapter dismantles the assumption that "running everything" is safe or responsible. It reveals why most regression test suites are designed for fear rather than speed, why flaky tests are quietly destroying your engineering culture, and why the distinction between pre-submit and post-submit pipelines is the most underutilized lever in continuous integration. By the end, you will understand why perfect safety is the enemy of fast delivery—and why the goal of regression test selection is not to catch every bug, but to catch the right bugs at the right time.The Mathematics of Wasted Time Let us begin with a simple calculation that most engineering organizations refuse to perform because the answer is too embarrassing.Assume a team of fifty developers. Each developer opens four pull requests per week. Each pull request triggers a full regression suite that takes forty-five minutes to execute.
That is 180 minutes of CI time per developer per week, or 9,000 minutes across the team. Divide by sixty to get 150 hours of CI wait time per week. Over a year, assuming forty-eight working weeks, that is 7,200 hours of developers sitting idle, waiting for tests to finish.Now factor in the fully-loaded cost of a senior engineer: salary, benefits, office space, equipment, recruiting amortization. A conservative estimate is 120perhour.Multiply7,200hoursby120 per hour. Multiply 7,200 hours by 120perhour.Multiply7,200hoursby120.
The result is $864,000 per year. That is not cloud billing. That is developer time burned on a ritual that produces almost no value.But the calculation gets worse. The forty-five minute figure is optimistic. At many large enterprises, pre-submit regression suites run ninety minutes to three hours.
At a three-hour CI time, the annual waste exceeds three million dollars for a team of fifty. That money could hire five additional engineers. Instead, it evaporates while developers watch progress bars.The defenders of full regression suites will object. They will say that catching one rare bug justifies the cost. They will tell stories about the time a test caught a subtle race condition that would have cost millions in production.
These stories are almost always true. They are also irrelevant. The question is not whether full regression suites catch bugs. The question is whether they catch enough bugs to justify the waste.The data says no.Analysis of test execution logs from two hundred organizations reveals a consistent pattern. The first ten percent of tests executed by duration catch approximately ninety percent of all regressions that will be caught pre-submit.
The remaining ninety percent of test execution time catches the other ten percent of regressions. This is the law of diminishing returns applied to software testing. The first smoke tests, the critical path validations, the integration tests on core services—these catch the vast majority of problems. The long tail of edge cases, compatibility checks, and rarely-touched modules almost never fail. When they do fail, they often fail for reasons unrelated to the change.Running the long tail on every commit is not quality assurance.
It is superstition dressed as engineering discipline.The Flaky Test Epidemic If the ninety-eight percent pass rate were the only problem, regression test selection would still be urgent. But there is a deeper pathology: flaky tests.A flaky test is any test that produces different results across multiple runs without any change to the codebase. The test passes, then fails, then passes again. The same commit, the same environment, the same inputs—different outcomes. Flaky tests are not rare.
Industry studies consistently find that between five percent and fifteen percent of all automated tests in mature suites are flaky. In some organizations, the number exceeds twenty percent.Consider what happens when a flaky test fails. A developer sees a red CI dashboard. They stop their current work. They investigate the failure.
They spend anywhere from fifteen minutes to two hours trying to reproduce the issue. They discover that the test fails nondeterministically. They rerun the test. It passes. They have learned nothing except that the test is unreliable.The cumulative effect of flaky tests is not measured in minutes but in destroyed trust.
After a developer has been burned by three false failures, they stop treating CI failures seriously. They look at a red dashboard and think, "Probably flaky." Sometimes they are right. Sometimes they are wrong. When a real regression causes a failure and the developer dismisses it as flaky, the bug ships to production.The relationship between flaky tests and regression test selection is critical to understand. Flaky tests break every selection technique in this book.
Static selection cannot distinguish between a flaky test and a reliable one. Dynamic collection's traceability matrix becomes corrupted by flaky test outcomes. Machine learning models trained on flaky data learn to predict noise rather than signal. For this reason, Chapter 10 is dedicated entirely to quarantining and eliminating flaky tests. Do not skip it.
Do not proceed to advanced selection techniques until your flaky test rate is below five percent.The Pre-Submit and Post-Submit Distinction Most engineering teams treat all test executions the same. A test is a test. This is a category error of the highest order.Pre-submit tests run against code that has not yet been merged to the main branch. Their purpose is to provide rapid feedback to the developer who is still contextually aware of the changes they just made. The developer is in flow.
They remember what they wrote. If a test fails, they can fix it immediately without context switching. The latency tolerance for pre-submit testing is measured in minutes. If a developer waits more than fifteen minutes for pre-submit results, they will switch to another task. When the results finally arrive, the developer must spend time re-establishing context.
The cost of a fifteen-minute pre-submit delay is not fifteen minutes. It is fifteen minutes plus a ten-minute context recovery tax.Post-submit tests run against code that has already been merged. Their purpose is different. They provide a safety net for the long tail of scenarios that rarely fail but would be catastrophic if they did. Post-submit tests can run for hours.
They can execute expensive end-to-end scenarios. They can spin up full production-like environments. The developer does not wait for them. The developer has already moved on to the next task. If a post-submit test fails, it creates a ticket, alerts an on-call engineer, and gets fixed asynchronously.The mistake that most teams make is trying to run post-submit tests in the pre-submit pipeline.
They run the expensive, long-running, end-to-end scenarios before merge because they are afraid of missing a regression. This fear is…
This is the end of the free sample. Get the eBook to keep going. Buy now
About this book
Details
- Author
- Renteria Lolita
- Publisher
- SamEnrico
- Language
- English
- Genre
- Non-Fiction, AI Operator, Test Optimization, CI/CD
- Released
- 2026-05-30
- Pages (approx.)
- 149
- Available as
- eBook, Audiobook
Read better in the ZLOADR app
Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.
More by Renteria Lolita
Parent Comparison on Social MediaRenteria Lolita$11.99
The Neglected Child Worth GuideRenteria Lolita$11.99
Home Decor Pinterest PressureRenteria Lolita$11.99
Carson Rachel Carson TrailRenteria Lolita$11.99
The LGBTQ+ Teen Self WorthRenteria Lolita$11.99
Imposter Syndrome In MedicineRenteria Lolita$11.99
The Vaccine Development GuideRenteria Lolita$11.99
Fentanyl SurvivedRenteria Lolita$11.99
Workplace Resilience GuideRenteria Lolita$11.99
The Day the Internet Almost Died: The 2016 Dyn CyberattackRenteria Lolita$11.99
The Phantom of the Pyramids: The Great Sphinx Hoax of 1936Renteria Lolita$11.99
Blades of the Rising Sun: The Birth of the KatanaRenteria Lolita$11.99You may also like
Hong Kong Handover 1997Dunn Johnnie$11.99
Zumba For Postnatal Recovery CourseNeal Christian$11.99
Zumba for BeginnersLadner Nikia$11.99
YouTube Comment Mining GuideHumes Pandora$12.99
Worry Box MeditationCarlin Rudy$11.99
Workplace Stress MeditationNguyen Lynn$11.99
Workplace Stress and Sleep RepairHawley Ivory$11.99
Workplace Perfectionism CureDelaney Jeffry$11.99
Workplace Injustice Anger GuideWallen Isabelle$11.99
Work Addiction and Burnout LinkGreenwood Ester$11.99
Women in Yoga and WellnessBeattie Galina$11.99
Women in Stand Up ComedyChun Evangeline$11.99