-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
[New Output] Swift Testing Results #313
Comments
We've had to remove XCBeautify from our CI pipeline after migrating to Swift Testing because of this, interested in giving a hand if needed |
I can confirm we're seeing the same: without xcbeautify:
vs. with xcbeautify
|
@cpisciotta I can take this one on, since we need it fixed for our own CI/CD, but I can't commit more than 6h per week to it. |
Hi everyone! Thank you for your patience, and sorry for the delay! @ajkolean recently opened a PR to address this issue, and I will work with him to get this merged ASAP. |
No need to apologise, @cpisciotta! This is a great tool, and I'm more than happy to wait when I don't have time to directly contribute. Thank you! |
### Description: This PR addresses issue [#313](#313) by adding support for parsing and formatting Swift testing output in `xcbeautify`. It introduces new capture groups and associated formatting functions for various Swift testing events, such as test runs, test suites, individual tests, and test issues. The changes enhance the parsing capabilities, enabling better output formatting for Swift-based test results. ### Key Changes: 1. **New Capture Groups for Swift Testing:** - Added capture groups for various Swift testing events, including: - `SwiftTestingRunStartedCaptureGroup` - `SwiftTestingRunCompletionCaptureGroup` - `SwiftTestingRunFailedCaptureGroup` - `SwiftTestingSuiteStartedCaptureGroup` - `SwiftTestingSuitePassedCaptureGroup` - `SwiftTestingSuiteFailedCaptureGroup` - `SwiftTestingTestStartedCaptureGroup` - `SwiftTestingTestPassedCaptureGroup` - `SwiftTestingTestFailedCaptureGroup` - `SwiftTestingTestSkippedCaptureGroup` - `SwiftTestingTestSkippedReasonCaptureGroup` - `SwiftTestingIssueCaptureGroup` - `SwiftTestingIssueArgumentCaptureGroup` - `SwiftTestingPassingArgumentCaptureGroup` - `SwiftTestingPassingArgumentMultipleCaptureGroup` - `SwiftTestingAttributeCaptureGroup` 2. **Updated Output Handling:** - Added support for the newly introduced capture groups in `Parser.swift` and `Formatter.swift`. - Extended `OutputRendering` to handle formatting for each new capture group. - Adjusted the handling of output types to include `OutputType.issue` for better categorization of issues. 3. **Terminal Renderer Improvements:** - Added functions in `TerminalRendererTests.swift` to validate the formatted output for the newly introduced capture groups. - Ensured colorized and non-colorized outputs are correctly formatted, with proper handling of time and issue details. 4. **Test Suite Enhancements:** - Added new unit tests in `ParserTests.swift` to verify the parsing of different Swift testing outputs. - Updated `ParsingTests.swift` to include a new test log file (`swift_test_log.txt`) for comprehensive testing of Swift testing events. 5. **Constants Update:** - Added a new `OutputType.issue` to classify test-related issues.
Thank you folks for addressing this one 🙏🏼 |
Hey everyone! Thank you again to @ajkolean for his contribution! This should be available starting in 2.12.0, but that is now several versions back from the latest. I will close this issue, but please re-open this or a new issue if you continue to see areas of improvement. |
Thanks @ajkolean and @cpisciotta 🫶 |
What's the uncaptured output?
✔ Test run with 16 tests passed after 0.004 seconds.
◇ Test run started.
↳ Testing Library Version: 94 (arm64-apple-ios13.0-simulator)
◇ Suite UUIDRFC4122Tests started.
◇ Test "Test that a directly initialized UUID outputs in lowercase" started.
◇ Test "Test that a UUID initialized with an uppercase UUID string outputs in lowercase" started.
✔ Test "Test that a directly initialized UUID outputs in lowercase" passed after 0.008 seconds.
✔ Test "Test that a UUID initialized with an uppercase UUID string outputs in lowercase" passed after 0.008 seconds.
✔ Suite UUIDRFC4122Tests passed after 0.011 seconds.
✔ Test run with 30 tests passed after 0.012 seconds.
Suggested Regex
No response
Suggested Output
No response
Additional Context
I haven't captured the test failure, timeout and other states here in this output.
The text was updated successfully, but these errors were encountered: