Add junit-6-migration module: JUnit 5.14.4 vs 6.1.3, API diff and behaviour probes
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YPgGH6aMbSLANL3E2HHmS6
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# junit-6-migration
|
||||
|
||||
Companion module for the ankurm.com article on **migrating from JUnit 5 to JUnit 6**. The same tests run on JUnit 5.14.4 and 6.1.3, and the two
|
||||
releases are compared jar against jar. Nothing here is copied from release notes: each file in `output/` was produced by running something.
|
||||
|
||||
## Versions
|
||||
|
||||
| Component | Version | Notes |
|
||||
|---|---|---|
|
||||
| JUnit (before) | `5.14.4` Jupiter / `1.14.4` Platform | last 5.x release on Maven Central at the time of writing |
|
||||
| JUnit (after) | `6.1.3` | Jupiter, Platform and Vintage all share this one number |
|
||||
| JUnit 4 | `4.13.2` | only for the Vintage check |
|
||||
| Java | build on `25`, `--release 17` | JUnit 6 jars need Java 17 |
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
./scripts/run-all.sh
|
||||
```
|
||||
|
||||
## Output
|
||||
|
||||
| File | What it shows |
|
||||
|---|---|
|
||||
| `01-versions-and-baseline.txt` | version numbers and the Java level of each jar's class files |
|
||||
| `02-removed-api.txt` | public classes and members in 5.14.4 that are not in 6.1.3, and whether 5.14.4 had deprecated them |
|
||||
| `03-csv-behaviour-<version>.txt` | one set of `@CsvSource` and `@CsvFileSource` cases run on each version |
|
||||
| `04-vintage-junit4-<version>.txt` | a JUnit 4 test run through the Vintage engine on each version |
|
||||
| `05-old-apis-<version>.txt` | what the compiler says about three deprecated 5.x APIs on each version |
|
||||
| `06-fixed-apis-<version>.txt` | the replacements compile on both versions |
|
||||
|
||||
`pom.xml` has two profiles, `junit5` and `junit6`, that change nothing but `junit.version`.
|
||||
Reference in New Issue
Block a user