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 #580

Merged
merged 30 commits into from May 10, 2022
Merged

Code coverage #580

merged 30 commits into from May 10, 2022

Conversation

AnonymousWalker
Copy link
Collaborator

@AnonymousWalker AnonymousWalker commented May 4, 2022

As sonarqube only reads and analyzes from code coverage report file (.xml is best option), we need the jacoco java plugin to generate coverage report at project level.
To aggregate the reports from subprojects, a custom JacocoReport task at root gradle file is needed to iterates through the project tree and collect the .exec file generated from jacoco plugin.

Also, this report task should execute after running all the tests.

Helpful resources:
Github issue 8881
Gradle documentation

This change is Reviewable

@AnonymousWalker AnonymousWalker marked this pull request as ready for review May 4, 2022 15:27
@AnonymousWalker AnonymousWalker marked this pull request as draft May 4, 2022 15:27
@AnonymousWalker AnonymousWalker force-pushed the aw-sonarqube branch 2 times, most recently from 65832ea to 813f579 Compare May 5, 2022 20:56
@AnonymousWalker AnonymousWalker changed the title Test Code coverage May 6, 2022
@AnonymousWalker AnonymousWalker marked this pull request as ready for review May 9, 2022 19:06
Copy link
Collaborator

@mXaln mXaln left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, 1 of 3 files at r3, 3 of 3 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AnonymousWalker and @jsarabia)


build.gradle line 30 at r4 (raw file):

jacoco {
    toolVersion = "0.8.7" // use this jacoco version to avoid error

Please move the version number to dependencies.gradle file

Copy link
Collaborator Author

@AnonymousWalker AnonymousWalker left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 of 6 files reviewed, 1 unresolved discussion (waiting on @jsarabia and @mXaln)


build.gradle line 30 at r4 (raw file):

Previously, mXaln (Maxim) wrote…

Please move the version number to dependencies.gradle file

Thanks for reminding!

Copy link
Collaborator

@jsarabia jsarabia left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 of 6 files reviewed, 1 unresolved discussion (waiting on @mXaln)


build.gradle line 30 at r4 (raw file):

Previously, AnonymousWalker (Tony) wrote…

Thanks for reminding!

could this be placed under the allprojects block, instead of here and in the subprojects block?

@jsarabia jsarabia merged commit f34626b into dev May 10, 2022
@jsarabia jsarabia deleted the aw-sonarqube branch May 10, 2022 18:12
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.

None yet

3 participants