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

Feat/add report test coverage module #790

Conversation

ahmad-kashkoush
Copy link

@ahmad-kashkoush ahmad-kashkoush commented Feb 10, 2025

resolves #459

Testing done

I've ran

mvn clean verify

and at the end plugin-modernizer-report executes a report-aggregate that gather all test coverage from other modules
image

and when you open plugin-modernizer-report/target/site/jacoco-aggregate

you find an HTML file containing all the coverage generated:

image
image
image

Related links:

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@jonesbusy jonesbusy marked this pull request as draft February 10, 2025 19:00
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not commit binary files. Maven plugin must be used. The CLI on the issue was just an example

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix it, anything else?

@jonesbusy
Copy link
Collaborator

There is many things wrong here

Like I said on the issue, I removed the 'good-first-issue' tag because it's not and issue for new comers. This require a good understanding on jacoco, maven and how the jar is executed to perform integration test.

Why not trying to implement in in several step, for example

  • Ensure the covergage in compute and dump when running test (maybe a different execution dump file
  • Ensure the coverage is merged with previous unit execution

Thanks

@jonesbusy jonesbusy closed this Feb 10, 2025
@ahmad-kashkoush
Copy link
Author

There is many things wrong here

* Coverage is 0 (according on your screenshot). So it's even worse than before. I would expect to see a PR that proof that the computed total coverage is higher if what we already have (60%).

* You commit binary files instead of using the maven jaccoco plugin

* Surefire arg line is never passer to the end process (https://github.com/jenkins-infra/plugin-modernizer-tool/blob/main/plugin-modernizer-cli/pom-it.xml#L39-L41) so it's impossible that we compute coverage when running the final jar.

Like I said on the issue, I removed the 'good-first-issue' tag because it's not and issue for new comers. This require a good understanding on jacoco, maven and how the jar is executed to perform integration test.

Why not trying to implement in in several step, for example

* Ensure the covergage in compute and dump when running test (maybe a different execution dump file

* Ensure the coverage is merged with previous unit execution

Ok, thanks for feedback.

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

Successfully merging this pull request may close these issues.

Make jacoco work with integration tests
2 participants