Skip to content

Commit 07afae9

Browse files
authored
Deprecate cucumber-junit in favour of cucumber-junit-platform-engine (#3016)
With JUnit 4 in maintenance mode and JUnit vintage being deprecated support for JUnit 4 is winding down. As such users should be encouraged to migrate away from JUnit 4 and `cucumber-junit` onto JUnit 5 with the `cucumber-junit-platform-engine`.
1 parent c60fa6f commit 07afae9

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
### Fixed
2323
- [JUnit Platform Engine] Log discovery issues for feature files with parse errors. ([#2835](https://github.com/cucumber/cucumber-jvm/pull/2835) M.P. Korstanje)
2424

25+
### Deprecated
26+
- [JUnit] Deprecate `cucumber-junit` in favour of `cucumber-junit-platform-engine` ([#2835](https://github.com/cucumber/cucumber-jvm/pull/3016) M.P. Korstanje)
2527

2628
## [7.23.0] - 2025-05-29
2729
### Added

cucumber-junit/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
Cucumber JUnit
2-
==============
1+
Cucumber JUnit (Deprecated)
2+
===========================
33

4-
_For JUnit 5 use the [Cucumber JUnit Platform Engine](../cucumber-junit-platform-engine)_
4+
> [!IMPORTANT]
5+
> **JUnit 4 is in maintenance mode.**
6+
> For JUnit 5 use the [Cucumber JUnit Platform Engine](../cucumber-junit-platform-engine)
57
68
Use JUnit 4 to execute Cucumber scenarios. To use add the `cucumber-junit`
79
dependency to your pom.xml:

cucumber-junit/src/main/java/io/cucumber/junit/Cucumber.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@
8484
* commandline, IntelliJ IDEA or Cucumber-Eclipse. Instead it is recommended to
8585
* use Cucumbers `Before` and `After` hooks.
8686
*
87-
* @see CucumberOptions
87+
* @see CucumberOptions
88+
* @deprecated JUnit 4 is in maintenance mode. Upgrade to JUnit 5 and switch to
89+
* the {@code cucumber-junit-platform-engine}.
8890
*/
91+
@Deprecated
8992
@API(status = API.Status.STABLE)
9093
public final class Cucumber extends ParentRunner<ParentRunner<?>> {
9194

cucumber-junit/src/main/java/io/cucumber/junit/CucumberOptions.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010

1111
/**
1212
* Configure Cucumbers options.
13+
*
14+
* @deprecated JUnit 4 is in maintenance mode. Upgrade to JUnit 5 and switch to
15+
* the {@code cucumber-junit-platform-engine}.
1316
*/
17+
@Deprecated
1418
@Retention(RetentionPolicy.RUNTIME)
1519
@Target({ ElementType.TYPE })
1620
@API(status = API.Status.STABLE)

0 commit comments

Comments
 (0)