(1)  Identify the fault : The first element of the array is not looped.

“for(int i=x.length-1;i>0;i--)”should be “for(int i=x.length-1;i>=0;i--)”

(2)  If possible, identify a test case that does not execute the fault. ( Reachability ): x = null ,y = 3

expected output:NullPointerException

Actual output:NullPointerException

(3)  If possible, identify a test case that executes the fault, but does

not result in an error state. : x = [2,3,5],y = 3

Expected output : 1

Actual output : 1

(4)  If possible identify a test case that results in an error, but not

a failure.:  x = [2,3,5],y = 1

Expected output : -1

Actual output : -1

(1)Identify the fault : The loop is reversed.

“for(int i = 0 ; i < x.length ; i++)”should be “for(int i = x.length-1 ; i >= 0 ; i--)”

(2)The fault will always be there.

(3)If possible, identify a test case that executes the fault, but does

not result in an error state. : x = [0,1,2]

Expected output : 1

Actual output : 1

(3)  If possible identify a test case that results in an error, but not

a failure.:  x = [1,1,1]

Expected output : -1

Actual output : -1

软件测试之fault、error和failure的理解的更多相关文章

  1. 结对编程之Fault、Error、Failure

    1.结对说明 结对对象:刘世麟  博客地址:http://www.cnblogs.com/liushilin/ 双方贡献:1:1 2.题目要求  构造程序,分别是:         •不能触发Faul ...

  2. 结对编程——关于Fault、Error、Failure程序设计

    一.问题描述:         构造程序,分别是:         •不能触发Fault         •触发Fault,但是不能触发Error         •触发Error,但是不能产生Fai ...

  3. 结对编程--fault,error,failure

    结对编程对象:叶小娟 对方博客地址:http://www.cnblogs.com/yxj63/ 双方贡献比例:1:1 结对照片: 结对题目:输入一定个数的数字,对其排序后输出最大值.   1 pack ...

  4. 《Google软件测试之道》

    Google软件测试之道 Google对质量的理解 质量不等于测试,即质量不是被测出来的 开发和测试应该并肩齐驱,测试就是开发过程中不可缺少的一部分 质量是一种预防行为而不是检测 Google对软件测 ...

  5. 结对项目——fault,error,failure的程序设计

    一.结对编程内容: 1.不能触发Fault. 2.触发Fault,但是不触发Error. 3.触发Error,但不触发Failure. 二.结对编程人员 1.周宗耀.周浩: 2.结对截图: 三.结对项 ...

  6. 通过本地yum源安装软件报错[Errno 14] PYCURL ERROR 56 - "Failure when receiving data from the peer"

    通过本地yum源安装软件报错 http://192.168.3.85/centos/6/os/x86_64/Packages/php-pdo-5.3.3-47.el6.x86_64.rpm: [Err ...

  7. 结对编程学习fault、error、failure三种状态

    点滴成就 学习时间 新编写代码行数 博客量(篇) 学习知识点 第一周 10小时 0 0 了解软件工程 第二周 10小时 0 1 项目开题 第三周 15小时 0 1 开通博客.开展项目调查 第四周 20 ...

  8. 软件测试中的fault,error,failure

    问题:给定两段代码,设计fault,error,failure的测试用例. fault:即引起错误的原因,类似病因. error:类似疾病引起的内部结果. failure:类似疾病引起的症状. 代码1 ...

  9. 《Google 软件测试之道》摘录

    最近刚刚看完<Google 软件测试之道>,受益颇多,遂记录下: 只有在软件产品变得重要的时候质量才显得重要 第一章:谷歌软件测试介绍 角色介绍 SWE(Software Engineer ...

随机推荐

  1. shell 命令合并文本

    之前想把代码打印出来看来着,后来合并完之后放在word里发现有2000多页,然后放弃了~anyway,这个命令还是挺有用的. 比如我有文本a001.dat, a002.dat, a003.dat .. ...

  2. Servlet 获取IllegelStateException

    Servlet 获取IllegelStateException: response提交之后,进行requestDispatcher.forwar(),会产生这样的问题: 但是必须是outputStre ...

  3. 马丁 福勒 Martin Fowler 关于依赖注入和反转控制的区别

    马丁 福勒 Martin Fowler 关于依赖注入和反转控制的区别 http://martinfowler.com/articles/injection.html 中文翻译:http://files ...

  4. 第七届蓝桥杯javaB组真题解析-凑算式(第三题)

    题目 /* 凑算式 B DEF A + --- + ------- = 10 C GHI (如果显示有问题,可以参见[图1.jpg]) 这个算式中A~I代表1~9的数字,不同的字母代表不同的数字. 比 ...

  5. PS切图篇(一)---界面设置

    #工作区设置 四大主要面板:信息 字符  图层 历史记录 打开必要属性: 选择工具设置 选择图层的方式:ctrl+鼠标左击想选择的图层

  6. win10更新时遇到错误0x80070002的正确处理方法

    win10更新Flash Player.或者在  “启用或关闭windows功能” 经常出现提示错误0x80070002,这要怎么解决呢?这里介绍下正确的错误代码0x80070002解决办法. 严肃提 ...

  7. js小功能合集:计算指定时间距今多久、评论树核心代码、字符串替换和去除。

    1.计算指定时间距今多久 var date1=new Date('2017/02/08 17:00'); //开始时间 var date2=new Date(); //当前时间 var date3=d ...

  8. 三层——vb.net版

    经过不懈的努力,我的vb.net 版的三层登陆终于实现了.下面将我的成果向大家展示一下. 原则          vb.net的三层登陆跟C#的三层登陆的思想是一样的都是将系统分层--U层只负责与用户 ...

  9. python解释器的安装;python2与python3同时在环境变量中时的解决方案

    新文档 html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,addres ...

  10. 《半吊子全栈系列:Boostrap3》

    前言:后端开发做网站 几年前,作为一名纯粹后端Java开发人员,对JS还没开窍,对于页面只停留在<十天学会DIV+CSS>这种程度,但是我又想做网站怎么办? 这时候Boostrap3出现了 ...