1. Describe several methods of logic override and the differences between them. 2. Please briefly describe the three execution modes of object code piling.
1)
Logic coverage is the most commonly used method in white box testing, which includes the following five methods.
1) Statement coverage
Statement coverage also known as line coverage, segment coverage, and basic block coverage, is the most common way of coverage. The purpose of statement coverage is to test whether the code in the program has been executed. It only tests the executed statements in the code, which do not include header files, comments, blank lines, and so on. Statement coverage in a multi-branched program can only overwrite a path so that each statement in that path is executed at least once, regardless of various branch combinations.
2) Decision coverage
Decision coverage is also known as branch coverage. Its principle is to design enough test cases to ensure that each decision is a true value at least once and a false value at once during the testing process. The function of decision coverage is to make both true and false branches executed. Although the decision coverage has stronger test capability than statement coverage, it still has the same singleness as statement coverage.
3) Conditional coverage
Condition coverage refers to the design of enough test cases to make each logical condition in the decision statement take true and take the false values at least once. It can be seen from the test cases of conditional coverage that the use of three test cases has reached the point where each logical condition has its true value and false value at least once.
4) Decision-conditional coverage
Conditional/decision coverage requires the design of enough test cases to make the possible values of all conditions in the decision statement appear at least once, and at the same time, the possible results of all the decision statements appear at least once.
Compared to the condition of coverage and decision coverage - condition coverage makes up for the shortcoming of the two, but the decision- no condition can consider decision statement and the combination of the condition judgment expand its coverage is no condition that cover also does not cover-conditions covering and path, hence determine condition covered in the presence of missing test was still.
5) Conditional combination coverage
Conditional combination coverage refers to the design of enough test cases, making the judgement statement in each condition appear at least once all of the possible, and each decision statement itself result also appear at least once, to judge it with the difference is that of condition covering condition combination coverage is not simply asking for each condition of these results at least once.
Step by step
Solved in 2 steps