2 回答
TA贡献1866条经验 获得超5个赞
默认情况下测试结果文件位于temp文件夹中,尝试通过复制文件任务复制文件,然后.coverage文件将被分析并生成coveragexml文件。
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.sourcesdirectory)\TestResults'
inputs:
SourceFolder: '$(Agent.TempDirectory)'
TargetFolder: '$(build.sourcesdirectory)\TestResults'
TA贡献1833条经验 获得超4个赞
WARN: The Code Coverage report doesn't contain any coverage data for the included files.
有关故障排除提示,.coverage 文件将在 sonarqube 结束分析任务期间转换为coveragexml
Run Unit Tests and Save Results in file "NUnitResults.xml"
packages\NUnit.ConsoleRunner.3.7.0\tools \ nunit3-console.exe --result=NUnitResults.xml "NUnitTestProject1\bin\Debug\NUnitTestProject1.dll"
or, for older NUnit 2
"%ProgramFiles(x86)%\NUnit 2.6.4\bin \nunit-console.exe /result=NUnitResults.xml "NUnitTestProject1\bin\Debug\NUnitTestProject1.dll"
同时, VSTS 扩展文档中的“分析 .NET 解决方案”中解释了一种解决方法:在“附加属性”文本区域中,添加以下属性:
sonar.cs.vscoveragexml.reportsPaths=**/*.coveragexml
- 2 回答
- 0 关注
- 200 浏览
添加回答
举报