apache / apache/maven-surefire
[SUREFIRE-1966] DisplayName of DynamicTests in JUnit5 not shown
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Andreas Winter](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER281824)** opened **[SUREFIRE-1966](https://issues.apache.org/jira/browse/SUREFIRE-1966?redirect=false)** and commented
**Expected:**
The surefire Plugin should display the `@DisplayName` values of JUnit5 DynamicTests.
**Actual:**
The surefire plugin just shows the index of the runned test and in case of a failed test also the class name
```java
[ERROR] Failures:
[ERROR] SomeTest.allYearsShouldBeValid
[ERROR] Run 1: SomeTest.lambda$null$0:25->checkString:29 expected: <2020> but was: <2019>
[INFO] Run 2: PASS
[ERROR] Run 3: SomeTest.lambda$null$0:25->checkString:29 expected: <2020> but was: <2021>
```
An issue for this problem was already closed in the past ([https://github.com/junit-team/junit5/issues/990)](https://github.com/junit-team/junit5/issues/990) but the actual problem has not been resolved yet.
**Test environment**
JUnit5: 5.8.2 (also tested with 5.7.0)
Surefire-Plugin: 3.0.0-M5 (also tested with 3.0.0-M4)
An example project can be found here:
https://github.com/wandi34/dynamic-surefire-tests-issue
---
**Affects:** 3.0.0-M4, 3.0.0-M5
1 votes, 3 watchers
Contributor guide
Research direction
Start with the linked example project and reproduce the JUnit 5 DynamicTests output using the affected Surefire versions. Compare the expected and actual reports, then verify that each dynamic test's @DisplayName appears in the output, including failed and passing runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100