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
Support JUnit platform reporting entries #4605
Comments
This fixes #4605 In JUnit Platform, users can use TestExecutionListener.reportingEntryPublished to report some information in test. However, this API is ignored in previous Gradle implementation. This PR adds support for this API.
This fixes #4605 In JUnit Platform, users can use TestExecutionListener.reportingEntryPublished to report some information in test. However, this API is ignored in previous Gradle implementation. This PR adds support for this API.
This fixes #4605 In JUnit Platform, users can use TestExecutionListener.reportingEntryPublished to report some information in test. However, this API is ignored in previous Gradle implementation. This PR adds support for this API.
As mentioned on the #4716: We should overhaul our test logging infrastructure holistically. We have already added display names, but only to the html report and console log. Now we are considering JUnit 5's reporting entries. We should decide what things we want to support in a cross-cutting way (so that other test frameworks can be adapted to it). A display name makes a lot of sense. A This information should be exposed to
@blindpirate before we continue here we should have a small design spec that addresses the above and proposes an API. We should make sure this API also makes sense for the native tests frameworks for instance. We should not just add reporting entries as test output, because otherwise people might start depending on this implementation detail and try to parse that output. Then we'd be stuck if we wanted to change it to something more strongly modeled. Let's do some design first. |
Please keep in mind that reporting features like display names and reporting entries (via a map of key-value pairs) will end up in the new reporting format from the Open Test Alliance. So that should make them mainstream... once that new format is supported. |
@sbrannen is there already a spec for the format? |
No, unfortunately not (yet). That will be discussed here: ota4j-team/opentest4j#9 So feel free to chime in there with comments. |
Any updates on this one? With JUnit platform 1.3.0 looming, the old gradle plugin will no longer be supported and there's no way to run up-to-date junit 5 engines with reporting support. |
Any updates on this one? JUnit platform 1.3.1 is already out. |
I'm afraid not. We're busy working on Gradle 5.0 at the moment. I hope to tackle this and other JUnit Platform issues (e.g. #6453) in the 5.1 timeframe. |
What a bummer. Especially since I cannot think of any workaround. |
You could register a |
Is there anyway to get stdout added to Gradle console output in case of a test failure? That's what I'd actually need since the test report is a few clicks away. |
@jlink, I don't know if you can do that just on error, but have you tried |
@sbrannen @marcphilipp Both things together should make a simple mechanism possible. I'll see what I can figure out. |
This is actually what I resorted to as Maven is also lacking support for report entries and we really like JUnit 5 and jqwik :) |
There's a simpler way for jqwik: https://jqwik.net/docs/current/user-guide.html#jqwik-configuration If you set |
Playing with different parameter resolvers gradle/gradle#4605
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
This issue sounds valuable to me. |
We need a solution for this. |
When a failing test also publishes report entries, those should be displayed.
Expected Behavior
The junit platform
TestExecutionListener
has a methodreportingEntryPublished
which is called when tests report additional data. Those entries should be displayed/logged in gradle's output when a test fails. They should also show up in the generated html report.Current Behavior
Nothing is shown.
Context
IntelliJ, Eclipse, Maven and the junit-platform-gradle-plugin actually report the entries.
Those entries usually give important additional information to interpret test results.
For example, jqwik (http://jqwik.net) uses those entries to report the random seed
which is needed to reproduce errors.
Steps to Reproduce (for bugs)
Running the following test through gradle should not only report a failure but also something
like
timestamp = 2018-03-06T15:40:33.704, key = value
(IntelliJ's output)Your Environment
OSX, Java 8, Gradle 4.6
The text was updated successfully, but these errors were encountered: