Commit 8fe5f44
Make JUnit 5 the default test framework
Summary:
JUnit 4 has been in maintenance mode and the Java Foundation team has been
migrating tests to JUnit 5 since January 2026. This diff completes the
infrastructure side of the migration by making JUnit 5 the default for
java_test targets.
Changes:
- java_test() macro now defaults to test_type = "junit5" (kotlin_test is unchanged)
- Auto-inject JUnit 5 dependencies (jupiter-api, jupiter-engine, platform-launcher) for junit5 targets, mirroring how JUnit 4 deps were previously auto-injected
- All 194 existing java_test targets that relied on the implicit JUnit 4 default now have explicit test_type = "junit" to preserve their behavior
Going forward:
- New java_test targets use JUnit 5 by default
- To use JUnit 4, set test_type = "junit" explicitly
- The existing JUnit 5 migration codemod (CodemodConfigDevmateJavaJunitMigrator) will continue converting test_type = "junit" targets to "junit5" with source-level import changes
Reviewed By: j-bahr
Differential Revision: D95378663
fbshipit-source-id: ef5287815f6f7520a4210b8a49ec9b234cdab1271 parent c2805e8 commit 8fe5f44
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
0 commit comments