Software Testing Summary (B) - Black Box Testing (on)

Black Box Testing definitions and classifications

In the case of black-box testing is not concerned with the internal logic of the program and implemented only according to requirements specification process, the program checks whether the output in line with expectations of test methods.
Black box testing methods are the following:
Based on the test data:

  1. Equivalence partitioning
  2. Boundary value analysis
  3. Orthogonal test

Based on the testing process:

  1. French scene
  2. Cause and effect diagram
  3. Decision table
  4. State transition diagram
  5. Error reckoning

Based on test data

Equivalence partitioning

1. Definitions

Equivalence partitioning is to all possible input data, the input field is divided into several program portion (subset), and select a small number of centralized data from each sub-test as a representative. This method is an important, common black-box test design method of the embodiment.

2. equivalence class division

It refers to a subset of the equivalence class of input fields. In this subset, the internal procedures of the operation of all the data set is the same. Thus, all the input data can be divided into several reasonable equivalence class, takes a equivalence class of data as input for each of the conditions tested can achieve better results with a small number of representative test data. Equivalence class can be divided in two different situations: a valid and invalid equivalence class equivalence class.

  1. Effective equivalence class
    refers to a specification for the program is reasonable set of input data sense configuration. Effective use of equivalence class may verify whether the program to achieve the functions and performance specifications as specified.
  2. Invalid equivalence class
    defines the effective equivalence class opposite happens. Invalid equivalence class specification refers to a set of program instructions is unreasonable or meaningless data input thereof.

When designing test cases, we should also consider two equivalence classes. Because the software is not only able to receive reasonable data, but also a certain degree of fault tolerance, such a test in order to ensure that the software more reliable.

3. Standard division of equivalence classes

  1. Points without pay: No redundancy
  2. And while the same: no loopholes
  3. The equivalence classes: the generation of the whole

The method of dividing equivalence classes

  1. In the case where a predetermined input condition number or range of values, it is possible to establish a valid and two invalid equivalence class equivalence class. Such as: the input value is student performance, range from 0 to 100; active equivalence class is [1,100]. Invalid equivalence class is (-∞, 1) and (100, + ∞).
  2. In the case where a predetermined input condition or a predetermined set of input values ​​of the "how to be" conditions, can establish a valid and an invalid equivalence class equivalence class;
  3. In the input condition is a Boolean case, can determine a valid and an invalid equivalence class equivalence class.
  4. In a set of predetermined values ​​of input data (assuming n number), and the program to be treated separately for each input value, n can establish a valid and an invalid equivalence class equivalence class.
  5. Under predetermined rules input data must comply with a case, can establish a valid equivalence class (in accordance with the rules), and a plurality of invalid equivalence class (in violation of rules from different angles);
  6. Ascertain the equivalence class has been divided in different ways in the respective elements in the case of processing a program, then the equivalence class should be further divided into smaller equivalence classes.

5. Select coverage criteria

After establishing equivalence class, it should also be designed to select the appropriate test standards covering the actual situation.

Invalid equivalence class, it should be designed using a single defect test principles, i.e. only once introduced into an invalid equivalence class. In this manner easy to locate defects.

Effective equivalence class, the coverage criteria there are many, can be divided into:

  1. Strong coverage: test design should cover all combinations of all equivalence classes (Cartesian product). If there is, if there are two inputs, each has three equivalence classes, it should be 2x3 = 6 test cases.
  2. Weak coverage: Design of test cases for each equivalence class only needs to cover one.
  3. Cover combination: in all possible input conditions, select the combination of k input conditions tested. Orthogonal assays combination case is covered.

6. When the input note associated with the presence of

When you enter there is a correlation, we can simply use the independence assumption , which assumes the design input associated equivalence class does not exist, this design is no equivalence classes of vulnerabilities, but it is redundant. Since in removing relevance to design input equivalence class corresponding to the expanded input field. Therefore, there is a correlation in the input, it is best to consider the correlation input, then equivalence partitioning. After use or equivalence partitioning independence assumptions used to remove redundant decision table.

7. The output of the equivalence class must also be tested

Input divided equivalence class is not equal to the output of the equivalence class is also divided, so in actual operation, we shall output equivalence partitioning, a test input from the output estimation.

Boundary value analysis

1. Definitions

Boundary value analysis is to input or output boundary value will be A black box test method. Boundary value analysis is usually to supplement the equivalence partitioning method, in this case, the boundary from which test equivalence class.

2. Consider the boundary value analysis

Long-term testing experience tells us that a lot of errors occur at the boundaries of the input or output range, rather than occurring inside the input and output range. Therefore, design test cases for a variety of border situations, can find out more errors.
Using boundary value analysis test cases, should first determine the boundary conditions. Typically border equivalence class of input and output, is the case of the test should focus on the border. It should select exactly equal, just greater than, or just less than the value of the boundary as the test data, rather than select a typical value, or any value equivalence class as the test data.

3. The boundary value analysis step

  1. There are several determining input
  2. Determine the boundaries of each input
  3. Field of the boundary value takes a
  4. 2 ~ 3 in the data field
  5. Based on the principle of a single boundary (i.e. a boundary of a test only one input data) to the design of test cases

Example 4. The common boundary value

  1. For integer and 16-bit 32767 -32768 border
  2. On-screen cursor in the top left, most lower right position
  3. The first line of the report and the last line
  4. The first element of the array and the last
  5. 0th, 1st and penultimate cycle, the last time

The output of the boundary have a value analysis

Orthogonal test

1. Definitions

Based on Galois theory, selected from a large number of (test) data (test cases) in the right amount, a representative point (cases), so that a scientific and reasonable arrangements for experimental design experiments (tests).
In fact, orthogonal experimental test is actually a special case of the test of equivalence classes, he is to cover the test criteria of equivalence classes is set in a test method to test a combination of circumstances. And just such a combination test, each of the possible values entered is the same number.

2. Features

Uniform dispersion of the test data, each input of each value compared to the number of occurrences of the other values ​​are the same. Thus ensuring the representativeness of the data.

3. Objective

The main purpose of the test is the orthogonal experiment in reducing test cases at the same time, ensure that the test case has some representation.

Step 4

  1. Number (the number of factors determine the actual input Q Q
  2. The equivalence class division method, determining the maximum number of possible values ​​(the number of levels in all of the Q S S
  3. Using the look-up table method to obtain n n minimal orthogonal L n ( q s ) L_n(q^s) , wherein q > = Q q>=Q s > = S s>=S , and L = ( q 1 ) s L=(q-1)*s
  4. And the actual input value without modification to meet orthogonal
  5. The orthogonal table obtained test

The difference between the combined test and

Orthogonal experimental test is essentially a combination of tests, it is in every possible number of input values are the same, can be achieved without loopholes combination of non-redundant tests. However not the same, the test is in the orthogonal number of possible values for each of the redundant input. To reduce this redundancy, heuristic algorithm, such as AETG, IPO algorithms may be employed to generate a combination of test cases.
We can get a lot of combinations of test case generation tool in the URL:

http://www.pairwise.org/index.asp

Released six original articles · won praise 0 · Views 86

Guess you like

Origin blog.csdn.net/qq_33584870/article/details/105326105