2

我们目前正在使用带有 Nunit 和 Opencover 的 Sonarqube 4.5.7(SonarQube Scanner for MSBuild 2.1)。测试执行成功,仪表板中正确报告了指标。但声纳仪表板中的覆盖部分为空白,覆盖 xml 为我的应用程序模块显示“Module skippedDueTo="MissingPdb"”

以下是我在 Jenkins 中使用的配置

"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" sample\app.sln /t:Rebuild /p:Configuration=Debug
"C:\Program Files (x86)\OpenCover\OpenCover.Console.exe" -register:user -targetdir:"…\sample\app.Tests\app.Correction\bin\Debug" -target:"C:\Program Files (x86)\NUnit 2.6.4\bin\nunit-console.exe" -targetargs:" …\sample\app.Tests\app.Correction\bin\Debug \app.dll /nologo /noshadow" -output:coverage.report.xml
4

1 回答 1

1

最后我们找到了解决这个问题的方法。在这种情况下确实是引号的问题,包装了完整的targetargs,如下所示修复了问题

“-targetargs:…\sample\app.Tests\app.Correction\bin\Debug\app.dll /nologo /noshadow”

于 2017-02-20T12:09:41.073 回答