danger-code_coverage
This danger plugin generates a coverage overview for modified files 💯
This plugin is inspired and works only with the jenkins code-coverage-api-plugin 🙇♂️
How it looks like
Code Coverage 💯
File | Total | Method | Line | Conditional | Instruction |
---|---|---|---|---|---|
com/example/kyaak/myapplication/MyUtil.java | 50.94 | 13.34 | 75.0 | 49.99 | 65.44 |
com/example/kyaak/myapplication/MyController.java | 19.94 | 13.34 | 30.0 | 20.99 | 15.44 |
com/example/kyaak/myapplication/MainActivity.java | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
Installation
$ gem install danger-code_coverage
Usage
code_coverage.report
Sort option
code_coverage.report(sort: :ascending)
Authentication
If you run a jenkins server with required authentication you can pass them to danger-code_coverage
.
Create an API token with your CI user and do not pass normal password credentials.
code_coverage.report(
auth_user: "jenkins",
auth_token: "MY_TOKEN"
)