简体   繁体   English

如何使用OpenCover插件Visual Studio 2010

[英]How to use OpenCover plugin Visual Studio 2010

I tried to generate code coverage xml file. 我试图生成代码覆盖率的xml文件。 but i failed 但是我失败了

after adding the Nuget packages and enabled Nuget Package Restore on the solution. 在添加Nuget软件包并在解决方案上启用Nuget软件包还原后。 then open cmd and run this command .\\packages\\OpenCover.4.5.1604\\OpenCover.Console.exe^ -register:user^ -target:MSTest.exe^ -targetargs:"/noresults /noisolation /testcontainer:..\\releases\\Latest\\NET40\\MonitoredUndoTests.dll"^ -filter:+[ ] ^ -output:.\\report\\output.xml 然后打开cmd并运行此命令。\\ packages \\ OpenCover.4.5.1604 \\ OpenCover.Console.exe ^ -register:user ^ -target:MSTest.exe ^ -targetargs:“ / noresults / noisolation /testcontainer:..\\releases \\ Latest \\ NET40 \\ MonitoredUndoTests.dll“ ^ -filter:+ [ ] ^ -output:。\\ report \\ output.xml

but always generate an error 但总是会产生错误

You should try following link that worked for me. 您应该尝试使用对我有用的链接。 It says Gallio error but it is using OpenCover to run the coverage. 它显示Gallio错误,但它正在使用OpenCover运行coverage。 I was using Gallio with Sonar and running OpenCover and using these steps fixed my issue. 我在Sonar中使用Gallio并运行OpenCover,并使用这些步骤解决了我的问题。

Gallio error : MSTest executable was not found Gallio错误:找不到MSTest可执行文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM