简体   繁体   English

智能测试代码覆盖率

[英]Intellitest code coverage

I am using Intellitest 2015 to do data driven testing.我正在使用 Intellitetest 2015 进行数据驱动测试。 My method is having two parameter MethodA(List class, string sourceType).我的方法有两个参数 MethodA(List class, string sourceType)。 When I am running the intellitest, the framework is passing arbitrary arguments such as control characters("\","\","\\a" etc etc).当我运行智能测试时,框架会传递任意参数,例如控制字符(“\”、“\”、“\\a”等)。 I am preventing these strings by adding conditional statement at the top of my method.我通过在我的方法顶部添加条件语句来防止这些字符串。 My Question is that when I am checking each special characters individually the number of block execution and run is more ie(39/87) but when I am adding these in a string[] array and checking all in one shot the number of blocks executing is gradually decreasing(18/87).我的问题是,当我单独检查每个特殊字符时,块执行和运行的数量更多 ie(39/87) 但是当我将这些添加到 string[] 数组中并一次性检查所有块执行的数量时正在逐渐减少 (18/87)。 How can i achieve maximum code block execution here.我怎样才能在这里实现最大的代码块执行。 Can anyone help me on this?谁可以帮我这个事?

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

Please take a look at the following example of applying IntelliTest on a real world application to achieve full coverage: https://blogs.msdn.microsoft.com/visualstudioalm/2015/08/14/intellitest-hands-on/ .请查看以下在实际应用程序上应用 IntelliTest 以实现全面覆盖的示例: https : //blogs.msdn.microsoft.com/visualstudioalm/2015/08/14/intellitest-hands-on/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM