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
The decision model page explains each outcome and how to change it.
Start here
| Page | What you get |
|---|---|
| Getting started | Install the plugin, run it, and read the first --explain output. |
| CI integration | GitHub Actions, GitLab CI and Jenkins setup, and what changes in CI mode. |
| How it works | The five discovery strategies, multi-module routing, the cache and known limitations. |
| Decision model | Situations, actions and modes: why a run selected tests, ran everything or ran nothing. |
| Configuration | Every affectedTests { } setting with its default. |
Spring and @Bean changes | Why a changed @Configuration class widens the selection, and how to narrow it. |
The --explain output | The decision trace in text and JSON, with the schema. |
| Migrating from v1 | Replacing the removed runAllIfNoMatches, runAllOnNonJavaChange and excludePaths settings. |
Install from
- Gradle Plugin Portal: plugin id
io.github.vedanthvdev.affectedtests - Maven Central:
io.github.vedanthvdev:affected-tests-gradle - Source on GitHub, including the changelog and the troubleshooting guide