Drizz raises $2.7M in seed funding •
Featured on Forbes
Drizz raises $2.7M in seed funding •
Featured on Forbes
Logo
Schedule a demo
Blog page
>
Test Impact Analysis: Run Only Tests that Matter

Test Impact Analysis: Run Only Tests that Matter

Test impact analysis cuts CI runtime by running only tests affected by code changes. How it works, where it breaks, and how to apply it to mobile.
Author:
Asad Abrar
Posted on:
June 30, 2026
Read time:

Key takeaways

  • Test impact analysis (TIA) selects only tests affected by a code change, cutting CI runtime without dropping coverage.
  • Most TIA implementations are built for unit and integration tests with line-level coverage data. E2E and mobile UI tests need a different approach.
  • TIA pairs with risk-based testing. TIA picks tests by code change, risk-based testing picks them by business impact. Teams ship faster when both inform pipeline.

Test impact analysis is a technique that runs only tests affected by a given code change, instead of running entire suite. It cuts CI time, reduces flakiness exposure, and shortens feedback loops without dropping coverage.

The idea is simple. If a developer changes one file in checkout module, only tests that exercise checkout need to run. Running auth tests, onboarding tests, and settings tests on that commit wastes time and CI minutes.

Microsoft, Google, and Datadog have written publicly about saving 50 to 80% of CI test time using TIA. The basic version is straightforward. The mobile version is harder.

What is test impact analysis

Definition: test impact analysis maps each test to code it covers, then runs only tests whose covered code has changed in a given commit.

The mapping is built one of two ways:

  • Static analysis. Parse code, build a dependency graph, predict which tests cover which files. Fast but limited (misses reflection, dynamic loading, control flow).
  • Dynamic analysis. Run each test once with coverage instrumentation, record which files it touched, store map. Accurate but expensive to maintain.

Most modern TIA tools combine both. The Azure DevOps documentation on TIA describes Microsoft approach: dependency maps generated automatically, with a safe fallback to running all tests when system can't reason about a change.

How test impact analysis works in CI

A typical TIA-enabled pipeline looks like this:

Developer commits change to checkout.kt
CI triggers, TIA engine receives diff
TIA cross-references diff against test-to-code map
Selects 47 of 2,400 tests as impacted
Pipeline runs those 47 + always-on smoke tests
Feedback in 3 minutes instead of 45

The pipeline still falls back to a full run on:

  • Pre-merge to main / release branches
  • Nightly builds
  • Changes to shared infrastructure (build files, CI config, dependency manifests)

This is safety net. TIA reduces what runs on every PR. Full runs still happen, just not every time.

TIA vs risk based testing

These two get confused. They solve different problems.

Test impact analysis is mechanical. A code change happened. Which tests touch that code. Run those.

Risk-based testing is judgment-driven. The checkout flow generates 80% of revenue. Always run those tests with priority, regardless of what changed.

What is risk-based testing in one line: a strategy that prioritizes test execution based on business impact and failure probability, not code coverage.

The two complement each other:

Approach Selects tests by Best for Misses
Test impact analysis Code change Fast PR feedback Tests not in coverage map
Risk-based testing Business priority Pre-release sign-off Low-priority regression that breaks anyway

Teams running both can route them in CI: TIA picks per-commit subset, risk-based testing defines always-run priority list, full suite runs nightly.

Where test impact analysis breaks for mobile

Most TIA tooling assumes managed code, unit tests, and line-level coverage data. Mobile QA suites usually have none of those.

E2E tests don't map to code at line level. A Tap "Checkout" test exercises 30 services, rendering layer, and network stack. The "covered code" for that single test could be 40% of app. TIA can't usefully narrow what to run if every test touches everything.

UI test selectors hide real dependencies. When a test fails because a button moved, no code changed. When a test passes because a selector matched wrong element, code changed and TIA missed it. The map is wrong both ways.

Native code changes are hard to trace. Mobile builds compile Swift, Kotlin, C++, and bundled web layers. Dependency maps that work for pure JVM or .NET stacks don't translate.

Resource and asset changes don't show in code diffs. A new image, a copy update, a layout XML change can break tests but won't trigger TIA selection.

For mobile teams, a smart test impact analysis approach skips tests that don't need to run by working at feature level, not code-line level. The mapping is between tests and user-facing modules (checkout, onboarding, search), not between tests and source files.

Practical TIA for mobile teams

