- ALM used Azure DevOps
- CI system used Azure DevOps (YAML)
- Scanner command used - task: SonarCloudAnalyze@1
- Languages of the repository C#
- Error observed Code coverage is 0% because it cannot find any TRX files. The log output says
2020-11-17T11:53:10.8683646Z Code coverage command line tool: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe
2020-11-17T11:53:10.9803883Z Fetching code coverage report information from TFS…
2020-11-17T11:53:10.9832756Z Attempting to locate a test results (.trx) file…
2020-11-17T11:53:11.3080550Z Looking for TRX files in: D:\a\1\TestResults
2020-11-17T11:53:11.3085054Z No test results files found
2020-11-17T11:53:11.5686761Z Did not find any binary coverage files in the expected location.
2020-11-17T11:53:11.5710157Z Falling back on locating coverage files in the agent temp directory.
2020-11-17T11:53:11.5717338Z Searching for coverage files in D:\a_temp
2020-11-17T11:53:11.6570647Z No coverage files found in the agent temp directory.
2020-11-17T11:53:11.6572560Z Coverage report conversion completed successfully.
Latest version of SonarCloud extension installed in ADO version “1.20.0”
Note that SonarCloud integration is brand new for us and the Pipeline currently uses the following two steps to get covergae report
- script: reportgenerator -reports:$(Build.SourcesDirectory)\*\cobertura.xml -targetdir:$(Build.SourcesDirectory)\CodeCoverage -reporttypes:HtmlInline_AzurePipelines displayName: 'Create code coverage report' - task: PublishCodeCoverageResults@1 displayName: 'Publish code coverage report' inputs: codeCoverageTool: 'cobertura' summaryFileLocation: '$(Build.SourcesDirectory)/**/cobertura.xml'
Would the existing reportgenerator and PublishCodeCoverageResults steps be conflicting with SonarCloud?