-
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
Add skipped test tracking to JUnit output. #549
Conversation
This PR adds skipped test reporting to our JUnit XML output. For example, given this test: ```swift @test(.disabled("Because I said so")) func f() {} ``` The XML output would be, approximately: ```xml <?xml version="1.0" encoding="UTF-8"?> <testsuites> <testsuite name="TestResults" errors="0" tests="1" failures="0" skipped="1" time="12345.0"> <testcase classname="MyTests" name="f()" time="12344.0"> <skipped>Because I said so</skipped> </testcase> </testsuite> </testsuites> ``` See also swiftlang/swift-package-manager#7383 which asks for this for XCTest.
@swift-ci please test |
Ah nice, thanks! |
@@ -183,14 +209,19 @@ extension Event.JUnitXMLRecorder { | |||
/// | |||
/// - Returns: `character`, or a string containing its escaped form. | |||
private static func _escapeForXML(_ character: Character) -> String { | |||
if character == #"""# { | |||
switch character { |
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.
>
isn't required to be escaped in XML attributes, but &
definitely is. Could you add that?
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.
Gonna leave >
out of pedantry, but yeah I'll add &
.
This PR adds skipped test reporting to our JUnit XML output. For example, given this test:
The XML output would be, approximately:
See also swiftlang/swift-package-manager#7383 which asks for this for XCTest.
Checklist: