
June 15, 2026

There is no universally correct percentage for test automation coverage. The right level depends on your application's risk profile, release frequency, the cost of manual testing being replaced, and the reliability of automated tests already in place. A suite with 40% automation coverage that reliably catches regressions on every critical user path is more valuable than one at 85% coverage with a 25% flakiness rate. The goal is reliable, cost-effective defect detection, not a coverage number.
Coverage percentage is an output metric, not a quality metric. It measures how much of your codebase, user flow inventory, or test plan has automated coverage -- but says nothing about whether those automated tests are reliable, maintained, or detecting real defects. Teams that optimize for coverage percentage frequently accumulate low-value tests: tests of trivial getter methods, tests that only verify code runs without throwing exceptions, or tests that duplicate manual test cases without adding meaningful regression detection.
The most common mistake with coverage targets is treating them as goals rather than indicators. A mandate to reach 80% code coverage by Q3 produces exactly the kind of shallow test that meets the metric without providing value. Coverage targets are useful as rough health indicators and baseline comparisons over time, not as engineering objectives.
A more useful question is whether automated tests are detecting the defects that matter, faster and cheaper than alternative approaches. The answer varies by product, team, and stage of development. For background on building a rational test investment strategy, see Astaqc's test automation services and the software testing cost guide.
Coverage can mean several different things, and the right measure depends on what you are trying to protect.
Code coverage measures what percentage of your codebase is executed when tests run. Line coverage, branch coverage, and path coverage are the common variants. Code coverage is best suited for unit test suites. It is a poor primary metric for end-to-end or integration test suites, where the same code paths may be executed many times through different UI flows without adding meaningful coverage diversity.
Test case coverage measures what percentage of a defined test plan or requirements list has automated coverage. This is the relevant metric for teams maintaining a formal test plan and trying to automate portions of it. It answers what fraction of known test scenarios run automatically rather than what fraction of code runs.
Risk-based coverage prioritizes coverage of high-risk areas over even distribution. An e-commerce application's payment flow, authentication, and order placement warrant higher coverage density than its about page or language preference selector. Risk-based coverage asks whether the features where failures have the highest business impact are fully covered before asking about overall percentage.
User journey coverage measures what percentage of defined critical user paths has end-to-end automation. A SaaS product might define 20 critical user journeys -- sign up, configure integration, run first report, export data, invite team member, and so on. Ensuring all 20 have automated coverage is a more meaningful target than achieving a specific code coverage percentage.
The measurement approach should match what you are optimizing.
For code coverage: most language ecosystems have coverage tooling built into test runners. Jest provides coverage reports for JavaScript. pytest-cov handles Python. JaCoCo covers Java. A practical minimum for unit-tested business logic is branch coverage of 70-80%, with the understanding that some paths -- rare error branches, retry logic -- are deliberately left uncovered because the test cost exceeds the failure risk.
For test plan coverage: maintain a matrix linking each test case to its automation status. Spreadsheets and test management tools (TestRail, Xray, Zephyr) support this. Automated coverage percentage is a count of rows marked automated divided by total test cases. Track this percentage over time and measure it by module or feature area to identify coverage gaps.
For user journey coverage: define the critical user journeys explicitly -- write them down as a list -- then map each to one or more automated tests. A journey without automated coverage is a gap, regardless of overall percentage. This approach is particularly useful for end-to-end test suites where coverage debates often devolve into discussions about what code paths are exercised rather than what user scenarios are validated.
Defect escape rate as a coverage quality signal: track how often defects that should have been caught by automation reach production. A low defect escape rate with 50% automation coverage may indicate that coverage is well-targeted for the risk profile. A high escape rate with 90% coverage indicates that existing automation is not targeting the right scenarios. The outsource QA guide covers how to assess your team's current coverage quality against these signals.
Automation coverage targets differ meaningfully across test layers.
Unit tests should have high coverage -- typically 70-90% branch coverage -- for business logic, domain models, and pure functions. Unit tests are fast, isolated, and cheap to maintain. The benefit-to-cost ratio is high, and high coverage at this layer is achievable without excessive effort. Code that is structurally difficult to unit test often signals tight coupling that would benefit from refactoring regardless of coverage targets.
Integration tests do not have a meaningful coverage percentage in the code coverage sense, because the relevant question is not what code runs but what component integrations are validated. Target integration test coverage by scenario: each major data flow through the system, each integration with an external service, and each API contract boundary should have explicit integration tests. The number varies widely by application architecture.
End-to-end tests should target critical user journeys, not code coverage. The automation cost of end-to-end tests is high: they are slow to run, expensive to maintain, and prone to flakiness when not carefully managed. Selecting what to automate at the E2E layer requires explicit prioritization by business risk. An application with 50 distinct user journeys may reasonably automate only the 10 that represent 80% of user activity and the highest revenue risk. See Astaqc's software testing services and the complete software testing guide for a comprehensive view of test layer strategy.
The practical automation decision rule: automate tests that run frequently enough for the automation cost to be recovered through manual testing time saved, and that are stable enough for automated results to be trusted.
A test that runs every sprint for two years will have its automation cost recovered within months. A test that runs once per quarter may take years to recover the initial investment, and by then the feature may have changed enough to require rewriting the test.
Feature stability matters for a separate reason: automating a feature under active development produces tests that break constantly, consuming more maintenance time than they save. A stable feature with well-defined acceptance criteria is the ideal automation target. Features in early development are better covered by manual exploratory testing until they stabilize. See Astaqc's manual testing services for how to structure manual coverage alongside automation investment.
| Area / Risk Level | Recommended Unit Coverage | E2E Automation Target | Rationale |
|---|---|---|---|
| Critical paths (auth, payments, core transactions) | 85-95% branch coverage | 100% of defined user journeys automated | Failure here has direct business and user impact |
| High-use secondary features (reporting, exports, notifications) | 70-85% branch coverage | Key user journeys automated; edge cases manually tested | High frequency of use; defects affect many users |
| Standard functionality (settings, profile, preferences) | 60-80% branch coverage | Happy-path automation; manual testing for edge cases | Failures visible but recoverable; low revenue risk |
| Low-use or admin features | 50-70% branch coverage | Manual testing only, or minimal automation | Low frequency; automation cost-to-benefit is poor |
| Generated or configuration code | Low or none | Not applicable | Not a source of business logic defects |
High defect escape rate despite high coverage. If defects reach production regularly on features with significant automation coverage, the automation is testing the wrong things. Review the escaped defects and check whether automated tests should have caught them. The gap reveals what was missed.
High flakiness rate. A suite with a 20% flakiness rate has effectively 80% reliable coverage even if nominal coverage is 90%. Engineers who distrust test results stop treating failures as signals, eliminating the value of the coverage. Unreliable automation is often worse than no automation because it provides false confidence.
Coverage is concentrated in easy-to-test areas. If coverage reports show high percentages for utility functions and low percentages for business logic or complex conditional paths, the coverage metric is being met by easy wins. High-risk logic should have proportionally higher coverage, not the inverse.
Tests break frequently due to refactoring. Tests that fail whenever unrelated code changes -- because they test implementation details rather than behavior -- have a negative ROI. They slow development without providing meaningful regression protection.
Rather than setting an overall percentage target and working toward it uniformly, a more effective approach is incremental, risk-prioritized coverage growth.
Start by mapping your critical user journeys and identifying which have no automated coverage. These are the highest-priority automation gaps regardless of any coverage percentage. Build reliable end-to-end tests for the highest-risk journeys first.
For unit testing, adopt a cover-it-when-you-change-it policy: any function modified in a pull request gains or improves test coverage as part of that change. Over time, this approach increases coverage in actively maintained code -- exactly where new defects are most likely to appear -- without requiring a separate coverage project.
Track coverage trend over quarters, not as a weekly target. A steady upward trend in coverage, accompanied by a downward trend in defect escape rate and manual regression testing time, is evidence the investment is working. See the AI in software testing guide for how AI-assisted test generation accelerates coverage growth, and Astaqc's QA team service for expert support on coverage strategy.
80% is a common reference point, not a universal recommendation. It makes sense as a target for unit test coverage of business logic in languages with mature tooling. It is not a useful target for integration or end-to-end test suites, where the coverage metric does not capture what matters. Apply coverage targets specifically to the test layer and code type they are appropriate for, not as a blanket requirement across the entire suite.
No. Many manual test cases are more cost-effective to keep manual. Exploratory tests, usability tests, visual assessment, and one-time tests for features under active development are better suited to manual execution. The automation decision rule: automate tests that run frequently enough to recover the investment in saved manual time, on features stable enough for automated results to be trusted.
Track three numbers over time: manual testing hours before automation (the baseline), manual testing hours after automation (the savings), and automation maintenance hours (the ongoing cost). ROI is positive when the savings exceed the initial build cost plus ongoing maintenance. The software testing cost guide provides a detailed framework for this calculation, including how to account for defect-escape cost reduction.
Code coverage measures what percentage of source code is executed during test runs. Test coverage measures what percentage of defined test scenarios has automated coverage. Code coverage is measured by tools that instrument source code; test case coverage is measured by mapping test cases in a test management system to their automation status. Both are useful but answer different questions. Code coverage alone says nothing about whether the right scenarios are tested.
When the marginal cost of adding more automation exceeds the expected defect-detection value and manual testing time saved. For most applications, this point is reached at different thresholds in different areas: critical paths warrant very high coverage regardless of marginal cost, while low-risk, rarely-used features may not justify any automation at the end-to-end layer. Evaluate coverage decisions by feature area and risk level rather than overall percentage. See Astaqc's performance testing services and manual testing services for guidance on structuring complementary testing approaches.

Sign up to receive and connect to our newsletter