Test Adequacy Using Control Flow Flashcards

1
Q

T is considered adequate with respect to the
statement coverage criterion if the statement
coverage of T with respect to (P,R) is ____

A

1

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

Sub i is the number of what?

A

Unreachable code

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

Sub c is the number of what?

A

Covered code

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

Sub e is the number of what?

A

Code in the program

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

Logical statements on the same line should be:

A

Separately counted

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

T/F Counting syntactical markers, or not, is an operational definition choice

A

T

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

T/F If syntactical markers are counted, they should be

treated as statements and all counted

A

T

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

T/F If syntactical markers are not counted, none should

be counted… including else

A

T

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

What is a condition also known as?

A

Predicate

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

Any expression that evaluates to true or false constitutes a ____

A

Condition

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

T/F x and x + y are invalid conditions

A

False, depends on the language

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

T/F The constants 1 and 0 may correspond to, respectively, true and false

A

T

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

T/F The constant 0 may correspond to false and any

non-zero constant corresponds to true

A

T

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

T/F Odd constants may correspond to true and even

constants may correspond to false

A

T

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

T/F A simple condition uses any boolean operator

A

F, only NOT operator

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

Simple conditions are also referred to as ____
or ____ conditions because they cannot be
parsed any further into two or more conditions

A

Atomic, elementary

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

T/F A compound condition is made up of two or
more simple conditions joined by one or more
Boolean operators

A

T

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

Any condition can serve as a decision in the appropriate context within a program

A

Conditions as decisions

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

What do most high-level languages provide to serve as contexts for decisions?

A

If, while, and switch statements

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

A decision can have three possible outcomes, what are they?

A

True, false, undefined

21
Q

T/F When the condition corresponding to a decision evaluates to true or false, the decision to take one or the other path is made

22
Q

T/F The evaluation of a condition never fails

23
Q

When the evaluation of a condition fails, what happens to the corresponding decisions outcome?

24
Q

When does a condition become a decision?

A

When it is used within the appropriate context, such as an if statement

25
A decision is considered ____ if the flow of control has been diverted to all possible destinations that correspond to this decision
Covered
26
What is decision coverage also known as?
Branch decision coverage
27
A decision implied by the ____ statement is considered covered if during one or more executions of the program under test, the flow of control has been diverted to all possible destinations
Switch
28
T/F The domain of decision coverage consists of all | decisions in the program under test
T
29
What contributes to one decision?
If and while
30
What contributes to more than one decision?
Switch
31
When is a compound condition considered to be covered?
Each simple condition it is comprised of is also covered
32
T/F Decision coverage is concerned with the coverage of decisions regardless of whether a decision corresponds to a simple or a compound condition
T
33
T/F When a decision is composed of a compound condition, decision coverage does not imply that each simple condition within a compound condition has taken both values true and false
T
34
T/F Condition coverage requires each decision to have taken both outcomes
F
35
What is condition/decision coverage is also known as?
Branch condition coverage
36
Using condition coverage on some compound condition C implies that each simple condition within C has been evaluated to true and false. Does it imply that all combinations of the values of the individual simple conditions in C have been exercised?
No
37
A ____ is a program unit comprised of a textual code sequence that terminates in a jump to the beginning of another code sequence and jump
Linear Code Sequence and Jump
38
When control arrives at statement X, follows through to statement Y, and then jumps to statement Z, we say that the LCSAJ (X, Y, Z) is ____
Traversed
39
When does multiple condition coverage become expensive?
When there are many embedded simple conditions
40
When a compound condition C contains n simple conditions, the maximum number of tests required to cover C is ____
2^n
41
MC/DC coverage requires that every compound condition in a program must be tested by demonstrating that each simple condition within the compound condition has an ____ on its outcome
Independent effect
42
T/F MC/DC coverage is a stronger criterion than the multiple condition coverage criterion
F, weaker
43
T/F Each simple condition in MC/DC affects the outcome of C independently
T
44
T/F Conditions that are not part of a decision are also included in the set of conditions to be covered
T
45
T/F In some cases, an adequate test set need only demonstrate the independent effect of any one occurrence of the coupled condition
T
46
What are the three error types in a compound condition?
Missing condition, incorrect boolean operator, mixed
47
T/F Satisfying the MC/DC adequacy means that errors made while coding conditions will be revealed
F
48
T/F An MC/DC-adequate test is likely to reveal more | errors than a decision or condition coverage adequate test
T
49
What are two problems with MC/DC?
Short circuit operators | Multiple occurrences of a condition