Software testing [2]falut error failure differences and understanding

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.