diff --git a/Sources/Testing/Events/Recorder/Event.JUnitXMLRecorder.swift b/Sources/Testing/Events/Recorder/Event.JUnitXMLRecorder.swift index 0b9b283e3..c761753d2 100644 --- a/Sources/Testing/Events/Recorder/Event.JUnitXMLRecorder.swift +++ b/Sources/Testing/Events/Recorder/Event.JUnitXMLRecorder.swift @@ -122,7 +122,7 @@ extension Event.JUnitXMLRecorder { } return nil case let .issueRecorded(issue): - if issue.isKnown { + if issue.isKnown || issue.severity < .error { return nil } if let id = test?.id { diff --git a/Tests/TestingTests/EventRecorderTests.swift b/Tests/TestingTests/EventRecorderTests.swift index 7712cd973..8ac7f6728 100644 --- a/Tests/TestingTests/EventRecorderTests.swift +++ b/Tests/TestingTests/EventRecorderTests.swift @@ -467,15 +467,35 @@ struct EventRecorderTests { @Test("JUnitXMLRecorder counts issues without associated tests") func junitRecorderCountsIssuesWithoutTests() async throws { let issue = Issue(kind: .unconditional) - let event = Event(.issueRecorded(issue), testID: nil, testCaseID: nil) let context = Event.Context(test: nil, testCase: nil, configuration: nil) - let recorder = Event.JUnitXMLRecorder { string in - if string.contains("