apache / apache/maven-surefire

[SUREFIRE-1849] Cucumber/JUnit5 Test Execution Regression in M4 and M5

Open
#3,019 2 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
461
Forks
588
Avg merge
1d 8h
Merged PRs (30d)
19

Description

**[Jacques Burns](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jmathewburns)** opened **[SUREFIRE-1849](https://issues.apache.org/jira/browse/SUREFIRE-1849?redirect=false)** and commented

My JUnit 5 Cucumber tests fail to execute properly when in Surefire version 3.0.0-M4 and 3.0.0-M5. Downgrading to 3.0.0-M3 solves the issue.

I've built a small, complete example project demostrating the issue [https://github.com/jmathewburns/surefire-cucumber-junit5-sscce](https://github.com/jmathewburns/surefire-cucumber-junit5-sscce). You can play with the version property in the `pom.xml` in my example and run the `test` goal

 
In M4 and M5, the Cucumber glue is recognised and the step definitions are run, but failed assertions do not affect the outcome of the build. Also, true assertions do not count towards the "Tests run" statistic

---

**Remote Links:**
- [GitHub Pull Request #385
](https://github.com/apache/maven-surefire/pull/385)

2 votes, 5 watchers

Contributor guide

Open the contributing guide

Research direction

Start with the complete example project and its pom.xml; switch the Surefire version and run the test goal to reproduce the M3/M4/M5 difference. Trace how Cucumber glue, failed assertions, and the Tests run statistic are handled, then verify that failed assertions fail the build and passing tests count correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.