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

Add code coverage reports to Codacy #4454

Closed
wants to merge 3 commits into from

Conversation

freimair
Copy link
Member

@freimair freimair commented Aug 31, 2020

In the course of boosting Bisq's code quality and resilience, here is an attempt to get code coverage reports.

Use Case "Keep track of test coverage"

We can configure travis to build master once a day. By doing this, codacy will display code coverage numbers and we can keep track of how we are doing.

Use Case "Increase coverage"

Unfortunately, it seems that codacy only shows us numbers without the option to filter for packages. As a workaround, I have added a parameter only to the coverage report task. With that, one can view the coverage for a specific module which holds a "total" of the module instead of the total of the whole project.

Running ./gradlew clean check followed by ./gradlew codeCoverageReport -Ponly=p2p will output an html-formatted and easy to read report in build/reports/jacoco/codeCoverageReport/html/index.html like so:

Screenshot from 2020-09-02 17-24-34

Given a future project sets its goal to "reach 30% test coverage in p2p", we can easily check if the goal has been reached.

Todo for @ripcurlx

  • Schedule a daily master build in travis
  • fix the env-variable

@ripcurlx
Copy link
Contributor

ripcurlx commented Sep 1, 2020

I just restarted the Travis job to see if it is picking up the environment variable correctly.

@ghubstan
Copy link
Member

ghubstan commented Sep 30, 2020

Tested ACK

A markdown file in the docs folder showing usage would be nice.

I used these gradle cmds to see test harness coverage -- it worked.

./gradlew  clean  check 
./gradlew  build  :apitest:installDaoSetup -x test
./gradlew -DrunApiTests=true :apitest:test codeCoverageReport -Ponly=apitest

@ripcurlx
Copy link
Contributor

ripcurlx commented Oct 1, 2020

There is still the error in the Travis log that it is not configured properly, although I have done it as documented in Codacy. I'll have a look at it soon again.

@stale
Copy link

stale bot commented Nov 1, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Nov 1, 2020
@stale
Copy link

stale bot commented Dec 4, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Dec 4, 2020
@stale
Copy link

stale bot commented Jan 10, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Jan 10, 2021
@stale
Copy link

stale bot commented Jan 17, 2021

This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.

@stale stale bot closed this Jan 17, 2021
@ripcurlx
Copy link
Contributor

I did some testing in the past and the config argument was printed correctly, but still it didn't work in the setup. I'll have a more in-depth look soon.

@ripcurlx ripcurlx reopened this Jan 19, 2021
@stale stale bot removed the was:dropped label Jan 19, 2021
@stale
Copy link

stale bot commented Jun 2, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Jun 2, 2021
@stale
Copy link

stale bot commented Jun 11, 2021

This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.

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