Data class test design method

Data class test design methods are mainly equivalence class and boundary value analysis

 

Equivalence class refers to dividing the input value according to the test effect, and classifying the test data with the same test effect into one class, and then only need to select some test samples in each class for testing, without testing all the values. The boundary value is the value of the parameter on the input boundary. Equivalence classes and boundary values ​​are often used together.

 

For example, the value range of a parameter A is [1, 10], and it is divided into valid equivalence classes and invalid equivalence classes according to the equivalence class. To determine the boundary value, you only need to use 0, 1, 10, 11 as the input. The test, sometimes, selects an intermediate sample in the valid equivalence class, such as 5, then the valid equivalence class is 1, 5, 10, and the invalid equivalence class is 0, 11.

 

The advantage of using equivalence classes and boundary values ​​for test design is that it can control the size of the test and effectively find defects in the product.

 

Under different conditions, the same equivalence class may occur, and the same equivalence class can be assigned to different conditions to reduce the number of test cases.

Test Conditions Effective Equivalence Class invalid equivalence class
A Names are 1-10 in length and contain only alphanumerics and underscores name length is empty
    The name is longer than 10 characters
    The name contains special characters other than underscores
    name contains Chinese
B Names are 1-10 in length and contain only alphanumerics and underscores name length is empty
    The name is longer than 10 characters
    The name contains special characters other than underscores
    name contains Chinese

 

 Combine the simplified equivalence class analysis table:

Test Conditions Effective Equivalence Class invalid equivalence class
A Names are 1-10 in length and contain only alphanumerics and underscores name length is empty
    The name is longer than 10 characters
B Names are 1-10 in length and contain only alphanumerics and underscores The name contains special characters other than underscores
    name contains Chinese

 

 Considering the valid values ​​of different factors together can also reduce the number of test cases, such as name length and name rules in the example. But this trick doesn't work for invalid equivalence classes. Invalid equivalence classes, must be for a single factor and cannot be combined.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326676827&siteId=291194637