definition of fault: Abnormal conditions that may result in system or function
failure (
abnormal condition that can cause a element or an item to
fail< /c11>. ), can be translated as "fault".
Definition of error:the difference between a calculated, observed, or measured
value or condition , with a true, prescribed, or theoretically correct
value or condition (discrepancy between a computed, observed or measured Value or condition and the true, specified, or theoretically correct value or condition. ), can be translated as
"error". Error is the
internal state of the system that can cause the system to appear failure.
Failure Definition : When a system fails to perform the required function, it is failure, which translates to "failure". (Termination of the ability of anelement or an item to perform a function as required.)
Here is an example analysis of our second assignment
Below is four faulty programs. Each includes a test case, results in failure. Answer the following questions (in the next slide).
For question 1
(1) The judging condition should be I >=0; when the array subscript is 0 o'clock, also to judge.
(2) to find out the last 0 of the subscript, should be looking forward from the back, for the loop can be changed so for (int i=x.length-1;i>=0;i--)
Question 2
(1) do not execute Falut code, x is an empty array
(2) x is an empty array
Question 3
(1) Execute Falut code, but do not appear error x = [y=2];
(2) x=[1,1,0]
Question 4
Always I can't tell the difference between error and failure, this problem won't be done. I hope the teacher can speak again in class.
Software testing [2]falut error failure differences and understanding