Viewing code coverage results in Cobertura format

To view code coverage results in Cobertura format for your z/TPF application, use a SonarQube instance with the SonarQube C++ plugin (Community).

Before you begin

Set up the SonarScanner, which is used to import code coverage data into SonarQube. For more information, see SonarScanner in the SonarQube online documentation.
Note: The edition of your SonarScanner must support the language of your z/TPF application. You can check the supported languages of your edition at the SonarQube official website.

About this task

Cobertura code coverage results include an .xml file that has information, in Cobertura format, about the source files and executed lines of code.

Note: SonarQube does not support assembler language. Exclude analysis of assembler language programs by setting the sonar.exclusions property to **/*.asm. You can set this property in the sonar-project.properties file; you also can set it in your SonarQube instance globally or at the project level.

Procedure

  1. If you do not have an existing project in your SonarQube instance, create a project.
  2. Copy your code coverage results in Cobertura format to a directory, for example, C:\MyCodeCoverageResults.
  3. In that directory, run the SonarScanner.
    For example, if you use the Windows system, open the command prompt, and enter the following command:
    sonar-scanner.bat -Dsonar.projectKey=myProject
  4. In the command output, locate the ANALYSIS SUCCESSFUL line, and copy the HTTP link.
  5. Paste the link to a browser.