Partcover 和 Typemock 集成

发布于 2024-08-12 00:32:41 字数 508 浏览 9 评论 0原文

我想知道是否有人对如何集成 typemock 和 partcover 有一些想法。

我们在基于 c# sharepoint 的应用程序中使用 typemock 进行单元测试,我们希望通过 partcover 运行它们并能够查看覆盖率详细信息。

我已经能够通过 partcover 运行 typemock 测试,但是,partcover 无法显示已测试代码的覆盖详细信息?

我通过partcover运行测试的方法是让Partcover运行Typemock运行器,然后Typemock运行器运行MSTest。

我的partcover浏览器设置如下:

可执行文件:*类型模拟的路径*\TMockRunner.exe

工作目录:*已存在的文件夹*

工作参数:*MSTest 的路径*\MSTest.exe /noisolation /testcontainer:*DLL 的路径*

任何想法都很棒,尤其是关于partcover如何检索覆盖范围详细信息的想法。

谢谢。

I was wondering if someone has some ideas about how to integrate typemock and partcover.

We have unit tests which use typemock in our c# sharepoint based application and we would like to run them via partcover and be able to see the coverage details.

I have been able to run the typemock tests via partcover, however, partcover is not able to display the coveraged details for the code that was tested?

The way I have gotten the tests to run via partcover is to make Partcover run the Typemock runner which in turn runs MSTest.

My partcover browser settings are as follows:

ExecutableFile: *Path to typemock*\TMockRunner.exe

Working Directory: *A folder that already exists*

Working Arguments: *Path to MSTest*\MSTest.exe /noisolation /testcontainer:*Path to DLL*

Any ideas would be great especially on how partcover retrieves coverage details.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

寄居人 2024-08-19 00:32:41

对于任何感兴趣的人来说,Typemock 目前不支持 Partcover。不过,看起来 Typemock 的未来版本将支持零件覆盖。

http://www.typemock.com/community/viewtopic.php?t=第762章

For anyone that is interested, partcover is currently not supported by Typemock. Hovever, it looks like Part cover will be supported in future releases of Typemock.

http://www.typemock.com/community/viewtopic.php?t=762

清晰传感 2024-08-19 00:32:41

您可以尝试这个链接:
Typemock 和代码覆盖工具 。我对 PartCover gui 没有任何运气,所以我将尝试命令行。

更新:我的 GUI 可以工作了。

  1. 步骤 1. 启用 typemock
    通过链接它们来覆盖部分。这样做
    通过 Typemock 配置
  2. 步骤 2. 在 Partcover 浏览器中的“运行目标设置”下,
    exe 文件应该是测试运行程序,位于
    我的情况,mstest.exe 步骤 3. 工作目录的路径
  3. 最有可能
    你的测试 .dll 所在的位置
    依赖关系,比方说
    c:\myproject\unittests\bin\Debug
  4. 步骤 4.工作参数:这些用于
    mstest 、 /testcontainer:foo.test.dll
  5. 步骤 5. 至少放入 1 条规则:
    +[MyNamespace.MyAssemblyName]* ,运行后的规则部分

,您可以看到代码覆盖率,并且如果链接正确,typemock 测试加载器将自动加载。不要忘记在partcover浏览器中转到

  • “视图->查看覆盖率详细信息”来查看
    源代码。

You can try this link:
Typemock and Code coverage tools . I haven't had any luck with the PartCover gui so I will try the command line.

update: I got the GUI working.

  1. step 1. enable typemock with
    partcover via linking them. do this
    through typemock configuration
  2. step 2. under 'run target settings' in Partcover Browser,
    exe file should be test runner, in
    my case, the path to mstest.exe
  3. step 3. working dir is most likely
    where your test .dll lives w/ it's
    dependencies, let's say
    c:\myproject\unittests\bin\Debug
  4. step 4. working args : these are for
    mstest , /testcontainer:foo.test.dll
  5. step 5. put at least 1 rule in:
    +[MyNamespace.MyAssemblyName]* , the rules section

after that runs, you can see your code coverage, and typemock test loader will automatically load, if you linked it correctly. don't forget in partcover browser to go to

  • 'Views->View coverage details' to see
    the source code.
晨曦÷微暖 2024-08-19 00:32:41

Typemock Isolator 的最新版本 (5.4.5) 支持 Partcover。

The last version of Typemock Isolator (5.4.5)supports Partcover.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文