apache / apache/maven-surefire
[SUREFIRE-1657] `skipAfterFailureCount` not working with JUnit 5
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Ion Iovu](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=iovuio)** opened **[SUREFIRE-1657](https://issues.apache.org/jira/browse/SUREFIRE-1657?redirect=false)** and commented
Attached MVP demonstrating issue. 2 commits. One showing working example with JUnit 4.12, and another showing reproducing issue with JUnit 5.4. There are 3 failing tests and **skipAfterFailureCount=1** configured.
**Steps to reproduce**
1. Run _$ mvn clean test_ on attached project
**Expected**
After _fail1()_ test method fails, the other two test methods not executed.
**Actual**
All 3 methods executed:
```java
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] MyTest.fail1:12
[ERROR] MyTest.fail2:17
[ERROR] MyTest.fail3:22
```
---
**Affects:** 2.22.1
**Attachments:**
- [stop-on-fail.zip](https://issues.apache.org/jira/secure/attachment/12964660/stop-on-fail.zip) (_39.11 kB_)
Contributor guide
Research direction
Start by unpacking the attached stop-on-fail.zip and running mvn clean test to reproduce the three JUnit 5.4 failures with skipAfterFailureCount=1. Compare the working JUnit 4.12 example with the JUnit 5.4 example; done means fail1() stops fail2() and fail3() from executing.
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
- Clearly specified
- Newbie friendliness
- 35/100