ISTQB-FL
Questions on Chapter 4
1) Consider the following piece of code:
You executed a predefined set of test cases for this code. Which of the
following guarantees that in at least one of these test cases, the while
loop was executed at least once?
a) A set of test cases achieved 50% decision coverage.
b) A set of test cases achieved 100% statement coverage.
c) One of these tests executes the code with Number Of Values = 0.
d) There are at least two test cases in the test suite.
2) You test a system that computes the pass/fail result for a student who
attends a lecture on software testing. The lecture consists of laboratories
and exam. For each of these two parts, a student can get from 0 to 50
points (it is always an integer number). The final evaluation is based on
the following rule:
You want to apply the equivalence partitioning technique to a FinalResult
variable. Assume that each test is a pair (L, E). Which set of test cases
covers all valid equivalence classes?
a) (1, 50); (50, 50)
b) (39, 19); (28, 23)
c) (0, 50); (50, 0)
d) (35, 15); (40, 20)
,3) Consider the collapsed decision table presented in Table 6.1 that
describes the business rules for admitting a free bus ticket. Assume that
a test consists of three Boolean values corresponding to three
conditions. Which of the following tests demonstrates that the business
rules described in the table are contradictory? Yes, because every
software work product can be examined using static techniques.
a) (member of parliament = TRUE, disabled = FALSE, student = TRUE)
b) (member of parliament = TRUE, disabled = TRUE, student = FALSE)
c) (member of parliament = FALSE, disabled = FALSE, student = TRUE)
d) (member of parliament = FALSE, disabled = FALSE, student = FALSE)
4) If there are n binary decisions in the code, and there are no other
decisions apart form these ones, what is the total number of coverage
elements for the decision coverage?
a) 2n
b) 2n
c) n
d) n2
5) You test the program that takes a sequence of numbers as the input and
returns these numbers sorted. Before you start your testing, you get the
idea (without referring to any documentation) to check what happens, if
you enter the empty set of numbers as the input. This is an example of
which technique?
a) Black-box testing
b) White-box testing
c) Error guessing
d) Checklist-based testing
,6) A system calculates the bonus for airplane pilots. The bonus is based on
the total number of flying hours, which is the sum of the number of
hours on a flight simulator and the number of hours on regular flights.
The business rules R1–R5 for admitting the bonus are presented in the
following decision table.
Which of the following sets of test inputs is a minimal set that achieves
the equivalence partitioning coverage for the output value? Assume each
test input is a pair (s, f ), where s denotes the simulator hours and f—
flight hours.
a) (25, 300), (200, 199), (150, 345), (350, 0), (227, 101)
b) (0, 0), (101, 0), (200, 207), (200, 99), (205, 210)
c) (90, 0), (120, 90), (210, 80), (200, 201)
d) (0, 300), (200, 50), (300, 50), (300, 300)
7) Which of the following is the benefit of using the checklist-based testing?
a) It allows us to appreciate the non-functional testing, which is often underestimated.
b) It allows us to test effectively in absence of formal requirements.
c) It allows us to take advantage of the tester’s expert knowledge.
d) It allows us to test in a more consistent way.
8) Table below shows all the valid transitions of some state machines with
three states: Initial, LoginPage, and WelcomePage.
Assuming there are only four possible events in the system: GoToLogin,
LoginOK, LoginNotOK, LogOut, how many invalid transitions are in this
state machine?
a) 8
b) 0
c) 4
d) 12
, 9) A shopping discount system takes as an input the total price T (a positive
integer with precision of 1 cent), rounds it to the nearest integer value
(in dollars), and basing on this value calculates a discount using the rules
presented in Table below. You want to test if the system correctly
calculates the discount for a given total price T. Which of the following is
a set of boundary values for one of the equivalence classes of a variable
T? Assume that you follow 2-point boundary value analysis.
a) $0.01, $99.49
b) $0, $100
c) $100, $299
d) $299.49, $299.50
10) Consider the following use case describing the course enrollment.
Questions on Chapter 4
1) Consider the following piece of code:
You executed a predefined set of test cases for this code. Which of the
following guarantees that in at least one of these test cases, the while
loop was executed at least once?
a) A set of test cases achieved 50% decision coverage.
b) A set of test cases achieved 100% statement coverage.
c) One of these tests executes the code with Number Of Values = 0.
d) There are at least two test cases in the test suite.
2) You test a system that computes the pass/fail result for a student who
attends a lecture on software testing. The lecture consists of laboratories
and exam. For each of these two parts, a student can get from 0 to 50
points (it is always an integer number). The final evaluation is based on
the following rule:
You want to apply the equivalence partitioning technique to a FinalResult
variable. Assume that each test is a pair (L, E). Which set of test cases
covers all valid equivalence classes?
a) (1, 50); (50, 50)
b) (39, 19); (28, 23)
c) (0, 50); (50, 0)
d) (35, 15); (40, 20)
,3) Consider the collapsed decision table presented in Table 6.1 that
describes the business rules for admitting a free bus ticket. Assume that
a test consists of three Boolean values corresponding to three
conditions. Which of the following tests demonstrates that the business
rules described in the table are contradictory? Yes, because every
software work product can be examined using static techniques.
a) (member of parliament = TRUE, disabled = FALSE, student = TRUE)
b) (member of parliament = TRUE, disabled = TRUE, student = FALSE)
c) (member of parliament = FALSE, disabled = FALSE, student = TRUE)
d) (member of parliament = FALSE, disabled = FALSE, student = FALSE)
4) If there are n binary decisions in the code, and there are no other
decisions apart form these ones, what is the total number of coverage
elements for the decision coverage?
a) 2n
b) 2n
c) n
d) n2
5) You test the program that takes a sequence of numbers as the input and
returns these numbers sorted. Before you start your testing, you get the
idea (without referring to any documentation) to check what happens, if
you enter the empty set of numbers as the input. This is an example of
which technique?
a) Black-box testing
b) White-box testing
c) Error guessing
d) Checklist-based testing
,6) A system calculates the bonus for airplane pilots. The bonus is based on
the total number of flying hours, which is the sum of the number of
hours on a flight simulator and the number of hours on regular flights.
The business rules R1–R5 for admitting the bonus are presented in the
following decision table.
Which of the following sets of test inputs is a minimal set that achieves
the equivalence partitioning coverage for the output value? Assume each
test input is a pair (s, f ), where s denotes the simulator hours and f—
flight hours.
a) (25, 300), (200, 199), (150, 345), (350, 0), (227, 101)
b) (0, 0), (101, 0), (200, 207), (200, 99), (205, 210)
c) (90, 0), (120, 90), (210, 80), (200, 201)
d) (0, 300), (200, 50), (300, 50), (300, 300)
7) Which of the following is the benefit of using the checklist-based testing?
a) It allows us to appreciate the non-functional testing, which is often underestimated.
b) It allows us to test effectively in absence of formal requirements.
c) It allows us to take advantage of the tester’s expert knowledge.
d) It allows us to test in a more consistent way.
8) Table below shows all the valid transitions of some state machines with
three states: Initial, LoginPage, and WelcomePage.
Assuming there are only four possible events in the system: GoToLogin,
LoginOK, LoginNotOK, LogOut, how many invalid transitions are in this
state machine?
a) 8
b) 0
c) 4
d) 12
, 9) A shopping discount system takes as an input the total price T (a positive
integer with precision of 1 cent), rounds it to the nearest integer value
(in dollars), and basing on this value calculates a discount using the rules
presented in Table below. You want to test if the system correctly
calculates the discount for a given total price T. Which of the following is
a set of boundary values for one of the equivalence classes of a variable
T? Assume that you follow 2-point boundary value analysis.
a) $0.01, $99.49
b) $0, $100
c) $100, $299
d) $299.49, $299.50
10) Consider the following use case describing the course enrollment.