-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
chore(ci): make xcbeautify quieter #4653
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4653 +/- ##
=============================================
+ Coverage 90.631% 91.162% +0.531%
=============================================
Files 621 624 +3
Lines 71153 72023 +870
Branches 25310 25566 +256
=============================================
+ Hits 64487 65658 +1171
+ Misses 6574 6271 -303
- Partials 92 94 +2 see 60 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Yes please. |
As I introduced xcbeautify, I'll also look into how we can reduce the output to only display failing tests |
I tested the different options using this example log and results: A couple of insights:
(https://github.com/kishikawakatsumi/xcresulttool) Example using xcrun xcresulttool get test-report --path Result.xcresult --legacy --format json > output.json Which outputs a JSON document with issues available at the key path [
{
"_type": {
"_name": "TestFailureIssueSummary",
"_supertype": {
"_name": "IssueSummary"
}
},
"documentLocationInCreatingWorkspace": {
"_type": {
"_name": "DocumentLocation"
},
"concreteTypeName": {
"_type": {
"_name": "String"
},
"_value": "DVTTextDocumentLocation"
},
"url": {
"_type": {
"_name": "String"
},
"_value": "file:///Volumes/Developer/getsentry/sentry-cocoa/Tests/SentryTests/SentrySDKTests.swift#EndingLineNumber=757&StartingLineNumber=757"
}
},
"issueType": {
"_type": {
"_name": "String"
},
"_value": "Uncategorized"
},
"message": {
"_type": {
"_name": "String"
},
"_value": "XCTAssertEqual failed: (\"1\") is not equal to (\"0\")"
},
"testCaseName": {
"_type": {
"_name": "String"
},
"_value": "SentrySDKTests.testResumeAndPauseAppHangTracking()"
}
}
] Using
Ideas to proceed:
EDIT - References: EDIT 2: Please let me know which logs/summaries would be the most useful for you |
@philprime, I mostly care about seeing failing tests quickly in CI. I don't want to download an artifact to find out which tests were failing. What we had before merging #4645 was sufficient for me. |
TBH I am not happy that xcbeautify kind of made things worse, while trying to be better than I created a prototype for a simple script without external tools to print a test summary in PR #4671. It should be the first thing shown when opening up the GitHub Actions log, like this one: EDIT: |
@armcknight, I hope it's not a problem that I used this draft PR to play around with some different possibilities. Feel free to revert my changes if you want. @philprime, I think all we need to do is to remove I think we can keep the |
I agree with you on the size of the custom script, more code means more maintenance. I created it to replicate the log output of the RSpec style/xcpretty log, but we could also remove parts we don't need, like the code snippet lookup. For me personally having a clean summary at the end could have the pro of showing actual failing tests and not error output like this:
Therefore I would propose we add at least a list of failing tests at the end. That could also be extracted from the end of the build log file, as it is there, but xcbeautify does not print it with |
I don't mind the error output too much as it's not too much noise at the moment.
Yes, using quieter with a simple grep to only print lines starting with |
No problems on my end to mess with this, I shifted to other stuff after trying a few things and nothing seemed to work. Thanks for finding a solution @philipphofmann |
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.
Just adding the quieter drastically improves the situation. We can add the grep later.
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.
LGTM
xcbeautify by default prints every passing test, which results in huge log output making it hard to find failing tests. use options to only print failing tests.
also try the github action renderer mode.
#skip-changelog