How to run the SonarQube project's unit tests independently

Hi i downloaded the sonarqube source code from the git ,i would like to run the junit test cases from the corresponding project folder,Can some one help me how to run or execute the sonarqube source code j unit test cases independently.

Hello Pratish and welcome to this community forum.

Once you have checked out sonarqube source code, lauching all unit tests from the command line should be as simple as

$>./gradlew test
(this may take some time though…)

Now if you are specifically in interested in running a specific unit test
(say for example FileUtilsTest in sonar-core) then you need to move into the sonar-core folder and run something like

$>gradle clean test --tests org.sonar.core.util.FileUtilsTest

I hope this is what you meant by “independently”

And was expected, test report should be provided as in build/reports/tests/test/



Thank you so much Eric.