I use "dotnet test" command in order to run the tests (running them as "Visual Studio Test" step fails for some strange reason). I generate coverage data as below:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Dynamic Code Coverage Tools\CodeCoverage" collect /output:code.coverage dotnet test "test\path_to_unit_tests_project\project.json"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Dynamic Code Coverage Tools\CodeCoverage" analyze /output:code.coverage.xml code.coverage
I added "Publish Code Coverage Results" step. The build finishes successfully but I see "No build code coverage data available" in code coverage section. At the same time I see *.coverage and *.coverage.xml as additional artifacts.
Is it possible to fill that section with data coming from external code coverage tool (not VS Test step)? If not, is it possible to create a new tab showing a custom code coverage report (as below)?
VSTS only support to show the code coverage result published by "Publish Code Coverage Results" with "JaCoCo" or "Cobertura" format for now. If the coverage is in other format, the coverage result file will be published but the report won't show.
Browse Code Coverage reports in the web
A new Code Coverage tab has been enabled on the Build summary page. Users uploading Code Coverage data in Jacoco or Cobertura formats will be able to browse the HTML report generated by the tool in the Code Coverage tab.
Refer to this link for the information: 2016-Jul-7 Release Notes
And there isn't any way to create a tab showing custom code coverage report for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With