Test case specific design method

1. Write test cases according to requirements

(1) First of all, ensure the rationality and correctness of the requirements, and verify the requirements first;
(2) Analyze the requirements, refine the large requirements into small requirements, extract function points according to each small requirement, and diverge according to each function point Consider its test cases and write test cases (using a specific method of designing test cases)

Second, the specific design method of the test case

1. Equivalence class

It is suitable for cases where test cases cannot be exhaustive. Divide the input into several equivalence classes, and select a test case from each equivalence class for testing. If the test case passes, it means that the equivalence class represented by the test case passes the test.
Equivalence classes are divided into valid equivalence classes and invalid equivalence classes.

2. Boundary value

Design test cases for the boundaries of input and output
Remarks: When designing test cases, equivalence classes and boundary values ​​will be combined for design.

3. Cause and Effect Diagram

(1) When there are many inputs, and different input combinations correspond to different outputs, at this time, the causal graph method is used to analyze the correspondence between different input combinations and outputs.
(2) How to design test cases with the causal diagram method?
1) Find out all the inputs and outputs;
2) Determine the relationship between different input combinations and outputs;
3) Use the causal diagram to represent the relationship between the input and the output ;
4) Judgment table according to the cause-and-effect diagram;
5) Write test cases according to the judgment table

4. Orthogonal method

(1) Basic concept
It is a method of studying multi-factors and multi-levels. According to the orthogonality, the optimal level combination is selected for testing, and the experimental results are used to analyze the results of this test. Factors: input variable level
:
factors Value
Number of factors: number of variables
Number of levels: maximum number of values ​​of variables

(2) The composition of the orthogonal table:
row: factor number
column: L=(level number-1)*factor number+1

(3) The nature of the orthogonal table.
1) The number of occurrences of different data in each column is the same
2) The number of occurrences of any combination of two foreign data is the same

(4) Steps for designing test cases by orthogonal table;
1) Find out all input variables and determine the number of factors
2) Determine the value of the variable and determine the number of levels
If the number of levels between factors is different, search for the orthogonal table on the Internet Inquire.
3) Determine the rows and columns of the orthogonal table
4) Fill in the orthogonal table according to the nature of the orthogonal table
5) Write each row of the orthogonal table as a test case
6) Supplement what you think is important but not reflected in the orthogonal table The test case in
the input and the number of each column should be the same (fill in freely)

5. Scene method

Find out each function point in the scene, and design test cases according to each normal and abnormal situation of the function point.

6. Wrong Guessing

As a supplementary method of designing test cases, according to the knowledge and experience of testers, it is possible to deduce the functional modules that may have problems, and design test cases in a targeted manner.

Guess you like

Origin blog.csdn.net/stitchD/article/details/123904807