You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
Copy file name to clipboardExpand all lines: Sources/Testing/Events/Recorder/Event.JUnitXMLRecorder.swift
+40-9Lines changed: 40 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,9 @@
11
11
extensionEvent{
12
12
/// A type which handles ``Event`` instances and outputs representations of
13
13
/// them as JUnit-compatible XML.
14
+
///
15
+
/// The maintainers of JUnit do not publish a formal XML schema. A _de facto_
16
+
/// schema is described in the [JUnit repository](https://github.com/junit-team/junit5/blob/main/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportWriter.java).
0 commit comments