首页 > Web开发 > 详细

上传NUnit的单元测试结果和OpenCover的单元测试覆盖率到SonarQube服务中

时间:2018-12-18 18:48:26      阅读:285      评论:0      收藏:0      [点我收藏+]
SonarQube.Scanner.MSBuild.exe begin /k:"OMDCCQuotes" /d:sonar.host.url="http://myip:9000" /d:sonar.login="mykey" /d:sonar.cs.nunit.reportsPaths="%CD%\TestResult.xml" /d:sonar.cs.opencover.reportsPaths="%CD%\opencover.xml"


MsBuild.exe OMDCCQuotes.sln /t:Rebuild


"packages\OpenCover.4.6.519\tools\OpenCover.Console.exe" -output:"%CD%\opencover.xml" -register:user -target:"packages\NUnit.ConsoleRunner.3.9.0\tools\nunit3-console.exe" -targetargs:"OMDCCQuotes.Tests.Unit\bin\Debug\OMDCCQuotes.Tests.Unit.dll"


SonarQube.Scanner.MSBuild.exe end /d:sonar.login="mykey"

 

在项目中要安装好NUnit.ConsoleRunner和OpenCover nuget包。并且在path中添加MSBuild.exe和SonarQube.Scanner.MSBuild.exe的路径。

上传NUnit的单元测试结果和OpenCover的单元测试覆盖率到SonarQube服务中

原文:https://www.cnblogs.com/Martianhh/p/10138690.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!