White box testing
Everyone is familiar with the software testing methods, including black box testing and white box testing. The black box testing is a simple functional testing and will not be described here. The following describes several testing methods that are easy to mix in the white box test.
The most common method in software testing is the logical coverage method. All available methods are divided into the following order based on the degree of coverage from weak to strong: statement overwrite, decision overwrite, condition overwrite, Decision-condition overwrite, condition combination overwrite, and path overwrite.
As long as you understand the nature, these testing methods are not that difficult. For example
In this figure, two judgment statement branches form four paths. Analyze the number of paths that can be covered by various overwrites.
Statement overwrite: each statement must be executed once. For example, the statement executed in the ace path can meet the conditions.
Decision overwrite: The T and F values of this decision must be executed once and both true and false. For example, if the path ace and abd are executed, the conditions are met.
Conditional coverage: This is smaller than the granularity of the Decision coverage. The granularity of the former is the criteria in the determination. For example, all the conditions for this decision are A> 1, A <= 1 ,, the determination under B = 0 and B = 0 also has four conditions.
Condition coverage: A test case that satisfies the criteria and covers conditions. <Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> VcD4KPHA + zPW8/tfpus + 4srjHo7q499bWzPW8/rXE1 + m6z6Os0rK + zcrH1eLLxLj2zPW8/fingerprint "http://www.2cto.com/uploadfile/Collfiles/20140929/2014092909211610.png" alt = "\">
Path coverage: the highest degree of coverage. You can test all the paths. Ace, abe, abd, acd
The coverage of the preceding methods is increasing progressively. The similarities and differences between conditional coverage and decision coverage should be distinguished, which has been highlighted in the context coverage.
For beginners, please note that something is inappropriate.