I am using dotnet cake for building and testing a solution. Everything works fine and code coverage report is properly generated.
However, when creating a PR in Azure Devops, the code coverage checks is running but then disappears without any error. This only happens when using collector XPlat Code Coverage
, PR code coverage check is working fine when using collector Code coverage
(generating .coverage
file).
Based on the documentation that should be working fine, but it does not.
Here is how the pipeline looks:
- pwsh: dotnet cake ./scripts/build.cake --target=Test
displayName: Run Tests
- task: PublishTestResults@2
displayName: "Publish Test Results"
inputs:
testResultsFormat: "VSTest"
testResultsFiles: "**/*.trx"
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: "Cobertura"
summaryFileLocation: "$(Agent.TempDirectory)/**/*.cobertura.xml"