-
Notifications
You must be signed in to change notification settings - Fork 117
[feat] Add command-line option to generate a JUnit XML report #1925
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
Conversation
|
Hello @jgphpc, Thank you for updating! Cheers! There are no PEP8 issues in this Pull Request!Do see the ReFrame Coding Style Guide Comment last updated at 2021-05-04 20:48:08 UTC |
teojgo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say to either have a separate option for the xml report or choose the format based on the extension of the filename passed by the user. Also, it could be nice if we could somehow pretty print the xml with proper indentation.
|
Codecov Report
@@ Coverage Diff @@
## master #1925 +/- ##
=======================================
Coverage 87.97% 87.97%
=======================================
Files 50 50
Lines 8496 8516 +20
=======================================
+ Hits 7474 7492 +18
- Misses 1022 1024 +2
Continue to review full report at Codecov.
|
Ok, |
victorusu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jgphpc, I am sure if this is possible, I am not familiar with JUnit, but I wonder if it makes sense and whether if this is also possible to add additional information to the JUnit... It would be nice to know the hostname. The schema that you shared in the code (https://github.com/windyroad/JUnit-Schema/blob/162a883ac631f61ca1d14a3d472e1fbb53c1c05f/JUnit.xsd#L171) shows a hostname entry.
But I wonder if we can also add additional fields...
What do you think?
@jgphpc Is this report generated from this PR? |
|
Also, we will need a unit test. Ideally, the unit test would be validating the generated XML against the schema. I think for validation we might need the lxml library, which also support the |
I updated it: https://git.cscs.ch/c4k/c4kcust/example-junit/-/pipelines/23916/test_report |
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR by fine tuning the implementation. It's a bit simpler now. Nonetheless, the generated XML does not validate against the schema. See the message of the failing unit tests. If we fix that and finalise the actual information of the output, it'll be ready to be merged.
Closes #651
Example in https://git.cscs.ch/c4k/c4kcust/example-junit/-/pipelines/23226/test_report