In my previous blog, we have already seen how to setup SonarQube server on Windows 10. In this blog, I’ll show you how to generate sonar report using SonarScanner.
Step to setup SonarQube
- Download SonarScanner from https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/.
- Set SonarScanner to PATH under Environment Variable.
- Unzip it and open sonar-scanner.properties which are under conf directory.
- Edit the below lines
- Now, go to your project folder directory, open command prompt and run sonar-scanner.bat.
- It will do the analysis and then post the result to the SonarQube server http://locathost:9000/ having the project name as sonar key that we have configured in sonar-scanner.properties file.
- You can check the JUnit test code coverage as well by clicking on Coverage.
Post a Comment