4.3.2 Branch Testing and Branch Coverage Flashcards

1
Q

A branch is a transfer of “ “ between … in the con… which shows the possible “ “ in which sou… are executed in the …

A

control
two nodes
control flow graph
sequences
source code statements
test object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Each transfer of control can be either:
- unc…
- con…

A
  • unconditional (ie straight-line code)
  • conditional (ie a decision outcome)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In branch testing, the coverage items are “ “ the aim is to design … to exercise b… until an acceptable level of c…

A

branches
test cases
branches in the code
coverage is achieved

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Branch coverage is measured as the number of branches exercised by the … / by the total number of “ “ and is expressed as a “ “.

A

test cases
branches
%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When 100% branch coverage is achieved all b… “un… “ and “ “, are exercised by …

A

branches in the code,
unconditional
conditional,
test cases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Conditional branches typically correspond to:
- a true or … from an i…
- an outcome from a s…
- a decision to exit or c…

A
  • false outcome
    if…then decision
  • switch/case statement
  • or continue a loop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

However, exercising a branch with a test case will not d…

Ex. May not detect defects requiring the execution of a s…

A

detect defects in all cases.

specific path in a code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Branch coverage subsumes…

A

statement coverage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Any set of test cases achieving 100% branch coverage also …

A

achieves 100% statement coverage (but not vice versa).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly