The run-coverage.sh
script runs maven with the code-coverage profile which generates the clover code analysis data. If the necessary parameters are given it also 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:
./dev/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:
./dev/code-coverage/run-coverage.sh -l ProjectCredentials -u https://exampleserver.com -k Project_Key -n Project_Name