-
Notifications
You must be signed in to change notification settings - Fork 256
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
Inaccurate Coverage Reported #158
Comments
@wkirby could you upload your lcov file so I can see what's going on? Thank you! |
@nickmerwin No problem. I had to change the extension to |
@nickmerwin Doing some math that I failed to do earlier, it looks like the 12 ignored branches are not ignored by |
I'm experiencing the same issue.. It reports stuff like: import moment from 'moment' // Branches [[2, 1], [8, 1], [10, 1], [12, 1]] missed. Which is absolutely wrong |
@anehx I'm pretty sure these numbers are correct — behind the scenes the The real issue, to me, seems to be that the actual report pushed to coveralls doesn't also ignore those branches, which results in a lower reported test coverage. |
I am also seeing the same issue. Here is an example: https://coveralls.io/builds/10518271 Coveralls is reporting: COVERAGE DECREASED (-3.6%) TO 85.523% Here is the output from the Travis job: https://travis-ci.org/RackHD/on-tasks/jobs/209507039 istanbul reports:
|
Hi @geoff-reid, we now factor branches into the overall coverage %, so that 85% is:
|
@nickmerwin Any luck on the original issue, where it appears ignored branches aren't being sent to coveralls correctly? |
@wkirby we're only passing along the |
I don't see anything that's output into the I have no idea what the |
@wkirby ok I see, so it looks like we'll need to add a Maybe worth asking the lcov folks about that. |
For sure. I'm pretty confident that this is a side effect of testing an Our command using |
I can confirm the issue, have been struggling to understand why suddenly coverage started misreporting since recently. Turns out, the latest release broke it. All lines that were marked as I've just downgraded to version |
@vitaly-t Thanks! We bumped down to @nickmerwin On version |
@nickmerwin was the change to include branches as part of the coverage calculation a patch release? It definitely changes functionality (some projects may have been setup to enforce 100% statements only) so was a bit surprising to see coverage % drop when no changes in code were made. Is there a way to control if lines and/or branches are included as the coverage calculation? |
@selfcontained we've added a toggle for this in the repo settings if you'd prefer to disable it: |
@nickmerwin shouldn't the default be the original behaivour? Everyone's code coverage got broken, and you just drop it in casually that everybody needs to update their projects? |
@vitaly-t that's a good point, while we wanted existing repo owners to be immediately aware of uncovered branches, it should be opt-in so as not to disrupt automated build workflows. Moving forward we're going to opt-out all existing repos, and opt-in new ones by default. |
@nickmerwin does that mean it's on or off 😉 https://twitter.com/_simon__says/status/844106636235083777 (Kinda half sarcastic/half serious. Thanks for the tool 👍 ) |
can we allow istanbul ignore using coveralls.yml without having to rely on the web UI? See discussion on lemurheavy/coveralls-public#939 |
Test coverage is being reported as:
The
travis
build can be found here. The generatedlcov.info
file matches the reported output.When viewing the coverage in Coveralls, the report shows only 63 of 78 branches covered, instead of 75 of 78 as shown in the
lcov.info
file, and project coverage of86.957%
.The text was updated successfully, but these errors were encountered: