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

Different coverage percentage from XCode report #557

Open
domenicontt opened this issue May 6, 2024 · 4 comments
Open

Different coverage percentage from XCode report #557

domenicontt opened this issue May 6, 2024 · 4 comments

Comments

@domenicontt
Copy link

Hi Team,
The report generated by slather provides coverage percentages that are far different from those provided by XCode. For many swift classes that have 100% coverage with XCode, slather reports zero coverage.
Any suggestions to solve this problem?
Thanks!

@jarrodlombardo-EventBase
Copy link
Contributor

Need more details. Is Slather printing any warnings or errors when you run it?

@domenicontt
Copy link
Author

Hi, sorry for the lack of details in the previous comment. During slather running I don't have any errors or warnings. My project uses XCode 15.2 and Swift 5.
Thanks!

@jarrodlombardo-EventBase
Copy link
Contributor

Still not enough details for me to investigate anything. Can you copy the log from XCode that does code coverage and also the log from your slather run?

@victor-livefront
Copy link

FWIW I've also seen inconsistencies between what Slather is reporting vs what Xcode is reporting. I was seeing partial coverage on a few files not being reported. Played around with my slather configuration for a little bit, but didn't have any luck. To circumvent the issue, I moved our CI coverage reporting over to Xcov from Slather, and the reporting is now 1-1 with Xcode. Here's a screen shot of an example of what wasn't covered (just the initializer in this file, everything else was covered). Didn't see any warnings or errors in the console when generating Slather reports. We're also on Xcode 15.2 now, but we've been seeing the problem for a few months and also used Xcode 15.0.

image

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

3 participants