软件测试作业2

时间:2022-03-21 21:57:42

软件测试作业2

软件测试作业2

Identify the fault.

左边程序的fault是循环条件,不会遍历到x[0]

右边程序的fault是程序本身是寻找最前面的0,而目的是寻找最后面的0

 

If possible, identify a test case that does not execute the fault. (Reachability)

左边: x=[]  y=4

右边: x=[]

If possible, identify a test case that executes the fault, but does not result in an error state.

 

左边: x=[2,3,4]  y=4

 

右边: x=[1,0,2]

If possible identify a test case that results in an error, but not a failure.

左边:  x=[2,3,4] y=5

右边:  x=[1,2]