You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-21Lines changed: 20 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ A Maven plugin that tracks which production classes each test touches at the byt
10
10
11
11
Large Maven projects waste minutes (or hours) re-running thousands of tests when only a handful of source files changed. This plugin fixes that:
12
12
13
-
-**Bytecode-level precision** -- instruments every method entry via a Java agent, so it catches dependencies that static analysis misses (reflection, polymorphism, lambdas).
14
-
-**Git-aware** -- diffs your working tree against the last commit, last tag, or last full run to find changed files.
15
-
-**Zero test changes** -- works with JUnit 4, JUnit 5, and TestNG out of the box. No annotations, no base classes, no test rewrites.
16
-
-**Safe by default** -- when in doubt, runs everything. Missing coverage data? Full run. Git error? Full run. The plugin never silently skips tests.
17
-
-**Multi-module ready** -- supports reactors with shared coverage maps and concurrent-safe writes under `mvn -T`.
13
+
-**Bytecode-level precision**: instruments every method entry via a Java agent, so it catches dependencies that static analysis misses (reflection, polymorphism, lambdas).
14
+
-**Git-aware**: diffs your working tree against the last commit, last tag, or last full run to find changed files.
15
+
-**Zero test changes**: works with JUnit 4, JUnit 5, and TestNG out of the box. No annotations, no base classes, no test rewrites.
16
+
-**Safe by default**: when in doubt, runs everything. Missing coverage data? Full run. Git error? Full run. The plugin never silently skips tests.
17
+
-**Multi-module ready**: supports reactors with shared coverage maps and concurrent-safe writes under `mvn -T`.
1.**Collect** -- attaches a Java agent to Surefire's forked JVM. The agent instruments every method entry in your production and test classes using ASM bytecode rewriting.
65
-
2.**Select** -- uses JGit to detect changed `.java` files, resolves them to compiled classes (including inner classes), looks up the coverage map to find which tests touch those classes, and sets Surefire's `test` filter.
66
-
3.**Report** -- merges the per-module coverage dump into the shared coverage map (JSON) and writes a human-readable summary.
64
+
1.**Collect**: attaches a Java agent to Surefire's forked JVM. The agent instruments every method entry in your production and test classes using ASM bytecode rewriting.
65
+
2.**Select**: uses JGit to detect changed `.java` files, resolves them to compiled classes (including inner classes), looks up the coverage map to find which tests touch those classes, and sets Surefire's `test` filter.
66
+
3.**Report**: merges the per-module coverage dump into the shared coverage map (JSON) and writes a human-readable summary.
67
67
68
68
## Configuration
69
69
@@ -111,9 +111,9 @@ Choose the right baseline for your workflow:
111
111
The plugin works out of the box with multi-module Maven projects, including parallel builds (`mvn -T`):
112
112
113
113
-**Shared coverage map** at the reactor root (`target/.test-impact/coverage.json`)
114
-
-**Per-module dumps** -- each module's Surefire JVM writes its own binary dump
115
-
-**Concurrency-safe merges** --`report` uses a JVM monitor + OS-level `FileLock` for safe concurrent writes
116
-
-**Dependency-aware filtering** --`select` uses `MavenSession.getProjectDependencyGraph()` to only consider changes in upstream modules
114
+
-**Per-module dumps**: each module's Surefire JVM writes its own binary dump
115
+
-**Concurrency-safe merges**:`report` uses a JVM monitor + OS-level `FileLock` for safe concurrent writes
116
+
-**Dependency-aware filtering**:`select` uses `MavenSession.getProjectDependencyGraph()` to only consider changes in upstream modules
117
117
118
118
## Safety guarantees
119
119
@@ -126,7 +126,7 @@ The plugin is designed to **never silently skip tests**. It falls back to a full
126
126
- The change set is empty (ambiguous state)
127
127
- No tests intersect with the changed classes
128
128
129
-
This means you can adopt the plugin incrementally with confidence -- the worst case is running all tests, same as without the plugin.
129
+
This means you can adopt the plugin incrementally with confidence. The worst case is running all tests, same as without the plugin.
130
130
131
131
## Supported test frameworks
132
132
@@ -138,7 +138,7 @@ The agent detects test methods by annotation:
138
138
|**JUnit 4**|`@Test`|
139
139
|**TestNG**|`@Test`|
140
140
141
-
No configuration needed -- all three are detected automatically.
141
+
No configuration needed: all three are detected automatically.
142
142
143
143
## Goals reference
144
144
@@ -170,16 +170,16 @@ mvn clean verify
170
170
```
171
171
172
172
This produces two artifacts:
173
-
-`maven-test-impact-plugin-1.0.0-SNAPSHOT.jar` -- the Maven plugin
174
-
-`maven-test-impact-plugin-1.0.0-SNAPSHOT-agent.jar` -- the shaded agent JAR (ASM relocated) used as `-javaagent` in the forked Surefire JVM
173
+
-`maven-test-impact-plugin-1.0.0-SNAPSHOT.jar`: the Maven plugin
174
+
-`maven-test-impact-plugin-1.0.0-SNAPSHOT-agent.jar`: the shaded agent JAR (ASM relocated) used as `-javaagent` in the forked Surefire JVM
175
175
176
176
## Contributing
177
177
178
178
Contributions are welcome! Here's how to get started:
179
179
180
180
1.**Fork** the repository and create a feature branch from `main`
181
181
2.**Build & test** locally with `mvn clean verify`
182
-
3.**Keep changes focused** -- one feature or fix per pull request
182
+
3.**Keep changes focused**: one feature or fix per pull request
183
183
4.**Add tests** for new functionality
184
184
5.**Open a pull request** against `main` with a clear description of what and why
0 commit comments