(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. HTML 颜色

    HTML 颜色 HTML 颜色由红色.绿色.蓝色混合而成. 颜色值 HTML 颜色由一个十六进制符号来定义,这个符号由红色.绿色和蓝色的值组成(RGB). 种颜色的最小值是0(十六进制:#00).最大 ...

  2. 删除SVN文件 Delete SVN Folders.reg

    批量删除文件夹里的SVN 文件 ------------------------------------------------------------------------------------ ...

  3. SQL,SP与ORM

    SQL译为按每一次情况的办理,SP意为存储过程,ORM就是对象-关系映射,比如Hibernate 一,演变  刚开始的时候,只有sql语句,即可以用交互模式一句一句执行, 也可以用批模式执行,多行sq ...

  4. SVG六基本元素

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  5. hadoop在windows下安装运行

    1.下载windows环境下编译的hadoop-2.7.2.x64win.zip 2.解压至D:\BigData\hadoop-2.7.2 3.修改D:\BigData\hadoop-2.7.2\et ...

  6. 从php到浏览器的缓存机制,不得不看!

    所有的php程序员都知道在php脚本里面执行 echo "1";访客的浏览器里面就会显示"1". 但是我们执行下面的代码的时候,并不是显示"1&quo ...

  7. Java性能优化_转载

    一.避免在循环条件中使用复杂表达式 1.在不做编译优化的情况下,在循环中,循环条件会被反复计算,如果不使用复杂表达式,而使循环条件值不变的话,程序将会运行的更快. 2.不可使用多层循嵌套. 二.集合大 ...

  8. hushset的实现原理

    实现源码 public HashSet() { map = new HashMap<>(); } 这里可以看见当我们new一个hashset时,实际上hashset类又创建了一个hashm ...

  9. 读书笔记 effective c++ Item 6 如果你不想使用编译器自动生成的函数,你需要明确拒绝

    问题描述-阻止对象的拷贝 现实生活中的房产中介卖房子,一个服务于这个中介的软件系统很自然的会有一个表示要被销售的房屋的类: class HomeForSale { ... }; 每个房产中介会立刻指出 ...

  10. 图片上传裁剪zyupload

    图片上传控件用的是zyupload控件,使用过程中遇到了一些问题,特别记录下来 上图是目前的使用效果,这个控件我是用js代码动态添加出来的 HTML代码: <div class="wi ...