1. Home
  2. Technical Documentation
  3. SonarQube Coverage Process

SonarQube Coverage Process

Code coverage is published to https://sonarcloud.io/project/overview?id=Warewolf_DotNet_Framework from https://dev.azure.com/Warewolf/Warewolf/_build?definitionId=3.

Coverage is collected by vstest.console.exe using the /EnableCodeCoverage commandline switch. Coverage is also collected from the server under test using microsoft.codecoverage.console.exe.

All coverage snapshots are converted into xml for publishing to SonarQube using microsoft.codecoverage.console.exe.

Files that are involved with code coverage are:

  1. pipeline-with-coverage.yml – Snapshot publishing to Azure DevOps and to SonarCloud.
  2. TestRun.ps1 – Using the ‘-Coverage’ switch.
  3. StartAsService.ps1 – Using the ‘-Coverage’ switch.

Note, some coverage is incidental. Incidental coverage is coverage over lines of code that do not have an assert in the test for those lines. For example running any integration test shows the entire server startup as covered. We can increase the quality of the code coverage by reducing incidental coverage. Good quality unit tests provide the best code coverage.

FacebookTwitterLinkedInGoogle+Email
Updated on December 12, 2023

Was this article helpful?

Related Articles

Enjoying Warewolf?

Write a review on G2 Crowd
Stars