Skip to content
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

Support Swift Testing in JunitReporter #325

Open
ikesyo opened this issue Oct 21, 2024 · 0 comments
Open

Support Swift Testing in JunitReporter #325

ikesyo opened this issue Oct 21, 2024 · 0 comments

Comments

@ikesyo
Copy link

ikesyo commented Oct 21, 2024

SwiftTesting*CaptureGroup should be handled at

if FailingTestCaptureGroup.regex.match(string: line) {
guard let testCase = generateFailingTest(line: line) else { return }
components.append(.failingTest(testCase))
} else if RestartingTestCaptureGroup.regex.match(string: line) {
guard let testCase = generateRestartingTest(line: line) else { return }
components.append(.failingTest(testCase))
} else if TestCasePassedCaptureGroup.regex.match(string: line) {
guard let testCase = generatePassingTest(line: line) else { return }
components.append(.testCasePassed(testCase))
} else if TestCaseSkippedCaptureGroup.regex.match(string: line) {
guard let testCase = generateSkippedTest(line: line) else { return }
components.append(.skippedTest(testCase))
} else if TestSuiteStartCaptureGroup.regex.match(string: line) {
guard let testStart = generateSuiteStart(line: line) else { return }
components.append(.testSuiteStart(testStart))
} else if ParallelTestCaseFailedCaptureGroup.regex.match(string: line) {
guard let testCase = generateParallelFailingTest(line: line) else { return }
parallelComponents.append(.failingTest(testCase))
} else if ParallelTestCasePassedCaptureGroup.regex.match(string: line) {
guard let testCase = generatePassingParallelTest(line: line) else { return }
parallelComponents.append(.testCasePassed(testCase))
} else if ParallelTestCaseSkippedCaptureGroup.regex.match(string: line) {
guard let testCase = generateSkippedParallelTest(line: line) else { return }
parallelComponents.append(.testCasePassed(testCase))
} else {
// Not needed for generating a junit report
return
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant