-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[junit] Add a file attribute to xunit2 #7537
Comments
Disclaimer: I don't actually use junitxml. This sounds good to me, it does look like some indication of where the test comes from is missing. The Do you happen to have an example of file from another project/language (e.g. Java) which uses it? I'd be interested to see the granularity in which they define their One thing to note is that pytest has the |
@bluetech unfortunately I don't have better examples from other languages. I've only tried it with pytest and those CIs that I listed earlier. btw xunit2 reports seem to be less usable there but I haven't checked closer. Thanks for pointing to |
FTR here's an example of how AppVeyor reporting of xunit1 vs xunit2 differ:
They use the |
So the new Codecov interface for displaying the test result statistics (#12689) has integration instructions that recommend using |
Currently linked schema https://github.com/jenkinsci/xunit-plugin/blob/xunit-2.3.2/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd#L127 allows a file attribute in
<testsuite>
nodes. It's currently missing but would be very useful.AFAICS junitxml plugin dumps everything under a single testsuite node. It was probably fine with xunit1 that allowed per-testcase file attribute to be set. Now that xunit2 is going to be a default, it needs a similar feature too.
But since this attribute is per-suite in xunit2, the plugin will have to separate
<testcase>
s into multiple<testsuite>
s.Why is this important to me personally? I usually set up test reporting in CIs that support it (AppVeyor and Circle CI, for example). And it's nice to see where the test is coming from.
I wanted to turn the test report into GitHub Actions annotations from XML using a simple action that requires almost zero effort to set up (shyim/junit-report-annotations-action#3). But I hit a roadblock when I realized that for putting annotations on lines in files, it has to know what those files are.
The text was updated successfully, but these errors were encountered: