Software Testing Homework2

1、Software Faults, Errors & Failures

Software Fault :

A static defect in the software 

Error是指实际值偏离你最初的期望,往往是由人为造成的。

Software Failure : External, incorrect behavior with respect to the requirements or other description of the expected behavior

fault通常是由于程序中不正确的步骤,过程或者数据定义,导致程序出现了非故意的、不可预料的行为。fault通常是由error导致的。

Software Error : An incorrect internal state that is the manifestation of some fault

fault通常是由于程序中不正确的步骤,过程或者数据定义,导致程序出现了非故意的、不可预料的行为。fault通常是由error导致的。

一些人为的error,使得程序中产生了不正确的步骤、过程和数据定义,从而使程序出现了一些不可预料的fualt,这些 fault最终又致使系统或者组件不能完成了最初要求的功能,也就是failure。

2、Homework 2

作业内容:

 

 

 (1)the fault

1:i > 0, it should be i ≥ 0

2: it should search from end to start to get the index of the LAST 0.

for(i=0; i<length; i++) should be for(i=length-1; i≥0; i--)

(2)a test case that does not execute the fault

1:x = null

2:x = null

(3)a test case that executes the fault, but does not result in an error state.

1:x = [1,2,3 ]; y = 3

2:x = [0]

(4) a test case that results in an error, but not a failure

1:x=[1, 2, 3],  y=4

 

2:x=[1, 2, 3]

转载于:https://www.cnblogs.com/zhuchenlu/p/8568490.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值