A workable mobile TIA setup doesn't try to replicate what Datadog does for backend code. It uses three layers:

Layer 1: smoke tests run on every commit. The critical 20 to 50 tests that cover happy paths for login, checkout, and core navigation. Smoke tests are simplest form of test impact analysis, running only critical path on every CI build.

Layer 2: feature-tagged tests run on changed modules. Tag tests by feature (@checkout, @auth, @search). When CI diff touches files in /checkout/, run all tests tagged @checkout. Crude but effective.

Layer 3: full regression runs nightly or pre-release. No selection logic. Run everything on real devices, in parallel, against latest build.

This three-layer model gets 70 to 80% of time savings TIA promises, without maintenance overhead of trying to build a precise code-to-test map for E2E suites.

Adding test impact analysis to your CI pipeline cuts execution time without dropping coverage, as long as nightly full runs stay in place as safety net.

Test impact analysis tools

Most TIA tools target backend code. Here are categories:

Built into platforms

  • Azure DevOps (Visual Studio Test, managed .NET)
  • Datadog Test Optimization
  • CircleCI Test Insights

Open source

  • Bazel's test selection (build-system level)
  • Symflower TIA (Go)
  • Ekstazi (Java)

Mobile-specific

  • Maestro tagging + CI orchestration
  • Drizz's CI integration with feature-level test grouping
  • Bitrise + Detox/Appium with custom selection logic

Note: most "test impact analysis tools" lists conflate TIA with test orchestration or parallelization. They aren't same. Parallelization makes full suite finish faster. TIA makes suite smaller in first place.

Common failure modes

Missed test selection. TIA thinks a test isn't affected, test is actually broken, bug ships. This is false-negative risk. Mitigation: always run full suite on protected branches.

Stale dependency maps. Coverage data goes out of date when tests are added, removed, or refactored. Maps need rebuilding regularly, often automatically.

Unsafe assumptions. Config files, environment variables, and shared modules can break tests without showing up as a code diff. Mark them as "always run" triggers.

Flaky tests poison data. If a test is in coverage map but flakes 30% of time, TIA can't tell whether a failure is signal or noise. Fix flakiness before deploying TIA, not after.

According to research from Google's testing team on test selection, even Google's mature TIA implementation falls back to running full suite whenever system isn't confident, because cost of a missed regression outweighs cost of a longer build.

How Drizz fits into a TIA pipeline

For mobile teams running E2E tests on real devices, Drizz tests are written as plain-English commands rather than selector code. That makes feature tagging trivial.

A test like:

Tag: @checkout
Open the app
Login as "test_user_premium"
Add "Pixel 9" to cart
Tap "Checkout"
Validate "Order summary" is visible

is annotated with its feature once. When CI sees a diff in /checkout/, it runs every test tagged @checkout. When diff only touches /profile/ module, Drizz runs only @profile tag.

Because Drizz tests don't rely on selectors that drift with UI changes, test-to-feature mapping stays stable across releases. The team doesn't have to rebuild map every time dev team renames a resource ID or restyles a button. The tag stays. The test still runs. The TIA pipeline keeps working.

This makes test impact analysis tools usable for E2E mobile suites in a way that selector-heavy frameworks like Appium struggle with, because mapping survives UI refactors.

FAQ

What is test impact analysis in software testing?

Test impact analysis is a technique that selects only tests affected by a code change, reducing CI runtime while maintaining coverage.

How is test impact analysis different from risk-based testing?

TIA selects tests by code change. Risk-based testing selects tests by business priority. Most mature teams use both together.

Does test impact analysis work for E2E tests?

Not at code-line level. E2E suites need feature-tagged TIA, where tests are grouped by user-facing module instead of source file coverage.

What's main risk of using TIA?

False negatives. A missed test selection can let a regression ship. Always run full suite on release branches as a safety net.

What is risk based testing in simple terms?

A strategy that prioritizes testing based on business impact and failure probability, so critical flows get tested first regardless of code changes.

Do test impact analysis tools work for mobile apps?

Most don't, because mobile E2E tests don't produce line-level coverage. Feature-tagged TIA using CI orchestration is workable mobile pattern.

About the Author:

Asad Abrar
Co-founder & CEO, Drizz
Ex-Coinbase PM and IIT Kharagpur grad killing flaky mobile tests by day, and obsessing over F1 lap timings by night.
Schedule a demo