4.3.1 Statement Testing and Statement Coverage Flashcards

1
Q

In statement testing, the coverage items are e…

Aim is to design … that exercise s… until an acceptable level of c…

A

executable statements.

test cases
statements in the code
coverage is achieved.

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

Statement testing coverage is measured as number of statements exercised by t… / total number of e…

Expressed as a “ “

A

test cases
executable statements in the code

%

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

When 100% statement coverage is achieved, it ensures that all e… have been exercised at least “ “.

A

executable statements in the code
once

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

In particular, each statement with a defect will be executed which may cause a “ “ demonstrating the presence of a “ “.

A

failure
defect

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

However, exercising a statement with a test case will not detect d…

Ex: it may not detect defects that are … (e.g. a division by “ “ that only fails when a d…

A

defects in all cases.

data dependent
zero
denominator is set to zero).

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

100% statement coverage does not ensure that all the d… has been tested, as it may not exercise all the b…

A

decision logic
branches in the code.

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