How to run the sonarqube projects All unit test cases using the jacoco plugin in intellij idea

i would like to execute the unit test cases of sonarqube projects using jacoco plugin for to see the better results of the unit test cases.

Hi, just to be clear here: You are trying to build the SonarQube project & running the SonarQube test? So you cloned i guess. What you need to execute the build is to run the gradle command ./gradlew build

Do you face a specific issue?

Hi Pierre Guillot,

when we fire the command like “./gradlew build” build will start running ,"./gradlew test" by using this command we can run all sonarqube unit test cases at once,what i would like to do is i want to run all the unit test cases with the help of Jacoco plugin for to get the coverage report.
you got my point?

You can run ./gradlew test jacocoTestReport then :slight_smile:

If that help further, this is as an example what we do internally to build SQ + run the test + get the coverage + upload it to sonarcloud.

1 Like

Hi Pierre Guillot,

Thank you very much for your help, i tried as you said above. I am able to run the tests using that command and where can we see the jacoco reports or code coverage reports after execution of the unit tests using that command?.

reports are in each module build/reports/tests folder.