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

A

T

22
Q

T/F The evaluation of a condition never fails

A

F

23
Q

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

A

Undefined

24
Q

When does a condition become a decision?

A

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

25
Q

A decision is considered ____ if the flow of control has been diverted to all possible destinations that correspond to this decision

A

Covered

26
Q

What is decision coverage also known as?

A

Branch decision coverage

27
Q

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

A

Switch

28
Q

T/F The domain of decision coverage consists of all

decisions in the program under test

A

T

29
Q

What contributes to one decision?

A

If and while

30
Q

What contributes to more than one decision?

A

Switch

31
Q

When is a compound condition considered to be covered?

A

Each simple condition it is comprised of is also covered

32
Q

T/F Decision coverage is concerned with the coverage
of decisions regardless of whether a decision
corresponds to a simple or a compound condition

A

T

33
Q

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

A

T

34
Q

T/F Condition coverage requires each decision to have taken both outcomes

A

F

35
Q

What is condition/decision coverage is also known as?

A

Branch condition coverage

36
Q

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?

A

No

37
Q

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

A

Linear Code Sequence and Jump

38
Q

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 ____

A

Traversed

39
Q

When does multiple condition coverage become expensive?

A

When there are many embedded simple conditions

40
Q

When a compound condition C contains n simple conditions, the maximum number of tests required to cover C is ____

A

2^n

41
Q

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

A

Independent effect

42
Q

T/F MC/DC coverage is a stronger criterion than the multiple condition coverage criterion

A

F, weaker

43
Q

T/F Each simple condition in MC/DC affects the outcome of C independently

A

T

44
Q

T/F Conditions that are not part of a decision are also included in the set of conditions to be covered

A

T

45
Q

T/F In some cases, an adequate test set need only demonstrate the independent effect of any one occurrence of the coupled condition

A

T

46
Q

What are the three error types in a compound condition?

A

Missing condition, incorrect boolean operator, mixed

47
Q

T/F Satisfying the MC/DC adequacy means that errors made while coding conditions will be revealed

A

F

48
Q

T/F An MC/DC-adequate test is likely to reveal more

errors than a decision or condition coverage adequate test

A

T

49
Q

What are two problems with MC/DC?

A

Short circuit operators

Multiple occurrences of a condition