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

When minimum_coverage_percentage set to 100.0 xcov fails even when actual code coverage is 100.00% #224

Open
WikipediaBrown opened this issue May 2, 2024 · 0 comments

Comments

@WikipediaBrown
Copy link

This seems to be an edge case but most of the code in my project is generated and the tests actually in fact do cover 100% of the code. But, when I set this parameter in fastlane, I get this error message:

[02:21:41]: Actual Code Coverage (100.00%) below threshold of 100.00%
[02:21:41]: The build has been marked as failed because minimum overall coverage has not been reached.

I'm pretty sure this is an edge case that just wasn't accounted for. In most cases 100% coverage is a red flag but in my particular case, it is true.

The corresponding part of my fastfile looks like this:

xcov(
       is_swift_package: true,
       output_directory: './fastlane/CodeCoverage',
       minimum_coverage_percentage: 100.0
    )

For now I think I'll just set it to 99.99% but that kind of causes me problems down the line. There's a lot of code and I think I could reach that threshold if just one of my tests don't pass in the future. for now I think mathematically I'm ok but I'm sure I won't be in maybe 2 years.

The project is here

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