-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Improve the support of JUnit XML report #3135
Improve the support of JUnit XML report #3135
Conversation
If including explicitly set environment variables in the report is required/wanted, we could use |
Hi @lefou |
Do you mean mapping the |
Yeah, IIUC, you tried to put as much as possible information into the JUnit report. And since it can contain env variable and the sbt report also adds these env variable, I assumed, you might want to have these variable in the report. So I was suggesting a way to access them. But it's not an request from my side. |
Hi @lefou |
@romain-gilles-ultra I just realized, that the JUnit XML contains "properties" but I thought of "env vars", which is a completely different thing. So I guess we should revert to your previous solution. Sorry about that. |
I think I can keep the system props as the |
Hi @lefou
I think we can keep this version as it joins the environment variables with the system properties no? |
We could/should keep the Java system properties, although I'm not 100 percent certain, that they will be accurate. Since we spawn a new Java process to run the tests, there is a change some system properties are different. It would be cool, if we could either return the actual used properties from the test run or write the report file from the test runner process. Both requires more work, so we can keep it for another PR. Regarding the environment variables, I we want include them in the report, we should prefix them (e.g. with |
Hi @lefou
But keep the way the properties are fed for another iteration |
Sound good to me. |
fd94b8e
to
458e92c
Compare
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.
Looks good to me. Thank you!
JUnit XML
Rework the JUnit XML reporting feature. After a couple of tests, the XML report output is not compliant with the "standard"
I try to make it more compliant without breaking the great first solution!
I took inspiration from the pseudo specification and SBT implementation.
One important point is that Maven and SBT are producing one output file per
<testsuite>
a.k.a. per test (spec...) classwhile this solution (original) is producing one
<testsuites>
output file for the entire module. The specification supports it. We should keep this approach.In this PR:
testLocal
TestModule
,ScalaJSModule
,ScalaNativeModule
Resources
Maven output
One output per test class:
target/surefire-reports/TEST-io.ultra.AppTest.xml
mill test output Examples vs SBT
UTest
ZIO test
sbt output:
scalatest
FreeSpec
sbt output:
FlatSpec
sbt output: