Test case design method for black box test
· Equivalent class division method
· Boundary value analysis method
· Error estimation method
· Cuvetal method
· Decision table drive analysis method
· Orthogonal experiment design method
· Function graph analysis method
Equivalent class division
It is divided into a number of possible input data, ie the input field of the program, and then selects a small number of representative data from each subset as a test case. This method is an important, commonly used black Case test case design method.
1) Assocation equivalence class: The equivalence class refers to a subset of an input domain. In this subset, each input data is equivalent to the mistakes in the disclosure program. And reasonably assume: test a certain price The representative value of the class is equal to the test of this class of other values. Therefore, all the input data can be reasonably divided into several equivalents, and one data is taken as a test input condition in each equivalent class, you can use a small amount. Representative test data. Good test results. Equivalent class division can have two different situations: effective equivalents and invalid equivalents.
Equivalent equivalents: refers to a collection of reasonable, meaningful input data. The functions and performance specified in the specification can be implemented using the effective equivalent type.
Invalid equivalence: The definition of effective equivalence is exactly the opposite.
When designing test cases, you should consider these two equivalents at the same time. Because software not only can receive reasonable data, it is necessary to experience unexpected tests. Such tests ensure that software has higher reliability.
2) Method for dividing equivalence: Some principles for syndrome equivalences are given below 1 In the case where the input conditions specify the number of values or values, an effective equivalent class and two invalidations can be established. Price: 2 In the case where the input value specifies the collection value or specifies the conditions of "how", it is possible to establish a valid equivalent class and an invalid equivalent class. 3 Input conditions are a Boolean case Under, an effective equivalent class and an invalid equivalence class are determined. 4 In a set of values (assuming N) specified in the input data, and the program should be processed separately for each input value, it can establish N Effective equivalence class and an invalid equivalence class. 5 In the case of the rules that must be observed by input data, an effective equivalent class (conformity) and several invalid equivalents (from different angles violation rules) 6 In the case where the elements in which each element is different in the process processing, the equivalent class should be further divided into smaller equivalents.
3) Design test case: After the equivalence class is established, the equivalent class table can be established, list all divided equivalents input conditions effective equivalent type ineffective equivalents .... .. ... then design test cases in the following three principles from the equivalence class: 1 Provide a unique number for each equivalent class. 2 Design a new test case to make it It may be more coverage that has not yet been covered, and this step is repeated. Until all effective equivalents have been covered. 3 Design a new test case, so that it only covers an invalid equivalent that has not yet covered This step is repeated. Until all invalid equivalences are covered. Boundary value analysis Boundary value analysis method is a supplement to equivalence class division methods. (1) Considering of boundary value analysis: long-term testing work experience Tell us that a large number of errors occur on the boundaries of the input or output range, rather than happening inside the input and output range. Therefore, for various boundaries, design test cases can be found. You can find more errors. Use the boundary value analysis method Design test cases should first determine the boundary condition. The boundary of the same type of the equivalent type is usually imported, which is the boundary of the test. It should be selected or equal to the value that is larger or just less than the boundary as test data, rather than choosing equivalent. Typical or arbitrary values in the class as test data. (2) Based on boundary value analysis method Selecting a test case, if the input condition specifies the value of the value, you should take the value of this range of boundaries, and just Beyond the value of this range of boundaries as test input data. 2) If the input condition specifies the number of values, use the maximum number, the minimum number, less than the minimum number, than the maximum number one number as a test Data .3) According to each output condition of the specification, use the previous principles 1) .4) According to each output condition of the specification, apply the previous principles 2) .5) If the program's specifications given the input domain Or the output domain is an ordered collection, then select the first element of the set and the last element as a test case. 6) If an internal data structure is used in the program, the value on the boundary of this internal data structure should be selected as the value as Test case .7) Analyze specifications, identify other possible boundary conditions. Error estimation error estimation: Based on all possible errors in the program, all possible errors in the procedure, there is a targeted design test case. Error estimation method: Exradicting all possible errors in procedures and special circumstances that are easy to occur, based on them select test cases. For example, many of the many errors in modules in modules in unit testing. Previous products The mistakes have been discovered in the test. These are the summary of experience. Also, the input data and output data are 0. Enter the form is a space or the input form is only one line. These are easier to happen. You can choose these conditions The following example acts as a test case. Method of equivalent classification method introduced in the causal pattern method And boundary value analysis methods are highly considering input conditions, but not considering the connection between input conditions, integration, etc. Consider the interaction between input conditions, some new situations may be generated. But check the input conditions The combination is not an easy task, even if all input conditions are divided into equivalents, the combination between them is quite a larger. Therefore, it is necessary to consider using a combination suitable for describing a variety of conditions, and generates multiple actions accordingly. The form is to consider design test cases. This requires the use of causal charts (logic models). The result of the fruit map method is the determination table. It is suitable for checking various combinations of program input conditions. Basic illustrations Basic Steps: (1) Analysis Software Specifications Description, those are why (ie, input condition or input conditions), those are result (ie, output conditions) and give each reason and results to an identifier. 2) Analyze the semantics in the description of the software specification. Find the relationship between the reasons and the results, the reasons and reasons. According to these relationships, the causal figure is drawn. (3) Due to grammar or environmental limitations, some causes and reasons Between, the combination between the reasons and the results is not possible. To indicate these special circumstances, some markings are indicated by some marks on the fruit chart. (4) Convert the caudity map to the judgment table. (5) Each column of the determination table is taken as a basis, design test case. From the test case (partial, combined relationship) generated by the fruit chart, including all the input data, the case of taking true, the number of test cases, the minimum number of test cases And the number of test cases increases linearly with the increase of the number of input data. The judgment table has been used in the previous causal map method. Decision Table