-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surefire Plugin should evaluate @DisplayName #990
Comments
The rationale behind not using display names is that it would "break" the XML report generated by Surefire. Thus, we need a new reporting format and Surefire needs to adopt it before we can report display names (cf. #373). |
+1 to what @marcphilipp said: it's unfortunately not possible to support all JUnit Platform reporting features in reporting systems that only support JUnit 4. So, the entire world has to wait until there is a new reporting standard which supports custom display names, test sources, etc. |
So how come Gradle reports are fine? |
Because our Gradle plugin uses |
Same for Dynamic Tests Reporting in CI environment
Could it be a solution to enode display names in a way they are compatible to surefire, i.e. |
Is there any workaround? |
How about this? For now Dynamic Tests are hardly to use in CI... |
Since JUnit 5's Surefire provider is currently being taken over by the Maven team, the JUnit Team is not actively working on Surefire related issues. |
I filed an enhancement at https://issues.apache.org/jira/browse/SUREFIRE-1567 |
per #1320
|
@k1w1m8, please see my response in #1320 (comment). |
Thanks @sbrannen. |
Closing this issue. fup2 https://issues.apache.org/jira/projects/SUREFIRE/issues/SUREFIRE-1546 |
https://issues.apache.org/jira/projects/SUREFIRE/issues/SUREFIRE-1546 was just closed -- the feature will available in Surefire |
Hi, apologies if this is not the correct place to ask, but is there some way to follow the status of |
You can ask on the Maven User List. |
@WalidBounouar the version 3.0.0-M4 was released yesterday. You can always ask me, see my email in GitHub, or you can subscribe to the Maven user-mailing list and ask the user questions in public. If you are in the Apache, you can find us in the Slack. |
Hi Tibor, But in the Console logs still lists with indexes, and the test case Displayname is not printed. I have the below Plugin config: Error trace: Please help me out on this scenario |
@arun-mano |
Hi Tibor, Without that config, no logs printed either in console or XML. but after adding your config I got enough details in XML under sure-fire reports folder but in maven build logs alone no displayname based info printed and listed with Index during build errors. Note: I am using Dynamic Test for Junit |
Dynamic tests are not fully supported. T
Dňa po 14. 9. 2020, 14:26 arun-mano <notifications@github.com> napísal(a):
… @arun-mano <https://github.com/arun-mano>
The textual description has to be enabled in your case. Please read the
doc
http://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html#Surefire_Extensions_and_Reports_Configuration_for_.40DisplayName
Hi Tibor,
I have used the same configuration that you have quoted in-
https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html
,
Without that config, no logs printed either in console or XML. but after
adding your config I got enough details in XML under sure-fire reports
folder but in maven build logs alone no displayname based info printed and
listed with Index during build errors.
Note: I am using Dynamic Test for Junit
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#990 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH7ER6JHCSS4S7STEFNTXDSFYDXVANCNFSM4DUUSLIA>
.
|
So Dynamic Tests are not supported with display names in sure-fire plugin? |
Apache Maven surefire plugin does not seem to fully support parameterized JUnit 4 tests. See junit-team/junit5#990 for discussion of the issue. The surefire plugin acts as though the Security2779Test is being run multiple times with the same argument and treats a failure of one argument as a "flaky test". In this case, the test is not flaky as far as I can tell, it is showing a real failure when the argument is "#icon-panel svg". The test passes consistently when the argument is "#link-panel a". The consistent failures that I've seen were on Red Hat Enterprise Linux 8.6 with Eclipse Temurin Java 11.0.16.1. The same failure was seen in the Jenkins 2.369 weekly build. This commit does not fix the failure, it just makes it easier to see that there is a failure.
I have the same issue. Moving this back to maven, they don't particularly care about console logging format, and there is no way to communicate this to them (comments only for registered users, public registrations are closed, I'm not really sure how the bug reporting should work in such environment). |
@oxygenecore, as far as I can tell, Surefire actually has support for console logging which supports JUnit 5 display names. Have you looked into that? |
@oxygenecore, you can use the mailing list, and if you still want a JIRA account, you can request one. |
Overview
Feature request.
Currently the surefire plugin does not evaluate
@DisplayName
in the test reports. It would be great if Surefire would use@DisplayName
where present.Maven surfire output from the
junit5-maven-consumer
project:In contrast the output from the IntelliJ plugin using the
@DisplayName
results in more readable test names.Desired out put would be
For parameterized Tests it would be great to have an output like in IntelliJ in the surefire plugin to. (DisplayName, Iteration and value of the argument causing a failed test)
Deliverables
The text was updated successfully, but these errors were encountered: