Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
We are using below stack
Bitnami SonarQube Stack For Microsoft Azure
nunit3-console.exe
dotCover.exe (Version 2019.3.1)
- what are you trying to achieve
We have to push out code coverage data to SonarQube on Azure - what have you tried so far to achieve this
Although the coverage files are getting generated it but not creating report.
Below is sample code for running coverage
$nunitexe = Resolve-Path "BuildTools\NUnit.ConsoleRunner.3.10.0\tools\nunit3-console.exe"
$dotcoverexe = Resolve-Path "BuildTools\JetBrains.dotCover.CommandLineTools.2019.3.1\tools\dotCover.exe"
& `
$dotcoverexe `
cover `
--TargetExecutable="$nunitexe" `
--Output="$OutputDir\TestResults\dotCover-results.html" `
--ReportType=HTML `
--Filters="+:module=*" `
--LogFile="$OutputDir\dotCover.log" `
-- `
$Dlls `
--where "cat !~ '($ExcludeTestCategories)'" `
--result="$OutputDir\TestResults\NUnit-results.xml" `
--out="$OutputDir\NUnit.stdout.log" `
--agents=8
Below is the log data: -
10:06:00.254 DEBUG: Analyzing coverage after aggregate found ‘6’ coverage files.
10:06:00.254 DEBUG: Skipping ‘D:\TestProject\SampleApp\SampleApp\App_Start\RouteConfig.cs’ as it is a test file.
10:06:00.254 DEBUG: Skipping ‘D:\TestProject\SampleApp\SampleApp.Tests\Controllers\HomeControllerTest.cs’ as it is a test file.
10:06:00.254 DEBUG: Skipping ‘D:\TestProject\SampleApp\SampleApp\Global.asax.cs’ as it is a test file.
10:06:00.254 DEBUG: Skipping ‘D:\TestProject\SampleApp\SampleApp\App_Start\FilterConfig.cs’ as it is a test file.
10:06:00.254 DEBUG: Skipping ‘D:\TestProject\SampleApp\SampleApp\App_Start\BundleConfig.cs’ as it is a test file.
10:06:00.254 DEBUG: Skipping ‘D:\TestProject\SampleApp\SampleApp\Controllers\HomeController.cs’ as it is a test file.
10:06:00.254 DEBUG: The total number of file count statistics is ‘6’.
10:06:00.254 INFO: Coverage Report Statistics: 6 files, 0 main files, 0 main files with coverage, 6 test files, 0 project excluded files, 0 other language files.
10:06:00.254 WARN: The Code Coverage report doesn’t contain any coverage data for the included files.