Skip to content

JaCoCo report always mentions only 1 file covered instead of the actual number#1013

Merged
nohwnd merged 1 commit intopester:masterfrom
Thilas:fix-jacoco-class-counter
Apr 9, 2018
Merged

JaCoCo report always mentions only 1 file covered instead of the actual number#1013
nohwnd merged 1 commit intopester:masterfrom
Thilas:fix-jacoco-class-counter

Conversation

@Thilas
Copy link
Copy Markdown
Contributor

@Thilas Thilas commented Mar 25, 2018

When generating a JaCoCo report along with code coverage, I noticed that the CLASS counter was not correct: if more than 1 file is actually covered, it always show 1. The only exception is when there are no covered files, then it properly shows 0.

The issue comes from the way $hitFiles is determined using Measure-Object. Instead, I suggest a slightly different way similar to how other counter are computed. I adapted an existing test to highlight this issue.

@Thilas
Copy link
Copy Markdown
Contributor Author

Thilas commented Mar 29, 2018

I don't understand the fail status on "Publish Status to GitHub". How can I fix this?

@it-praktyk
Copy link
Copy Markdown
Contributor

@Thilas, you can't. It's internal error of the TeamCity instance.

@dlwyatt, can you handle it? Thank you.

@Thilas
Copy link
Copy Markdown
Contributor Author

Thilas commented Mar 29, 2018

Thanks @it-praktyk

@nohwnd nohwnd merged commit bccc25e into pester:master Apr 9, 2018
@Thilas Thilas deleted the fix-jacoco-class-counter branch October 6, 2018 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants