The run-coverage.sh
script runs maven with the clover profile which generates the test coverage data. If the necessary parameters are given it also runs maven with the sonar profile and uploads the results to SonarQube.
The coverage results can be found under target/clover/index.html
and here is how you can run the clover code analysis:
sh dev-support/code-coverage/run-coverage.sh
The required parameters for publishing to SonarQube are:
The project name is an optional parameter.
Here is an example command for running and publishing the coverage data:
sh dev-support/code-coverage/run-coverage.sh -l ProjectCredentials -u https://exampleserver.com -k Project_Key -n Project_Name