Synchronize the data of code coverage with your SonarQube tool

Note: This operation is identical for the configuration of COV and TFI plugin.

Set a plugin of this type assumes that you have already deployed a body of SonarQube, and that you have done the settings necessary to follow the code coverage.

You will have to configure this plugin to allow Themis to question SonarQube on the data linked to the test coverage. 

Seek in the Administration > Projects part, open the listing of the sources of the concerned project, then the listing of plugins and finally, click on the Add a plugin button:


In the settings window, select the Test coverage practice and the SonarQube Extractor type of plugin. You have to then configure the following fields :

  • Url: Indicate here the url of your SonarQube body
  • Key of the project: It is the single identifier of a project in SonarQube. This identifier is  accessible on the view dedicated to the project in the right part:

  • User/Password. Inform here the SonarQube identifiers with an administrator priviledge (see below)  
  • Extensions to include: Listings separated by commas of file extensions not concerned by the code coverage. Example: indicate .js if the HTML files are analyzed by SonarQube for the defaults of code, but not for the code coverage.

Administrative rights 

Themis uses in its analysis the date of last execution of SonarQube. This point is significant because it allows Themis to exclude from its calculation the commits that take place after the beginning of the SonarQube analysis and reduce thus the risk of false positives. The Web services offered by SonarQube and allowing to access to this information require administrator priviledges. It is for this reason that identifiers are asked. 

Supported versions of SonarQube

Currently this plugin is compatible from SonarQube version 4.5.2 to the version 7.3.

Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.