A, definitions,
Boundary value analysis is a black box testing method to test the boundary value of input or output. The boundary value analysis method is usually used as a supplement to the equivalence class partition method. In this case, the test cases come from the boundary of the equivalence class. Boundary value analysis is a black box test design method which is a supplement to equivalence class division.
In practice, because a large number of errors occur at the boundary between input and output values, more errors can be detected by designing test cases for various boundary values.
Definition of boundary value points:
1. A point on a boundary, inside and outside a closed domain (closed refers to a domain whose boundary is closed, i.e., a closed interval; The boundary of the open domain is open, i.e. the open interval).
Off-point: The point closest to the upper point is called off-point. Open inside close outside.
Interior point: Any point within the scope of the domain.
Second, the correlation between boundary value and equivalence class
Equivalence class division method: group the input, output, operation and other similar contents in the test process, select representative contents from each group as test cases, and divide them into valid equivalence classes and invalid equivalence classes.
Boundary value analysis: confirm the boundary of input and output, and then take the parameters just equal to, greater than or less than the boundary as test cases;
The two definitions are different. One belongs to the confirmation valid interval, and the other belongs to the confirmation boundary. The connection is that equivalence class division and boundary value should be considered together.
Three, three point analysis
According to the partition of equivalence class, the selection of boundary value includes open interval, closed interval and half open and half closed interval.
(1). Closed interval: in the closed interval, the upper point is the point that can be evaluated, and any point between the upper points is the inner point. The first pair of points immediately outside the range of the upper point is called the outlier (also known as the outlier)
(2). Half-open and half-closed interval: in the half-open and half-closed interval, the definitions of upper and inner points remain unchanged. The off-point is the immediate point within the inner range of the upper point on the side of the open interval, while the immediate point within the outer range of the upper point on the side of the closed interval.
(3). Open interval: In the open interval, the definitions of upper and inner points remain unchanged. An off point is a pair of adjacent points within the inner range of the upper point.
So, the top point is the end point of the interval, and the inside point is any point between the top points. For the departure point, specific conditions should be divided. If the departure point of the open interval is the point immediately adjacent to the inner side of the upper point in the open interval; If it’s the departure point of the closed interval, it’s the point immediately outside the upper point of the closed interval.
Therefore, when we try to value the boundary value of the divided equivalence class, we must have an appropriate range. Instead of randomly selecting the test value to the left and right according to our endpoint value, we should also select it in a scientific way.
Example:
An example of a simple registration procedure is shown below:
The requirements of the program are:
1, name: 1 — 20 characters, cannot contain digits, cannot be blank
Age: an integer between 18 and 60. The value cannot be empty
3. If the information is correct, a prompt will be given and the corresponding registration information “XXX, age” will be entered in the “Registration Information” text box.
According to the above requirements, the data analysis is as follows: