Cucumber JVM JUnit 4 runner deprecation and JUnit 5 platform engine migration
0 reputation · 16 Sept 2025, 00:29 UTC
Cucumber JVM JUnit 4 runner deprecation and JUnit 5 platform engine migration
A Cucumber JVM test suite is being upgraded from version 6.x to 7.x. The goal is to keep existing feature files and step definitions running while moving off the deprecated JUnit 4 runner. Cucumber JVM 7.x assumes Java 11 or higher and marks `cucumber-junit` as deprecated in favor of `cucumber-junit-platform-engine`.
It is unclear whether the JUnit 5 engine requires a corresponding JUnit Platform launcher configuration, how existing `@RunWith(Cucumber.class)` classes should be replaced, and whether tag expressions behave identically under the new engine. The project must also confirm that the runtime environment meets the Java 11 minimum before changing dependencies.
Which dependencies replace `cucumber-junit` in Cucumber JVM 7.x? Does the JUnit 5 platform engine support the same runner annotations and tag expressions? What configuration changes are required to run scenarios through JUnit Platform instead of JUnit 4?