- 语句覆盖(Statement Coverage)
- 又称行覆盖(Line Coverage),段覆盖(Segment Coverage),基本块覆盖(Basic Block Coverage)
- 这是最常用也是最常见的一种覆盖方式,就是度量被测代码中每个可执行语句是否被执行到了
- 这里说的是“可执行语句”,因此就不会包括像C++的头文件声明,代码注释,空行,等等
- 语句覆盖常常被人指责为“最弱的覆盖”,它只管覆盖代码中的执行语句,却不考虑各种分支的组合等等
- 简言之,语句覆盖,就是设计若干个测试用例,运行被测程序,使得每一可执行语句至少执行一次。这里的“若干个”,意味着使用测试用例越少越好
- 语句覆盖率 = 被测试到的语句数量 / 可执行的语句总数 x 100%
- 判定覆盖(Decision Coverage)
- 又称为分支覆盖(Branch Coverage)
- 所谓判定覆盖,就是设计若干个测试用例,运行被测程序,使得程序中每个判定的取真分支和取假分支至少被测试一次
- 【优点】:判定覆盖具有比语句覆盖更强的测试能力,而且具有和语句覆盖一样的简单性,无需细分每个判定就可以得到测试用例
- 【缺点】:往往大部分的判定语句是由多个逻辑条件组合而成(如,判定语句中包含AND、OR、CASE),若仅仅判断其整个最终结果,而忽略每个条件的取值情况,必然会遗漏部分测试路径
- 修订的条件/判定覆盖(Modified Condition/Decision Coverage)
- M
详细解决方案
语句覆盖(Statement Coverage)|判定覆盖(Decision Coverage)|修订的条件/判定覆盖(Modified Condition/Decision Coverage)
热度:51 发布时间:2024-01-16 21:42:32.0
相关解决方案
- 关于java.sql.Statement.executeUpdate()的返回值,该怎么处理
- spring+ibatis下报错:There is no statement named selectSQL in this SqlMap,该怎么解决
- 460:Statement length exceeds maximum.解决方案
- 460:Statement length exceeds maximum.该如何解决
- Informatica 学习心得一: Defining a Link Condition
- statement、prepareStatement、callableStatement的运用
- ETag 跟 Last-Modified 的区别
- http协议-缓存统制:etag If-None-Match / Last-Modified If-Modified-Since
- 图片缓存:浏览器刷新 跟 304 Not Modified 与 If-Modified-Since 及 Cache-Control
- SSI中报错 com.ibatis.sql地图.client.SqlMapException: There is no statement named XXX
- 纳闷:ResultSet.close()后,生成 ResultSet 对象的 Statement 对象和 Connection 对象不调用close,连接池会继续占用吗
- 不封闭ResultSet、Statement,只关闭Connection对程序是否有影响
- Statement.executeUpdate不能在while(RestleSet.next())里面使用?碰到个奇怪有关问题
- Statement stmt = Conn.createStatement(1004,1007);解决方案
- Vector、Connection、Statement、abstractTableModel,该如何处理
- spring+ibatis下出错:There is no statement named selectSQL in this SqlMap
- Eclipse 用ant生成junit测试的 coverage report解决办法
- Statement 中的executeUpdate如果执行的是DDL语句出错信息如何返回
- 编辑jsp时候出现的异常cannot convert from java.sql.Statement to java.beans.Statement
- The server encountered an unexpected condition which prevented it from fulfillin,该如何处理
- EXT JS if(store.modified.indexOf(p) == -1)什么意思,该怎么解决
- Ibatis学习小结5-动态 Mapped Statement
- 施行存储过程出现ORA-00900:invalid SQL statement
- 数据库连接的 statement 对象生成后,但在两个不同的小模块中,怎么调用
- coverage 覆盖率解决思路
- unreachable statement ?
- sqlserver2008R2 增添数据 not allowed within multi-statement transaction
- Message was modified.该怎么解决
- Mysql之存储过程异常:ERROR 1337 (42000): Variable or condition declaration after cursor
- No label 'label_0' within the scope of the GoTo statement,该怎么解决