Azure Dev Ops (VSTS) Code Coverage went from passing to 0%

Template for a good bug report, formatted with Markdown:

  • SQ Version 7.4
  • As of Friday all of our passing SQ projects went from passing to failed on Monday. The result was all Tests now have a Code Coverage of 0%.
  • Nothing really to reproduce, we simply went from passing to not passing without a change to our build instructions. We use VSTests. Doing nothing out of the ordinary. I did check the analysis log and I do see:
Build directory: D:\a\1
Bin directory: D:\a\1\.sonarqube\bin
Config directory: D:\a\1\.sonarqube\conf
Output directory: D:\a\1\.sonarqube\out
Config file: D:\a\1\.sonarqube\conf\SonarQubeAnalysisConfig.xml
16:22:04.665  Attempting to locate the CodeCoverage.exe tool...
16:22:04.665  Attempting to locate the CodeCoverage.exe tool using setup configuration...
16:22:04.696  Code coverage command line tool: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe
16:22:04.696  Fetching code coverage report information from TFS...
16:22:04.696  Attempting to locate a test results (.trx) file...
16:22:04.916  Looking for TRX files in: D:\a\1\TestResults
16:22:04.932  No test results files found
16:22:05.15  Did not find any binary coverage files in the expected location.
16:22:05.15  Falling back on locating coverage files in the agent temp directory.
16:22:05.15  Searching for coverage files in D:\a\_temp
16:22:05.15  All matching files: count=2
16:22:05.15  	D:\a\_temp\TestResults\f0e28e22-a511-4149-b64c-4d683f482c9f\VssAdministrator_fv-az461 2019-10-01 16_20_47.coverage
16:22:05.15  	D:\a\_temp\TestResults\VssAdministrator_fv-az461_2019-10-01_16_21_22\In\fv-az461\VssAdministrator_fv-az461 2019-10-01 16_20_47.coverage
16:22:05.15  Unique coverage files: count=1
16:22:05.15  	D:\a\_temp\TestResults\f0e28e22-a511-4149-b64c-4d683f482c9f\VssAdministrator_fv-az461 2019-10-01 16_20_47.coverage
16:22:05.166  Executing file C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe
  Args: analyze /output:D:\a\_temp\TestResults\f0e28e22-a511-4149-b64c-4d683f482c9f\VssAdministrator_fv-az461 2019-10-01 16_20_47.coveragexml D:\a\_temp\TestResults\f0e28e22-a511-4149-b64c-4d683f482c9f\VssAdministrator_fv-az461 2019-10-01 16_20_47.coverage 
  Working directory: D:\a\_temp\TestResults\f0e28e22-a511-4149-b64c-4d683f482c9f
  Timeout (ms):60000
  Process id: 2484
16:22:08.048  Process returned exit code 0
  • so with that i think its finding the coverage file and it is converting it but the output still shows 0% on every project.
  • I have not yet found a work around.

So I updated SonarQube to 7.9.1 before I went any further. We are still getting 0 code coverage and we are using the basic sonarscanner solution with our build pipelines.

The only thing I have been able to observe is that during the test analysis we are now seeing this a lot:

[12:40:09] Exception: E06D7363.PAVEEFileLoadException@@ in the VSTest log output. Nothing was changed on our part but could have changed on Azure Dev Ops portal side. I tried updating the VSTest steps just to make sure there was nothing going on there but I did not see any change in results.

Hi,

Apparently, you are not alone with this issue : https://developercommunity.visualstudio.com/content/problem/763234/e0434352clr-issues.html

Are you using a self hosted agent, or a Microsoft-hosted ?