4.3 White box test techniques Flashcards

1
Q

Which white-box test techniques are focused on in this course?

A

The two techniques discussed are:
Statement testing
Branch testing

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

What is the objective of Statement Testing?

A

Statement testing aims to exercise every executable statement in the code at least once to achieve a desired level of coverage.

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

How is coverage quantified in Statement Testing?

A

Coverage in Statement Testing is measured as the percentage of executable statements that have been exercised by test cases, out of the total number of executable statements in the code.

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

What is guaranteed when 100% statement coverage is achieved?

A

Achieving 100% statement coverage ensures that all executable statements in the code have been executed at least once, potentially exposing defects associated with those statements.

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

What are the limitations of 100% statement coverage?

A

100% statement coverage may not detect defects that are data-dependent (e.g., division by zero only when certain data conditions are met) or defects in decision logic that involve branches not exercised by the test cases.

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

What is Branch Testing?

A

Branch testing aims to ensure that all possible branches of conditional statements (if-else, switch-case, etc.) are exercised by test cases, rather than just focusing on individual executable statements.

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

How is coverage measured in Branch Testing?

A

Coverage in Branch Testing is measured as the percentage of decision branches that have been exercised by test cases, out of the total number of decision branches in the code.

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

What is a branch in the context of branch testing?

A

A branch is defined as a transfer of control between two nodes in the control flow graph of the code, representing possible sequences of execution of source code statements.

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

What does branch testing aim to cover?

A

Branch testing aims to cover branches in the code, including both unconditional and conditional branches.

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

What does achieving 100% branch coverage ensure?

A

Achieving 100% branch coverage ensures that all branches in the code, both unconditional and conditional, have been exercised by test cases.

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

What are the limitations of branch testing in detecting defects?

A

Branch testing may not detect defects that require the execution of specific paths or scenarios within a branch, which may remain untested.

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

What is the relationship between branch coverage and statement coverage?

A

Branch coverage subsumes statement coverage, meaning achieving 100% branch coverage guarantees 100% statement coverage as well, but the reverse is not true.

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

What advantage do all white-box testing techniques offer?

A

White-box testing techniques consider the entire software implementation, which aids in detecting defects even when the software specification is vague, outdated, or incomplete.

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

What limitation does white-box testing have in terms of defect detection?

A

White-box testing may not detect defects resulting from omitted requirements if the software does not implement certain requirements.

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

Where can white-box techniques be applied besides dynamic testing?

A

White-box techniques can also be used in static testing scenarios such as code reviews, dry runs of code, and reviewing high-level logic like pseudocode.

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

What is the significance of white-box coverage measures?

A

White-box coverage measures provide an objective way to quantify code coverage, which helps in generating additional tests to increase coverage and enhance confidence in the software.