1. Common black box test Case Design Method
Equivalence class partitioning method, boundary value analysis method, causality diagram method, state transfer method, decision table method, flow analysis method, orthogonal test method, error guessing method, input/Output domain test method, anomaly analysis method,
2. Equivalence class Partitioning method
concept: A collection of input fields in which each input condition is equivalent.
principles:
A Specify the range of values or the number of values, you can determine a valid equivalence class and two invalid equivalence classes
B Specifies a set of input values, or a condition that specifies what must be, you can determine a valid equivalence class and an invalid equivalence class
C Boolean, you can determine a valid equivalence class and an invalid equivalence class
D A set of values for the input data is assumed to be N, and the program is to process each input value separately, you can determine the n valid equivalence class and an invalid equivalence class
E. A valid equivalence class and several invalid equivalence classes can be determined in case the input data must obey
F. The equivalence classes have been zoned, and the methods of each element in the process of processing are different, so it should be further divided
Steps:
- Dividing equivalence classes
- Design test Cases for valid equivalence classes
- Design at least one test case for each invalid equivalence class
3. Boundary Value Analysis method
boundary Value usage conditions:
- The input criteria explicitly define the range of values or specify the number of values
- The input condition explicitly sets an ordered set
Edge value points definition: up, off, inside points
principles:
- If the output condition specifies the range or number of values, the value within or near the boundary should be selected
- The output condition specifies the number of values, the maximum value, the minimum value, the maximum value + 1, the minimum value-1,
- The output condition is an ordered set, then the first and last of the collection
- If internal data is used, the boundary value of this internal data should be selected
Steps:
- Analyze the type of input parameters (from SRS)
- Equivalence class partitioning (optional)
- Defining boundaries
- Correlation analysis (optional)
- Forming test items
4. Equivalence class + boundary value
Scope of application: between the input and the input, output and output of the relationship between the non-containment situation.
Example: User Registration
applicable test types: functional test, performance test, GUI test, configuration test, etc.
5. Decision Table Method
Concept: a tool for analyzing and expressing situations where different operations are performed under multiple logic conditions.
Application:
- Test based on decision table is the most rigorous and logical
- Combined values for different logical conditions
composition: condition pile, condition item, action pile, action item
Steps:
- Determine the number of rules
- List all condition items piles and action piles
- Fill in Conditional items
- Fill in the action item to get the initial decision table
- Simplify decision tables, merge similar rules (optional)
- Turn each rule into a use case
Advantages: can be a complex problem according to a variety of possible situations listed not, concise and easy to understand, can avoid omission.
Cons: There is a leak in the merger.
Scope of application:
- Specifications are given in the form of a decision table or easily converted into a decision table
- conditions, order of rules do not affect execution results
- Each rule is relatively independent
- A rule can be converted into one or more use cases, the number of use cases of a rule depends on the conditions of conversion
6. Causality Diagram method
is the systematic method of translating specifications into judgment tables. It is suitable for checking the various combinations of input conditions.
steps: 1. Break down the large system specification to a testable specification fragment (optional)
2. Find out what is the cause and which are the results
3. Draw a causal diagram
4. Convert the causality diagram to a decision table
5. Simplified decision table (optional)
6. Generating Test Cases
Advantages:
- An error is ignored when multiple input conditions in an equivalence class are combined.
- Design multiple input condition combination cases
- Can point out what is wrong with the description of the program specification
Disadvantages:
- Causal relationship between input conditions and output results, sometimes difficult to obtain from SRS
- Even if a causal relationship is obtained, the number of use cases and their large size can be caused by complex causal relationships.
conditions and results: identity, non-, or, and
- Identity relationship: When an entry occurs, the corresponding output is generated, and the output is not generated when the input item does not occur
- Non-relationship: Contrary to the identity relationship (myth: If the former does not occur, then the latter occurs, the former occurs, the latter does not occur)
- or relationship: in multiple input conditions, a corresponding output is generated as long as one occurs
- Relationship: In multiple input conditions, the corresponding output is generated only when all the inputs occur
conditions and Conditions: XOR, sole, requirement, or
- XOR: Up to one input condition occurs
- Or: At least one input condition occurs
- Unique: There is only one occurrence in all inputs
Requirements: As long as one of the inputs occurs, other inputs will also occur (myth: Why the top-up and top-up success is not this, because they are not the same as the input conditions, but by the condition, no relationship)
7. Process Analysis Method
This is a test analysis method which is extended to the black box test from the path covering analysis method in the White box test.
Steps:
- Draw a business flowchart
- Defining state nodes and conditional branches
- Determine the test path
- Constructing test Cases
Summary: focus on the test process, the process test no problem does not explain the system function is no problem
8. State Migration Diagram method
- The test of state machine focuses on the correctness of the test state transfer.
- In this way, reverse test cases, such as the illegal combination of States and events, can be designed.
concept: The State migration method is actually testing the transformation of various States, the test of these state transitions is very easy to miss in the actual work, as long as the transition of these states to test, is not the use of State migration method is not important, Because the state migration diagram is simply a way to test the transformation of multiple states into a string.
Steps:
1. Draw a State migration diagram
2. List Status-event table
3. Draw a State conversion tree (list each state and draw all States from this state)
4. Derive the test path from the state transformation tree
5. Write legitimate test cases based on test path
6. Writing illegal test cases
9. Orthogonal test method
concept: It is a scientific test design method of reasonable arrangement experiment to choose the appropriate and representative points from the large quantity and test points, and apply the "orthogonal table" derived from the theory of Gad.
Related concepts: the status of indicators, factors, and factors
Steps:
- Construction Factor State Table
- Select Orthogonal table (when the number of factor states is not available, select Factor +1, remove multiple columns)
- Holing
- Merge
- Mapping
- Write Use Cases
Summary: Do not consider the actual value of the meaning, so delete the invalid combination, to supplement the missing common combination.
10. Input domain test method
You only need to consider the special value and the long time input after using the equivalence class and the boundary value.
11. Output domain Override method
Expected to achieve output or equivalence class coverage
12. Anomaly Analysis method
Fault-tolerant, fail-back capability
13. Error-Guessing method
Based on empirical speculation. Can only be used as a complement to a test design, not as a separate design test case.
14. Summary of use case design methods
Method name |
Characteristics |
Insufficient |
Test Type |
System type |
Note |
equivalence class, Boundary Value |
Classification, coverage |
Do not consider the combination |
All types |
All Systems |
Need to focus on the information behind the data |
Decision table Causality diagram |
The combination of all permutations, artificial simplification |
More cumbersome |
Functional Testing |
Control systems, games |
For testing more complex processes |
Orthogonal test |
22 Combination, Auto Select |
Don't care about the actual meaning of the combination |
Functional testing, configuration testing |
All Systems |
The key is the selection of orthogonal table |
State Migration |
Test modifications |
|
Functional Testing |
Mobile phone, MP3 |
Edit Modify function can also be used |
Process Analysis |
Testing process |
|
Functional testing, installation testing |
Financial systems, logistics systems, e-commerce systems |
Business process complex system applicable, only check the process, does not guarantee that the single function is correct |
Software Test (vi): black box test