-
Notifications
You must be signed in to change notification settings - Fork 80
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
Increase information in output.xml #505
Comments
I can research this myself when I have time, but @meatball133 do you happen to know whether the JUnit XML format already has a defined format for representing arbitrary custom tags? Or is In general, we'd prefer to stick to whatever format has been established for representing tags if there is one, and if there is none, we'll have to consider the potential risk of including undocumented XML nodes. |
Both the addition of the "description" tag in The result could look like this:
This is the source I used for this btw: https://github.com/testmoapp/junitxml |
The XML output provided by Swift Testing matches what is provided by XCTest. We aren't currently planning to add additional functionality here as we don't have proper XML output for either library. |
Surely, it matches the XCTest, even surpassing it in that it actually works without giving the parallel flag and without telling you that the flag is required for it to work. I personally feel like XML deserves more attention as it has been lackluster for an extended period. What I just mentioned should have been seen as a critical bug but has been apparent from at least 5.7 to 6.0 in XCTest (I have not tested earlier versions, but I would guess it has been that way since XML support was added). XML support is critical for building test-monitoring software that can run outside of XCode, but I personally feel like the support is lackluster just because of just XCode, to keep developers needing to use a Mac with XCode. Improved XML support could drastically improve developer experience on both Windows and Linux. But also for mac developers not using xcode I understand that you are likely on a release schedule for Swift 6.0, but now, when a new library is built, I don't see why new functionality can't be added. I am more putting this as a feature request for perhaps future releases, not necessarily Swift 6.0. |
I assume you're referring to swiftlang/swift-package-manager#4752 here. You'll note it's assigned to me in GitHub. :)
You are incorrect.
Our focus for tools interoperability in Swift Testing is a JSON-based ABI. I'd encourage you to check that out. I understand that not all tools can speak our particular dialect of JSON, however there are a variety of benefits to using JSON including the ability to stream results as they occur (rather than providing a single XML document at the end of a test run.)
The goal for the Swift 6 release (specifically in re XML output) is feature parity with XCTest only, and the team's energy is focused on getting a great Swift 6 release out the door. Once the dust has settled and we're looking at features and improvements for the next Swift release after 6, we can consider changes like this one. :) |
#549 tracks skipped tests—although XCTest doesn't report them, JUnit defines the XML schema for skipped tests, so I can justify adding them to Swift Testing (no need to invent any new wheels.) Adding support is simple enough that I can sneak it in when |
Tracked internally as rdar://130619614. |
Description
When I tested using 0.10.0 of swift-testing and swift 6, the output.xml didn't include information supplied to the
@Test
annotation. I would personally like for that information to be included in the output.xml file.Expected behavior
Using this code:
I would expect:
Actual behavior
Steps to reproduce
No response
swift-testing version/commit hash
No response
Swift & OS version (output of
swift --version && uname -a
)No response
The text was updated successfully, but these errors were encountered: