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

Code coverage differs from JaCoCo report #43

Closed
opwvhk opened this issue May 25, 2023 · 3 comments
Closed

Code coverage differs from JaCoCo report #43

opwvhk opened this issue May 25, 2023 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@opwvhk
Copy link

opwvhk commented May 25, 2023

Describe the bug

The code coverage as added to the workflow differs from what JaCoCo reports.

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behaviour:

  1. Add the action to a Java project with interfaces and/or classes that are excluded
  2. Let the workflow run
  3. See the result, e.g.: https://github.com/opwvhk/avro-conversions/actions/runs/5077740253/jobs/9121402487

What we see here is that interfaces, like SimpleContentHandler.java, don't have any details.

Also, excluded classes like FixedXmlSchemaWalker.java mark many lines as missed, whereas this class should not be in the report at all!

Expected behaviour

  • The coverage report does not include excluded classes.
  • The coverage report does not mark interfaces with a cross.
@PavanMudigondaTR
Copy link
Collaborator

Will look in to this in few days.

@PavanMudigondaTR
Copy link
Collaborator

PavanMudigondaTR commented Jun 20, 2023

@opwvhk

It appears to be problem with https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin

Also I suggest you try to verify syntax of "exclude" in pom.xml . I suggest to review this guide https://www.baeldung.com/jacoco-report-exclude

image

image

@opwvhk
Copy link
Author

opwvhk commented Jun 29, 2023

Thank you; that triggered a change that fixed most of it. Now, I only get crosses for classes without code (pure interfaces). Good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants