The logic cover method of white box test
A white box test is also called a logical drive test or a structural test.
- Differences from black Box testing: focus on the internal structure of the code
- The premise of White box testing: The internal logic of the known code
- Test method: Logic Overlay method
The logic covering method consists of six kinds, from weak to strong: statement overlay, decision coverage, conditional coverage, decision/condition coverage, conditional combination coverage, and path overlay.
Logic overlay French Sentence overlay
Each statement in the code block that will be tested is executed at least once. Does not care about the execution result of the statement, as long as the execution of a statement, it is said that the statement is overwritten.
Decision coverage
The decision can be seen as an if statement, in the program flowchart with a diamond representation, the IF statement has only two results: true, false. So the decision covering is also called Branch coverage, each decision has a true, false two branches. The decision overlay is performed at least once for each branch of each decision, based on the statement coverage.
Conditional override
The condition is a sub-expression that is split with logical operators in the logical expression of each if statement. There are two cases for each condition: eligible, non-conforming. Conditional overrides are performed at least once for each condition, based on the statement overlay.
Decision/Conditional override
The decision/condition coverage is consistent with the decision coverage and the conditional coverage.
Conditional combination Overrides
For each decision, the combination of the two conditions of each condition, if n represents the number of conditions contained in each decision, then for each decision, the composition of the 2^n species.
Path Overlay
When there is a decision, the original path is changed, and the path overlay executes all the paths again.
The relationship between the various overlays
types of logical coverage methods |
Relationship |
Statement overrides |
- |
Decision coverage |
Include statement overrides |
Conditional override |
Include statement overrides |
Decision/Conditional override |
Satisfy both judgment and conditional coverage |
Conditional combination Overrides |
Satisfies the conditional combination override, must satisfy the decision/condition coverage |
Path Overlay |
- |
Graphic Logic Overlay Method
Diagram Logic Overlay method
Hope that these can give soft test of small partners to provide help ~~~~!
Logic Overlay method for white-box testing