asur
asur

Reputation: 1879

Unable to see code coverage in SonarQube

I am unable to Collect the SonarQube coverage values. Can any one suggest me where am I missing anything here. I could see the ***.Tests.dll file is available.

enter image description here

Test Files
    C:\AirSearchBnd\src\Fortius.Air.Search.Tests\bin\Debug\WorldVentures.Fortius.Search.Tests.dll

Errors and Failures

1) Invalid : C:\AirSearchBnd\src\Fortius.Air.Search.Tests\bin\Debug\WorldVentures.Fortius.Search.Tests.dll
File not found: C:\AirSearchBnd\src\Fortius.Air.Search.Tests\bin\Debug\WorldVentures.Fortius.Search.Tests.dll

Test Run Summary
  Overall result: Failed
  Test Count: 0, Passed: 0, Failed: 0, Inconclusive: 0, Skipped: 0
  Start time: 2017-01-27 03:35:50Z
    End time: 2017-01-27 03:35:50Z
    Duration: 0.025 seconds

Results (nunit3) saved as TestResult.xml
Committing...
No results, this could be for a number of reasons. The most common reasons are:
    1) missing PDBs for the assemblies that match the filter please review the
    output file and refer to the Usage guide (Usage.rtf) about filters.
    2) the profiler may not be registered correctly, please refer to the Usage
    guide and the -register switch.

C:\AirSearchBnd>exit 0 

Windows Batch command enter image description here

SonarQube Scanner Begin Annalysis

enter image description here

SonarQube code coverage screen

enter image description here

Upvotes: 0

Views: 1611

Answers (2)

spwert
spwert

Reputation: 98

WorldVentures.Fortius.Search.Tests.dll doesn't seem to exist when OpenCover is run, judging by the OpenCover output. In your Jenkins job, the OpenCover batch script is run before the MSBuild step. If the unit tests are built by that MSBuild step, it needs to be executed before the OpenCover batch script step.

Upvotes: 1

Val
Val

Reputation: 2080

Try executing the OpenCover command after the MSBuild command, but before End Analysis, as described here: Code Coverage Results

Upvotes: 1

Related Questions