-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Coverage : RunSettings : Cobertura format is not working, even tough it works with CLI #3497
Comments
Can you check which version of test platform is being used by ADO? It seems like it is using older version in which cobertura format is not supported. |
Thanks Faisal for checking this. Yes, I also came to the same conclusion. The Visual Studio on my ADO instance is on 2019 16.0.1
Query: If I can't update the VS full version on the ADO box, will just replacing the vstest.console.exe to your recommended version would do the job and safe from the dependency tree's perspective? Edit: |
Cobertura support was added in 17.1 (Visual Studio and Microsoft.TestPlafrom). https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes |
Ok thanks, yet I have tested it 17.0.1 and it seem to generate the cobertura. However yes, I need to confirm that bit. will do on azure forum. A follow up query on VsTest cobertura support: just like for .covx and .coverage, the Publish Test Result Task auto merge/aggregates the results (from multiple jobs withing the same build) at the end of the build. Would it do for cobertura as well? |
@p00j4 sorry for late response :) Azure DevOps Publish Code Coverage results tasks are not supporting merging. You should merge all coverage reports before you push it. You can use report generator to merge it for you. |
@jakubch1 Are you saying the PublishCodeCoverageResults@2 task does not support merging? I kinda doubt that |
I'm trying VSTest task to use my runsettings and generate a Cobertura report, which works fine on my local CLI, however when same ran on ADO pipeline, generates .coverage file instead of *.cobertra.xml file
Steps to Reproduce
CodeCoverage.runsettings
Task
Run it and observe, it generates dot coverage file. Instead is supposed to generate a cobertura file
The same works using CLI
Cli run
vstest.console.exe MySolution.UnitTests.dll --EnableCodeCoverage --settings:$MyPath\Src\CodeCoverage.runsettings
However, on ADO, the same config, generates a dot coverage file instead
Debug info:
The runsettings ADO has automatically modified to
But update: If I modify the runsetting (as of the ADO) on my local and run with CLI, it still works fine. It's only not working with the ADO task. What am I missing?
The text was updated successfully, but these errors were encountered: