Opencover 可以与 TypeMock 隔离器一起使用吗?
我正在寻找一个 .NET 覆盖工具,并且一直在尝试 PartCover,但取得了不同程度的成功。 我看到 OpenCover 旨在取代 PartCover,但到目前为止我无法将它与 TypeMock Isolator 链接起来,所以我嘲笑-收集覆盖信息时测试通过。
我尝试复制 Partcover 的设置,但没有定义与 Isolator 的“link”参数配合使用的配置文件名称。认为 OpenCover 是基于 Partcover 的,我尝试告诉 Isolator 与 Partcover 链接,它没有抱怨(我仍然安装了 Partcover),但链接不起作用 - Isolator 认为它不存在。
我是不是少了一步?有解决方法吗?或者我必须等待与 OpenCover 友好的 Isolator 版本吗?
I'm looking for a .NET coverage tool, and had been trying out PartCover, with mixed success.
I see that OpenCover is intended to replace PartCover, but I've so far been unable to link it with TypeMock Isolator so my mocked-out tests pass while gathering coverage info.
I tried replicating my setup for Partcover, but there's no defined profilename that works with the "link" argument for Isolator. Thinking that OpenCover was based on Partcover, I tried to tell Isolator to link with Partcover, and it didn't complain (I still had Partcover installed), but the linking didn't work - Isolator thought it wasn't present.
Am I missing a step? Is there a workaround? Or must I wait for an Isolator version that is friends with OpenCover?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
注意:我在 Typemock 工作,
我稍微研究了一下配置,并设法让 OpenCover 与 Isolator 很好地运行。在我们添加官方支持之前,您可以采取以下措施使它们协同工作:
runsvr32 OpenCover.Profiler.dll
注册 OpenCover profiler(您需要管理员访问权限)。typemockconfig.xml
,它应该位于您的安装目录下,通常是C:\Program Files (x86)\Typemock\Isolator\6.0
。上方添加以下条目:
保存文件,您现在将在 Typemock 配置实用程序中看到一个名为 OpenCover 的新条目。按“链接”按钮将它们链接起来。您现在可以使用
OpenCover.Console.exe
和 Isolator 运行测试。例如,以下是如何使用 MSTest 运行测试:使用
TMockRunner -link
(即后期链接)运行此程序仍然存在一个小问题。我需要在工作中进一步研究它。希望有帮助。
Note: I work at Typemock
I poked around with the configuration a little bit and managed to get OpenCover to run nicely with Isolator. Here's what you can do to make them work together, until we add official support:
runsvr32 OpenCover.Profiler.dll
(you will need an Administrator's access for this).typemockconfig.xml
, it should be under your installation directory, typicallyC:\Program Files (x86)\Typemock\Isolator\6.0
.</ProfilerList>
:Save the file, you will now have a new entry in the Typemock Configuration utility, called OpenCover. Press the Link button to link them. You will now be able to run your tests using
OpenCover.Console.exe
and Isolator. For example, here's how to run your tests with MSTest:There is still a minor issue running this with
TMockRunner -link
(that is, with late linking). I will need to look at it further at work.Hope that helps.