Test Adequacy Flashcards

1
Q

What is static testing?

A

Testing of a program through analysis of artifacts without executing the code, such as requirements testing, code reviews, and static analysis.

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

What is dynamic testing?

A

Testing that involves executing the system to validate its behavior.

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

What is structural testing?

A

A testing approach that determines test cases based on the structure of the program, focusing on identifying untested parts of the system.

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

What are the components of structural testing?

A

Statements, branches, conditions, and paths.

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

What is a Control Flow Graph (CFG)?

A

A directed graph that models the flow of a program, with nodes representing code regions and edges representing transitions.

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

What is statement testing?

A

A testing method that ensures each statement in the program is executed at least once.

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

What is branch testing?

A

A testing method that ensures all possible branches in the program are executed.

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

What is the limitation of statement coverage?

A

It can achieve 100% coverage without testing all branches or conditions, potentially missing faults.

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

What is condition testing?

A

A testing method that ensures all individual conditions in a compound expression take all possible truth values.

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

What is compound condition coverage?

A

A method that tests all possible combinations of conditions in a compound decision, though it can have exponential complexity.

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

What is Modified Condition/Decision Coverage (MC/DC)?

A

A coverage criterion that ensures each basic condition in a compound decision independently affects the outcome.

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

Why is MC/DC widely used?

A

It provides a good balance between thoroughness and test suite size.

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

What is path testing?

A

A testing method that considers combinations of decisions along paths in the program.

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

Why is path testing challenging for programs with loops?

A

Loops create infinite paths, requiring practical compromises like boundary interior path testing.

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

What is boundary interior path testing?

A

A technique that focuses on paths up to the first repeated node in a loop.

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

What is loop boundary adequacy?

A

A criterion that ensures loops are tested with zero, one, and multiple iterations.

17
Q

What is cyclomatic coverage?

A

A measurement of the number of independent paths in a CFG, calculated as e - n + 2 (edges, nodes).

18
Q

What is the infeasibility problem in testing?

A

The situation where some testing criteria cannot be satisfied due to unreachable code or interdependent conditions.

19
Q

What are solutions for the infeasibility problem?

A

Set realistic coverage goals or require justification for uncovered elements.

20
Q

Define a test case.

A

A set of inputs, execution conditions, and a pass/fail criterion.

21
Q

Define a test suite.

A

A collection of test cases.

22
Q

What is an adequacy criterion?

A

A predicate that determines whether a test suite is thorough enough for a particular program.

23
Q

What is a test obligation?

A

A partial test case specification requiring specific properties for thorough testing.