I have JUnit 4 tests that run with JUnit Jupiter (JUnit 5) using the vintage engine and maven-surefire-plugin version 2.19.1.
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ jon-snow ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-surefire-plugin:2.19.1:test (unit-tests) @ jon-snow ---
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.whatever.WhateverTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0 ...
When I upgrade the maven-surefire-plugin version to 2.22.1, no tests are detected.
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ jon-snow ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (unit-tests) @ jon-snow ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
Why is this? I have 248 tests that should run. What dependencies or config changes do I need to add to make tests work again?
junit-vintage-engine
artifact. Maybe related: #36970884 – Wellesz