Intellitest代码覆盖率

时间:2016-05-06 07:33:00

标签: intellitest

我使用Intellitest 2015进行数据驱动测试。我的方法有两个参数 MethodA(List类,字符串sourceType)。当我运行intellitest时,框架传递任意参数,如控制字符(“\ u0007”,“\ u0008”,“\ a”等等)。我通过在方法的顶部添加条件语句来阻止这些字符串。我的问题是,当我单独检查每个特殊字符时,块执行和运行的次数更多,即(39/87),但是当我在string []数组中添加这些并且一次性检查所有执行的块数时逐渐减少(18/87)。如何在此处实现最大代码块执行。任何人都可以帮我吗?

1 个答案:

答案 0 :(得分:1)

您所看到的是动态代码覆盖率(https://msdn.microsoft.com/library/vs/alm/test/developer-testing/intellitest-manual/input-generation#dynamic-code-coverage)。

请查看以下在真实应用程序中应用IntelliTest以实现全面覆盖的示例:https://blogs.msdn.microsoft.com/visualstudioalm/2015/08/14/intellitest-hands-on/

相关问题