Black box testing and Its instances

Source: Internet
Author: User

Black box testing and Its instances

(1): black box testing
Black box testing refers to testing the functionality of the program, that is, testing the functionality of the program to meet the needs without considering the specific internal implementation. It is equivalent to an invisible black box.

(2): The role of black box testing
Black box testing focuses on functional testing, including:
Functional integrity and Correctness testing
Interface Error
Input and Output errors
Database Access Error
Performance Error
Initialization and STOP errors

(3): Common black box testing methods

1: Division of equivalence classes
2: Boundary Value Analysis
3: factorization
4: Discriminant table Combination Method

(4) Division of equivalence classes
1: an equivalence class is a subset of an input field.

2: Category
1: Valid equivalence class, which is a subset of the input domain.
2: Invalid equivalence class, which is a subset that does not match the input domain

3: Division of equivalence classes
1: If the input condition specifies the value range or number of values, a valid equivalence class and an invalid equivalence class can be determined.
Example:
The value range of the input condition is x, 2 <x <6,
The Division equivalence class is
Valid equivalence class:
2 <x <6
Invalid equivalence class:
X <2; x> 6

2: specifying whether the input conditions are worth a set or "what must be", you can determine a valid equivalence class and an invalid equivalence class.

For example, if one of the input values is x = 4, a valid equivalence class and an invalid equivalence class are determined.
Valid equivalence class:
X = 4
Invalid equivalence class
X! = 4

3: specifying that the input condition is a Boolean value, you can determine a valid equivalence class and an invalid equivalence class.
Example:
If the input value is x = true, a valid equivalence class and an invalid equivalence class can be determined.
Valid equivalence class:
X = true;

Invalid equivalence class:
X = false;

4: specify that the input condition is a set of values with n values. If the program needs to process these n values separately, it can determine n valid equivalence classes and an invalid equivalence class.
For example, the program is as follows:
If (x = 0 ){
//......
} Else if (x = 1 ){
//......
} Else if (x = 2 ){
//......
}

You can determine three valid equivalence classes and one invalid equivalence class.
Valid equivalence class:
X = 0; x = 1; x = 2;

Invalid equivalence class:
X! = 0 & x! = 1 & x! = 2

4: Method
Lists the equivalence classes in the form
Input valid equivalence class invalid equivalence class

5: Example
Telephone number problems a city telephone number consists of three parts. Their names and content are respectively: (1) area code: blank or three digits; (2) prefix: three digits not '0' or '1'; (3) suffix: 4 digits. Assume that the tested procedure accepts all phone numbers that comply with the above rules and rejects all phone numbers that do not comply with the regulations. Divide the equivalence classes according to the specification of the program and design the test scheme.

First, you need to divide the equivalence class:

Secondly, select the test case table based on the equivalence list:

VcfQzs7KzOIguPm + 3c/Cw + a4 + large/bX47m7tcSy4srU08PA/large + large/small/bj2sd + large/bQxc + large/small = "here write picture description" src = "http://www.bkjia.com/uploads/allimg/150423/0403203Y4-2.png" title = "\"/>

Secondly, design a test instance table based on the equivalence table:

Using this instance for testing can basically achieve the desired effect.

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.