- 1、本文档共73页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
08white2数据流覆盖
More Dataflow Terms and Definitions A path (either partial or complete) is simple if all edges within the path are distinct (i.e., different). A path is loop-free if all nodes within the path are distinct (i.e., different). Simple and Loop-Free Paths path Simple? Loop-free? 1,3,4,2 1,2,3,2 1,2,3,1,2 1,2,3,2,4 Simple and Loop-Free Paths (cont’d) Which is stronger, simple or loop-free? More Dataflow Terms and Definitions A path n1,n2,...,nj,nk is a du-path with respect to a variable v if v is defined at node n1 and either: there is a c-use of v at node nk and n1,n2,...,nj,nk is a def-clear simple path, or there is a p-use of v at edge nj,nk and n1,n2,...nj is a def-clear loop-free path. More Dataflow Terms and Definitions A path n1,n2,...,nj,nk is a du-path with respect to a variable v if v is defined at node n1 and either: there is a c-use of v at node nk and n1,n2,...,nj,nk is a def-clear simple path, or there is a p-use of v at edge nj,nk and n1,n2,...nj is a def-clear loop-free path. NOTE! Identifying du-paths du-pair path(s) du-path? X: (5,7) 5,6,7 ? 5,6,3,4,6,7 5,6,3,4,6,(3,4,6)*,7 X: (5,3,4) 5,6,3,4 5,6,3,4,(6,3,4)* X: (5,3,5) 5,6,3,5 5,6,3,4,6,3,5 ? 5,6,3,4,6,(3,4,6)*,3,5 ? ? infeasible Another Dataflow Test Coverage Criterion All-DU-Paths: for every program variable v, every du-path from every definition of v to every c-use and every p-use of v must be covered. Exercise Identify all c-uses and p-uses for variable Y in Example 2. For each c-use or p-use, identify (using the “ * ” notation) all def-clear paths. Identify whether or not each def-clear path is feasible, and whether or not it is a du-path. Summary of White-Box Coverage Relationships Path All du-paths All-Uses All-Defs Compound Condition Branch / Condition Basis Paths Loop Condition Statement Branch * * - nominal cases * White-Box Testing Techniques II Prepared by Stephen M. Thebaut, Ph.D. University of Florida Software Testing and Verification Lecture 8 Def-Clear Paths Subsum
文档评论(0)