Visual Studio 2015代码覆盖率结果计算逻辑。

编程入门 行业动态 更新时间:2024-10-10 03:26:29
本文介绍了Visual Studio 2015代码覆盖率结果计算逻辑。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好,

我们是视觉工作室代码覆盖率计算的新手。我们得到的代码覆盖率结果显示实用程序类的方法覆盖了86%,因为它显示了41%,30%和0的测试类方法。

我们需要知道视觉工作室的计算逻辑代码覆盖率。

问候,

MM

解决方案

嗨MM,

您是否使用VS测试功能从测试资源管理器窗口获取代码覆盖率?

>>我们需要知道visual studio代码覆盖率的计算逻辑。

我知道真正的代码覆盖率不是代码行,它收集了IL语言的编码覆盖率。

当然,您可以从官方网站获取一些信息:

msdn.microsoft/en-us/library/cc667391(v = vs.100).aspx

我之前遇到的类似线程:

social.msdn.microsoft/Forums/en-US/06e6a40d-32d8-4b92-a5f8 -23be3f1a1b0a /无法覆盖所有代码与单元测试?forum = vsunittest

最好的问候,

杰克

Hi All,

We are new in visual studio code coverage calculation. We are getting result of code coverage showing 86% covered for the methods of utility classes where as it is showing 41%, 30% and 0  for test classes methods.

We need to know the calculation logic for visual studiocode coverage.

Regards,

MM

解决方案

Hi MM,

Do you use the VS test feature to get the code coverage from the test explorer window?

>>We need to know the calculation logic for visual studiocode coverage.

What I know that the real code coverage was not the code line, it collected the coded coverage for the IL language.

Of course, you could get some information from the official site here:

msdn.microsoft/en-us/library/cc667391(v=vs.100).aspx

A similar thread I met before:

social.msdn.microsoft/Forums/en-US/06e6a40d-32d8-4b92-a5f8-23be3f1a1b0a/unable-to-cover-all-code-with-unit-tests?forum=vsunittest

Best Regards,

Jack

更多推荐

Visual Studio 2015代码覆盖率结果计算逻辑。

本文发布于:2023-10-19 17:28:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1508250.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:覆盖率   逻辑   代码   Visual   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!