Problem 1

1. The fault is i > 0, it should be  i >= 0, because if the case is x = [0], y= 0, we expect = 1, but actually, we get -1;

2.  test: x = [], y = 1 does not execute the fault;

3.  test: x = [1,2,3], y = 3 executes the fault, but does not result in an error state;

4.  test: x = [1,2,3], y = 4 results in an error, but not a failure;

Problem 2

1. The fault is for (int i = 0; i < x.length; i++), it should be  for (int i = x.length-1; i >=0; i--), because it just find the fist zero;

2.  test: x = [] does not execute the fault;

3.  test: x = [0] executes the fault, but does not result in an error state;

4.  test: x = [1,2,0] results in an error, but not a failure;

Software Testing Techniques Homework 2的更多相关文章

  1. Software Testing Techniques Homework 3

    1. a.This is the chart b. initial numPrimes = 4, t1 would over the loop. c. t = ( n = 1) d. node cov ...

  2. Software Testing Techniques Homework 1

    I have met some errors in recent years, one of them which impress me most. It happend when I try to ...

  3. Software Testing Techniques LAB 02: Selenium

    1. Installing 1. Install firefox 38.5.1 2. Install SeleniumIDE    After installing, I set the view o ...

  4. Software Testing Techniques LAB 01: test Junit and Eclemma

    1. Installing  1. Install Junit and hamcrest First, I download the Junit-4.12.jar and hamcrest-core- ...

  5. 读书笔记-Software Testing(By Ron Patton)

    Software Testing Part I:The Big Picture 1.Software Testing Background Bug's formal definition 1.The ...

  6. Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques

    Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques Jan 04, 2017, Vers ...

  7. 101+ Manual and Automation Software Testing Interview Questions and Answers

    101+ Manual and Automation Software Testing Interview Questions and Answers http://www.softwaretesti ...

  8. Exploratory Software Testing

    最近找到去年上半年看过一本关于测试方面书籍的总结笔记,一直放在我的个人U盘里,当时是用Xmind记录的,现在重新整理下分享给大家了! James A.Whittaker [美] 詹姆斯·惠特克(软件测 ...

  9. 软件测试software testing summarize

    软件测试(英语:software testing),描述一种用来促进鉴定软件的正确性.完整性.安全性和质量的过程.软件测试的经典定义是:在规定的条件下对程序进行操作,以发现程序错误,衡量软件质量,并对 ...

随机推荐

  1. PHP操作sqlserver乱码解决

    将捕获的参数编码转换为GB2312即可 function ($string){ returen iconv("UFT-8","GB2312//IGNORE",$ ...

  2. 【文档】一、Mysql Binlog概述

    Binlog是一系列日志文件,他们包含的内容是Mysql数据内容的改变.如果想开启binlog功能,需要在启动时带上--log-bin参数. binlog是从Mysql3.23.14版本开始的.它包含 ...

  3. ubuntu下安装h2数据库

    1.下载h2数据库安装包 http://www.h2database.com/html/download.html 2.解压安装文件包到指定目录 3.运行sh文件 4.访问web地址: http:// ...

  4. MYSQL 本地无ROOT权限 忘记密码

    打开CMD窗口 net stop mysql //停止MYSQL mysqld  -nt  --skip-grant-tables //跳过密码检测. mysqld.exe在Bin目录下 然后另外新打 ...

  5. 时间格式为yyyymmdd的String类型的时间,计算时间间隔有错误

    时间格式类型为yyyymmdd,并且为String类型,计算时间间隔有误,一直搞不清楚是什么原因.网上百度了许多,时间格式基本都是yyyy-mm-dd这样的时间格式的,但是yyyymmdd这样的时间格 ...

  6. Spring中使用JMS

    JMS为了Java开发人员与消息代理(message broker)交互和收发消息提供了一套标准API.而且,由于每个message broker都支持JMS,所以我们就不需要学习额外的消息API了. ...

  7. Response.cookies和Request.cookies

    Response.cookies和Request.cookies的区别很重要,由于方法基本都是差不多的,特别对于初学者而言,很容易出现混淆. 简单说就是创建cookie用response,获取cook ...

  8. IE8实现媒体查询

    IE8实现媒体查询 实现IE8引用样式 <!--[if IE 8]> 仅IE8可识别 <style> @import "Index.css"; } < ...

  9. android FrameLayout

    FrameLayout:帧布局,可以显示图片的动画效果 前景图像: 永远处于帧布局最顶的,直接面对用户的图像,,就是不会被覆盖的图片 常用属性: android:foreground:设置该帧布局容器 ...

  10. Spring扩展:Spring框架的由来

    一.Spring框架的由来