Affected Tests Docs

Affected Tests documentation

Affected Tests is a Gradle plugin for Java and Spring Boot projects. It reads your git diff, works out which classes changed, and runs only the unit and integration tests that can be affected by them. When it cannot be sure, it runs the full suite instead of guessing.

The quickest way to see what it does is the playground, which runs the real selection engine in your browser on a generated 11-module Spring project.

The decision in one picture

Decision tree. An empty diff, a docs-only change or a change in out-of-scope modules skips the tests. A file the plugin cannot map to a class, or a changed Spring configuration class, runs the whole suite. Otherwise the plugin finds the tests the change can affect and runs only those. If a file could not be read or no tests were found, local mode runs the tests found or skips, and CI mode runs everything.
What the plugin does with your change, using the default settings

The decision model page explains each outcome and how to change it.

Start here

PageWhat you get
Getting startedInstall the plugin, run it, and read the first --explain output.
CI integrationGitHub Actions, GitLab CI and Jenkins setup, and what changes in CI mode.
How it worksThe five discovery strategies, multi-module routing, the cache and known limitations.
Decision modelSituations, actions and modes: why a run selected tests, ran everything or ran nothing.
ConfigurationEvery affectedTests { } setting with its default.
Spring and @Bean changesWhy a changed @Configuration class widens the selection, and how to narrow it.
The --explain outputThe decision trace in text and JSON, with the schema.
Migrating from v1Replacing the removed runAllIfNoMatches, runAllOnNonJavaChange and excludePaths settings.

Install from