Description of the method
Task 1
The Textbook, section 9.2.1.1, Descriptionparagraph of1, including the Method
The[branch] branch coverage criterion (also called edge coverage) requires that tests cover all possible control flows between basic blocks. In the terminology of the Control Flow Graph (CFG), this simply means covering all the edges of the graph. In the definition of branch coverage, we will additionally require the instruction coverage criterion to be met. This will guarantee subsumption between these criteria. If we did not add this requirement, for a program composed of a single basic block (e.g., a single instruction), its control flow graph would have no edges, and thus the branch coverage criterion could be satisfied by an empty set of tests, which would obviously not cover any instructions. If there is at least one edge in the CFG, branch coverage obviously implies vertex (instruction) coverage.
Branch – a control flow between two blocks.
Task 2
The Textbook, section 9.2.1, from the frame [branch testing] up to the frame [branch coverage]
Branch testing – a white-box testing technique where specific cases are designed for testing, to which the cases designed for the entire branch execution, within the TMap [28] branch testing methodology, are referred to as the algorithm test.
The conditions for testing are the constraints that ensure proper ordering between the condition blocks. These include the CFG (Control Flow Graph) elements covering the same conditions in the test. If the program has no branches, the condition blocks cover the code instructions.
Table 9.3 summarizes the branch testing method.
Branch coverage – the percentage of tested branches. 100% branch coverage implies 100% instruction coverage.
Task 3
Table 9.3