· 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 equivalents: Some of the principles of sessile equivalents are given below.
1 When the input condition specifies the number of values or values, an effective equivalent class and two invalid equivalents can be established.
2 When the input condition specifies the collection of input values or specifies the conditions of "How must", an effective equivalent class and an invalid equivalent class can be established.
3 In the case where the input condition is a Boolean, an effective equivalent class and an invalid equivalent class can be determined.
4 A set of values (assuming n) specified in the input data, and the program is to establish each of the input values separately, and the n effective equivalence class and an invalid equivalent class are established.
5 In the case where the rules must be observed in the input data, an effective equivalent class (compliant) and several invalid equivalents (from different angle violation rules) can be established.
6 In the case where the elements in which each element is different in the program processing, the equivalent type should be further divided into smaller equivalents.
3) Design test case: After establishing an equivalent class, the equivalent class table can be established, list all divided equivalents:
Input condition effective equivalence class invalid equivalence
... ...
... ...
Then design test cases from the following three principles from the divided equivalence class:
1 Provide a unique number for each equivalent class.
2 Design a new test case that makes it as much as possible to have effective equivalence or equivalents that have not been covered, and repeat this step. Until all effective equivalents are covered.
3 Design a new test case that only covers an invalid equivalence that has not been covered, repeating this step. Until all invalid equivalents are covered.
Boundary value analysis
Boundary value analysis method is a supplement to equivalence classification methods.
(1) Considering the boundary value analysis method:
Long-term test work experience tells 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, more errors can be found.
Use boundary value analysis method to design test cases, first determine the boundary condition. The boundary of the same type of the equivalence is usually input, that is, the boundary of the test should be focused. It should be selected, which is just equal to or just less than the boundary value as test data. Instead of selecting typical or arbitrary values in the equivalence class as test data.
(2) Based on boundary value analysis method to select the principle of test cases:
1) If the input condition specifies the value of the value, it should be taken to reach the boundary of this range, and the value just transcend the boundary of this range is 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, and the number of most than one number is used as the test data.
3) Using the previous principles 1 according to each output condition for specification.
4) Apply the front principles 2 according to each output condition of the specification.
5) If the input domain or output domain given by the program's specification is an ordered collection, the first element of the collection and the last element should be selected as the 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 a test case. 7) Analyze specification, identify other possible boundary conditions.
Error speculation
Error estimation: Based on all possible various errors in the program, there may be various errors in the procedure, thereby having targeted design test cases.
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.
Caudity
The equivalence classification method and boundary value analysis method introduced earlier are highly considering input conditions, but there is no connection between input conditions, mutual combination. Consider the interaction between input conditions, some new The situation. But to check the combination of input conditions is not an easy thing, even if all input conditions are divided into equivalents, the combination between them is quite a larger. Therefore, it is necessary to consider adopting a combination of one suitable for describing a variety of conditions. The combination, the corresponding form of a plurality of actions can be considering design test cases. This requires the utilization of the caudity map (logic model).
The result of the cause of the fruit map method is the determination table. It is suitable for checking the various combinations of program input conditions.
Basic steps for generating test cases using causal charts:
(1) Analysis Software Specifications Description, those are why (ie, input conditions or input conditions), those are results (ie, output conditions) and give each reason and results to an identifier.
(2) Analyze Software Specifications Description Description. Find the relationship between the reasons and the results, the reasons and reasons. According to these relationships, the cause is drawn.
(3) Due to grammar or environmental restrictions, some causes and reasons, the combination of reasons and results are not possible. To indicate these special circumstances, some marks are indicated by some marks in the caudity map to indicate constraints or restrictions.
(4) Convert the cause chart to the judgment table.
(5) Take each column of the judgment table as a basis, design test cases.
From the test case (local, combined relationship under the partial, combined relationship) including all the input data, the number of test cases, the number of test cases, and the number of test cases, the number of test cases, linearly increase.
The determination table has been used in the previous causal map. Decision Table is a tool for performing different operations under multi-logical conditions. In the early stages of programming development, the determination form has been treated as a writing program. Auxiliary tools. Because it can express both complicated logical relationships and various conditional combinations of both specific and clear.
The determination table is usually composed of four parts.
Condition Stub: List the problem all conditions. It is usually considered to be aimed at the order of the conditions.
Action Stub: Lists the operations that may be taken to specify. These operations are not constrained.
Condition Entry: List the value of its left column conditions. Value values in all possible conditions.
Action Entry: Lists the actions that should be taken in the case of various values of the condition items.
Rules: The specific value of any conditional combination and its corresponding operations should be performed. A column of through the condition items and action items in the decision table is a rule. Obviously, how many of the group conditions listed in the decision table, there is How many rules are available, and there are both of the conditions and action items.
Establishment step of the determination table: (according to software specification)
1 Determine the number of rules. If there is n conditions. Each condition has two values (0, 1), so there is a rule.
2 List all conditional piles and action piles.
3 Fill in the condition item.
4 Fill in the action item. Wait until the initial judgment table.
5 Simplified. Merger Similar rules (the same action).
B. Beizer pointed out that the conditions for designing test cases for the use of judgment tables:
1 Specification is given in the form of a decision form, or it is easy to convert into a judgment table.
2 The order of the conditions will not affect what operations do.
3 The order of the rules does not affect what operations do.
4 Whenever the condition of a certain rule is already satisfied, and it is determined that the operation to be executed is not required. 5 If a certain rule gets a certain operation to perform multiple operations, the execution order of these operations is insignificant.