Java JUnit support
See original GitHub issueTracking issue for JUnit support.
Experimental support was added in v1.3.0
with java-junit
reporter.
Implementation is based on test result files taken from lhotari/pulsar.
Due to lack of my own experience/interest with Java ecosystem no java project to create test fixtures was added. There is also no documentation how to use JUnit to get XML with results - I expect there is plenty of other resources about this topic.
@lhotari
Here you can see how it looks: https://github.com/dorny/pulsar/runs/2052225393?check_suite_focus=true
My setup is based on your lh-refactor-pulsar-ci-with-retries branch.
By purpose I made one test fail to verify failure annotations are working.
I also modified CI workflow to upload merged-test-report.xml
instead of XML per test class.
It works both ways but with XML per test class approach you get more noise in the report.
I’ve also noticed there are some duplicates.
Multiple test results with same name are also present in XML so it’s probably not a bug. Still I’m not sure why is that and If I should handle it in some specific way.
Please keep me updated how it works for you.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:16 (4 by maintainers)
Just for fun, I tested with junit file export from pytest And it actually works https://github.com/omBratteng/dorny-test-reporter-pytest-junit/runs/3535713080
First; thanks for a great action helping us migrate to GitHub 😃👍
We are using NUnit with its output transformation to get JUnit-style results. But when a test fails I don’t get the failure message anywhere in your generated report, just first line/item of the stack trace.
Is there a way, when a message is present, to have the message-attribute show as the error text, and put the complete stack trace under Raw output and Show more?
NOTE: I am parsing with
java-junit
, asjest-junit
fails with an error:Test result XML:
GitHub action report:
GitHub code annotation:
Clicking “Raw output” shows the rest of the stack trace:
GitHub action annotation: