欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    实践白盒测试之逻辑覆盖案例.pptx

    • 资源ID:77818964       资源大小:260.61KB        全文页数:37页
    • 资源格式: PPTX        下载积分:20金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要20金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    实践白盒测试之逻辑覆盖案例.pptx

    实践白盒测试之逻辑覆盖案例实践白盒测试之逻辑覆盖案例例子程序:if(a1)&(b=0)x=x/a;if(a=2)|(x1)x=x+1;Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第1页/共36页程序框图(语句覆盖)(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdcEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第2页/共36页1.语句覆盖设计若干条测试用例,使程序中每条设计若干条测试用例,使程序中每条可执行语句至少执行一次。可执行语句至少执行一次。用例ABX执行路径Case1aceCase2abe语句覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第3页/共36页1.语句覆盖设计若干条测试用例,使程序中每条设计若干条测试用例,使程序中每条可执行语句至少执行一次。可执行语句至少执行一次。用例ABX执行路径Case1203aceCase2213abe语句覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第4页/共36页Case1:A=2,B=0,X=3(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdc语句覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第5页/共36页Case2:A=2,B=1,X=3(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdc此语句未覆盖此语句未覆盖语句覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第6页/共36页Case1:A=2,B=0,X=3(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdc错写成错写成OR错写成错写成AND语句覆盖是最弱的覆盖语句覆盖是最弱的覆盖语句覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第7页/共36页程序框图(判定覆盖)(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdcEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第8页/共36页 2.判定覆盖(分支覆盖)设计测试用例,使程序中的每个逻辑设计测试用例,使程序中的每个逻辑判断的取真和取假的分支至少经历一判断的取真和取假的分支至少经历一次。次。用例ABX执行路径Case1aceCase3abdEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第9页/共36页 2.判定覆盖(分支覆盖)设计测试用例,使程序中的每个逻辑设计测试用例,使程序中的每个逻辑判断的取真和取假的分支至少经历一判断的取真和取假的分支至少经历一次。次。用例ABX执行路径Case1203aceCase3101abdEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第10页/共36页第一组:Case1:A=2,B=0,X=3(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdc判定覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第11页/共36页第二组:Case3:A=1,B=0,X=1(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdc判定覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第12页/共36页n n 只作到判定覆盖将无法确定只作到判定覆盖将无法确定判定内部条件的错误。判定内部条件的错误。(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdc错写成错写成X1)AND(B=0)(A=2)OR(X1)X=X/AX=X+1eFFTTbdc错写成错写成X1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdcEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第15页/共36页3.条件覆盖设计若干测试用例,使程序的设计若干测试用例,使程序的每个判每个判定中的每个条件定中的每个条件的可能取值至少满足的可能取值至少满足一次一次上例中设条件:上例中设条件:A1 T1 A1 T1 F1 F1 B=0 T2 B=0 T2 F2F2 A=2 T3 A=2 T3 F3F3 X1 T4 X1 T4 F4F4取真表为取真表为取假表为取假表为Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第16页/共36页n n满足条件覆盖的一组测试用例满足条件覆盖的一组测试用例A B X路径覆盖分支覆盖条件Case6T1 F2 T3 F4Case7F1 T2 F3 T43.3.条件覆盖条件覆盖条件覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第17页/共36页n n满足条件覆盖的一组测试用例满足条件覆盖的一组测试用例A B X路径覆盖分支覆盖条件Case6 2 1 1a b eb eT1 F2 T3 F4Case7 1 0 3a b eb eF1 T2 F3 T43.3.条件覆盖条件覆盖条件覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第18页/共36页 Case6Case6:A=2,B=1,X=1A=2,B=1,X=1 Case7Case7:A=1,B=0,X=3A=1,B=0,X=3(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdc 两个测试用例覆盖了四个条件八种可能取值。两个测试用例覆盖了四个条件八种可能取值。但未覆盖但未覆盖c c、d d分支,不满足判定覆盖的要求。分支,不满足判定覆盖的要求。条件覆盖Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第19页/共36页程序框图(判定条件覆盖)(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdcEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第20页/共36页4.判定-条件覆盖使判定中使判定中每个条件每个条件的可能取值至少满的可能取值至少满足一次,并且使足一次,并且使每个判定分支每个判定分支至少执至少执行一次。行一次。判定判定-条件覆盖能同时满足条件覆盖能同时满足判定判定判定判定、条件条件条件条件两种覆盖标准。两种覆盖标准。Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第21页/共36页满足判定满足判定-条件覆盖的一组测试用例条件覆盖的一组测试用例A B X路径覆盖分支覆盖条件Case1c eT1 T2 T3 T4Case8b dF1 F2 F3 F4Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第22页/共36页满足判定满足判定-条件覆盖的一组测试用例条件覆盖的一组测试用例A B X路径覆盖分支覆盖条件Case12 0 3a c ec eT1 T2 T3 T4Case81 1 1a b db dF1 F2 F3 F4Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第23页/共36页(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdcCase1:A=2,B=0,X=3Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第24页/共36页Case8:A=1,B=1,X=1(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdcEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第25页/共36页程序框图(条件组合覆盖)(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdcEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第26页/共36页5.条件组合覆盖设计用例,使得每个判断表达式中设计用例,使得每个判断表达式中条条件的各种可能组合件的各种可能组合都至少出现一次;都至少出现一次;Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第27页/共36页n上例中需考虑4个条件的8种组合 A 1,B=0 T1 T2 判定一为真 A 1,B0 T1 F2 A1,B=0 F1 T2 判定一为假 A1,B0 F1 F2 A=2,X 1 T3 T4 A=2,X1 T3 F4 判定二为真 A2,X1 F3 T4 A2,X1 F3 F4 判定二为假Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第28页/共36页满足条件组合覆盖的一组测试用例满足条件组合覆盖的一组测试用例A B X路径 覆盖组号 覆盖条件Case1T1 T2 T3 T4Case8T1 F2 T3 F4Case9F1 T2 F3 T4Case10F1 F2 F3 F4Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第29页/共36页满足条件组合覆盖的一组测试用例满足条件组合覆盖的一组测试用例A B X路径 覆盖组号 覆盖条件Case12 0 3a c eT1 T2 T3 T4Case82 1 1a b e T1 F2 T3 F4Case91 0 3a b e F1 T2 F3 T4Case101 1 1a b d F1 F2 F3 F4Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第30页/共36页程序框图(路径覆盖)(A1)AND(B=0)(A=2)OR(X1)aX=X/AX=X+1eFFTTbdcEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第31页/共36页6.路径覆盖设计足够多的测试用例,覆盖程序中设计足够多的测试用例,覆盖程序中的的每条可能路径每条可能路径。上述满足条件组合覆盖的测试用例不上述满足条件组合覆盖的测试用例不能覆盖路径能覆盖路径acdacd。Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第32页/共36页满足路径覆盖的一组测试用例满足路径覆盖的一组测试用例用例用例ABX执行路径执行路径Case1aceCase7abdCase8abeCase11acdEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第33页/共36页满足路径覆盖的一组测试用例满足路径覆盖的一组测试用例用例用例ABX执行路径执行路径Case1203aceCase7101abdCase8211abeCase11301acdEvaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第34页/共36页Evaluation only.Evaluation only.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Created with Aspose.Slides for.NET 3.5 Client Profile 5.2.0.0.Copyright 2004-2011 Aspose Pty Ltd.Copyright 2004-2011 Aspose Pty Ltd.第35页/共36页感谢您的观看。感谢您的观看。第36页/共36页

    注意事项

    本文(实践白盒测试之逻辑覆盖案例.pptx)为本站会员(一***)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开