Skip to content

Conversation

@olamy
Copy link
Member

@olamy olamy commented Sep 14, 2025

Overview / Goal

  • The PR intends to switch Surefire to use the JUnit Platform runner (i.e. the JUnit 5 infrastructure) to run JUnit 4 tests via the Vintage engine, and also support TestNG under that runner.
  • The main changes are removal support for dependency to JUnit 3, for versions of JUnit 4 older than 4.12 and testng older than 6.14.3
  • main advantage will be to have only a single implementation to maintain as listener/reporter/launcher of test running platform. Without such change there 5 implementations to maintain which makes any changes extra work which doesn't help to get new contributors to help.

Major Changes

Change Description Impact
Drop JUnit 3 provider The PR removes the “JUnit 3 provider” entirely. Junit3 code will be executed via junit vintage only need to upgrade junit dependency to 4.12 at least
Enforce minimum JUnit 4 version JUnit 4.12 becomes the minimum supported version. Versions earlier than 4.12 are no longer supported.
Route JUnit 4 tests via JUnit Platform + Vintage engine Instead of using a separate JUnit 4 runner / provider, JUnit 4 tests will be executed via the JUnit Platform infrastructure using the Vintage engine.
Integrate TestNG under JUnit Platform runner TestNG will now also be run via JUnit Platform, with mappings of TestNG configuration (groups, etc.) to the JUnit Platform infrastructure.\
Code removal / cleanup A lot of internal code for the old JUnit 3/4/47/TestNG providers is removed for simplification
Version bump / snapshot change The version is bumped to something like 3.6.0-SNAPSHOT in the PR.
Minimum TestNG version The PR also sets a minimum supported TestNG version (6.14.3)
Adaptation in existing features Some features are reworked or adapted (e.g. parallel execution, mapping of “groups” in TestNG to tags/filters, error handling in logs) so they work properly under the new runner approach.

There may be compatibility issues or subtle behavior changes when running JUnit 4 or TestNG tests under the new infrastructure (e.g. differences in how filters, groups, or lifecycle behaviors are handled).

The change consolidates execution under the JUnit Platform, which could simplify the runner architecture

@olamy olamy force-pushed the test-junit-platform-runner-junit4 branch from d33aa4f to 8cf2396 Compare September 18, 2025 11:44
@olamy olamy changed the title [WIP] junit platform runner for all [WIP] Use junit platform runner to run junit 4 tests via vintage engine (remove support of Junit 3 and older version of 4.12) Sep 25, 2025
@olamy olamy force-pushed the test-junit-platform-runner-junit4 branch from 5773c02 to b14b09e Compare October 8, 2025 04:28
olamy and others added 26 commits October 10, 2025 13:34
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
olamy and others added 30 commits October 19, 2025 11:46
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
* fix IT

* fix used dep-versions, remove junit 4 platform-based runner suite test as it is no longer supported and advised.

For details, see:
-junit-team/junit-framework@6604945
-junit-team/junit-framework#2712
- junit-team/junit-framework#4522
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Olivier Lamy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Pull requests that break existing features enhancement New feature or request removed Pull requests that remove features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants