MicrosoftPremier / VstsExtensions

Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
MIT License
57 stars 14 forks source link

Code Coverage check not finding results #26

Closed davebrannan closed 5 years ago

davebrannan commented 5 years ago

I'm using version 5* of "Check build quality" extension, and even though the code coverage results are being published, the task is failing as the percentage is 0%. See screenshot. Any advice to troubleshoot? Thanks.

image

ReneSchumacher commented 5 years ago

Hi Dave,

how are you collecting code coverage? Do you run the Visual Studio Test task or some 3rd party tool? I can see from the screenshot that there is a line coverage of 17.72%, but you are trying to evaluate block coverage. Many tools don't calculate block coverage and only have line or branch coverage.

To find out what coverage types are available in your case, you can check your coverage report (just click on the "Code coverage succeeded" link in your screenshot). It should list all types of coverage. If you need more help, please run your build again with the variables System.Debug and BQC.LogRawData set to true and send us the task log to PSGerExtSupport (at) microsoft.com. Please quickly check the log for any sensitive data that it might contain before sending it over.

René

davebrannan commented 5 years ago

Hi Rene,

Thanks for the quick response. I'm using the Pester Test Runner from Black Marble extension, but you're correct. I've changed it to Line coverage and its now matching the Code Coverage results and the quality gate is working correctly. File under RTFM and close the issue :-)