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

Invalid coverage report for SPM with dependencies #204

Open
pgawlowski opened this issue Apr 10, 2022 · 2 comments
Open

Invalid coverage report for SPM with dependencies #204

pgawlowski opened this issue Apr 10, 2022 · 2 comments

Comments

@pgawlowski
Copy link

pgawlowski commented Apr 10, 2022

While running tests on my own SPM coverage report is showing some invalid info.
Not sure why it includes additional dependencies like Alamofire and it is showing coverage for... Test Files :)

+------------------------------+---------+
| xcov Coverage Report |
+------------------------------+---------+
| Alamofire | 0.00% |
| BetterCodable | 0.00% |
| CryptoSwift | 0.00% |
| CwlCatchException | 0.00% |
| CwlCatchExceptionSupport | 0.00% |
| CwlMachBadInstructionHandler | 0.00% |
| CwlPreconditionTesting | 0.00% |
| IOSSecuritySuite | 0.00% |
| XYZConfig | 37.80% |
| XYZConfigTests | 100.00% |
| XYZExtensions | 2.29% |
| XYZExtensionsTests | 99.87% |
| XYZModels | 0.00% |
| XYZModelsTests | 100.00% |
| XYZProtocols | 35.29% |
| XYZProtocolsTests | 100.00% |
| XYZTools | 0.00% |
| XYZToolsTests | 100.00% |
| XYZTranslations | 72.73% |
| XYZTranslationsTests | 100.00% |
| XYZViews | 0.00% |
| XYZViewsTests | 100.00% |
| JWTDecode | 0.00% |
| KeychainAccess | 0.00% |
| Nimble | 6.56% |
| Quick | 54.05% |
| QuickObjCRuntime | 100.00% |
| SwiftyBeaver | 0.00% |
| Average Coverage | 36.02% |
+------------------------------+---------+

@pgawlowski pgawlowski changed the title Invalid coverage report for SPM Invalid coverage report for SPM with dependencies Apr 10, 2022
@aadeshmindtickle
Copy link

Any updates on this issue?

@diogomusou
Copy link

diogomusou commented Mar 30, 2023

On Xcode you are probably using "gather coverage for - all targets".
I also use that since "some targets" doesn't work sometimes.
I also use "exclude_targets" to remove the unwanted targets.
You could do something like:
xcov( ignore_file_path: ".xcovignore", exclude_targets: "Alamofire,BetterCodable", minimum_coverage_percentage: 80.0, output_directory: "./xcov_report", scheme: "MainAppScheme" )

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