- ALM used: Azure DevOps Services
- CI system used: Azure DevOps - Self Hosted Agent
Similar to this issue Code Coverage 0.0% Azure DevOps i cannot get Code coverage to work.
The VSTest@2 output shows that a trx file is generated. But then its added to the run attachments and very quickly i see the file is cleared up before the build then gets to the Sonarcloud analyze step.
“Adding trx file C:*_temp\TestResults*.trx to run attachments” (replaced folder name and file name with * where its identifiable account info)
It seems like the developers of VSTest suggest this is the expected behaviour VSTest should retain TestResults or give an option not to publish · Issue #10157 · microsoft/azure-pipelines-tasks · GitHub
But then how exactly is the Sonarcloud analyze step meant to pick up this information? It doesnt download it from the pipeline.
Code Coverage 0.0% Azure DevOps seems to suggest this is fixed? but im using the latest Sonarcloud extension in DevOps services.