Skip to main content

Everyone talks about code quality and code coverage but no one has the perfect solution. The challenges you face as a growing team are plenty and when the client brings to question your quality of work, you have to be able to stand up for yourself. It’s hard to do so without concrete facts. We faced this recently at ParallelScore and were able to rise to the occasion with the help of SonarQube. Here  is a straight forward steps to get you going with SocarQube for your code coverage and quality reporting.


  • VSCode
  • Have a test package install and running on your project
  • Run text and include report path in file.

Step One

Get Started in Two Minutes

  • Unzip – let’s say in “C:\sonarqube” or “/etc/sonarqube”, the SonarQube distribution once it’s downloaded. (
  • Start the SonarQube server:

# On Windows, execute: C:\sonarqube\bin\windows-x86-xx\StartSonar.bat

# On other operating system, execute: Ex. (/etc/sonarqube/bin/[OS]/ console)

  • Log in to http://localhost:9000 with System Administrator credentials (admin/admin) and follow the tutorial to analyze your first project.

Step Two

Install Sonar Scanner

  1. Expand the downloaded file into the directory of your choice. We’ll refer to it as <install_directory> in the next steps.
  2. Update the global settings to point to your SonarQube server by editing <install_directory>/conf/
  3. #—– Default SonarQube server
  4. Add the <install_directory>/bin directory to your path.
  5. You can verify your installation by opening a new shell and executing the command sonar-scanner -h (on Windows platform the command is sonar-scanner.bat -h) .

Step 3

Config your IDE by creating a new file. Sample file below. 

# must be unique in a given SonarQube instance

sonar.projectKey={Key from Sonar Install}

# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.

sonar.projectName={Name from Sonar Server}


# Encoding of the source code. Default is default system encoding


# exclude some files and folders (typically dependencies)

sonar.exclusions={List of paths to exclude} Ex.( bower_components/**/*, node_modules/**/*, **/*test*/**){path to java} Ex. /usr/bin





sonar.javascript.lcov.reportPaths= Ex. coverage/


Author admin

More posts by admin