Visual Studio 2015代码覆盖率结果计算逻辑。 [英] Visual studio 2015 code coverage result calculation logic.

查看:262
本文介绍了Visual Studio 2015代码覆盖率结果计算逻辑。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


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


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




问候,


MM










解决方案

嗨MM,


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


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


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


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


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


我之前遇到的类似线程:


https://social.msdn.microsoft.com/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 studio code 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 studio code 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:

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

A similar thread I met before:

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

Best Regards,

Jack


这篇关于Visual Studio 2015代码覆盖率结果计算逻辑。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