Software Testing · Quiz 2 · May 2026
Software Testing · Quiz 2 · May 2026
← Course papers · Start practice / exam
Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.
17 / 19 published solutions
Consider the following statements regarding logic coverage criteria, and choose the correct
option:
i) A predicate with
clauses has
possible valuations.
ii) GACC subsumes predicate coverage.
Both statements are incorrect.
Statement (ii) is correct and statement (i) is incorrect.
Statement (i) is correct and statement (ii) is incorrect.
Both statements are correct.
**1. Count clause valuations:** n independent Boolean clauses admit \(2^n\) truth assignments.
**2. Test the subsumption claim:** For \(p=a\oplus b\), both clauses determine p for every setting. Tests (T,T) and (F,F) satisfy GACC for each clause, yet p is false in both. GACC therefore need not provide predicate coverage.
**Answer: C — Only statement (i) is correct.**
A: **Incorrect:** The valuation statement is true.
B: **Incorrect:** This reverses the validity of the two statements.
C: **Correct:** There are 2^n valuations, but GACC does not guarantee both predicate outcomes.
D: **Incorrect:** The GACC subsumption claim is false.
Question 3 MCQ · 2.0 marks
Consider the predicate
. Which of the following options represents
, i.e. the
conditions under which clause
determines
?
Published solution
**1. Substitute b’s values:** For \(p=\neg b\lor(a\land c)\), setting b=false gives true, while setting b=true gives \(a\land c\).
**2. Require a changed predicate:** b determines p exactly when \(a\land c\) is false. Thus \[p_b=\neg(a\land c)=\neg a\lor\neg c.\]
**Answer: B — \(\neg a\lor\neg c\).**
A: **Incorrect:** When a∧c is true, p is true regardless of b.
B: **Correct:** This makes the other disjunct false so flipping b changes p.
C: **Incorrect:** The determination condition must depend only on the minor clauses a and c.
D: **Incorrect:** Requiring both a and c false is too restrictive; either false is enough.
Question 4 MCQ · 2.0 marks
Consider that a mobile app is being developed for booking intercity bus tickets. One of the
requirements specified for the app is that a notification should be sent to the passengers (users)
on the date of booking with details of their itinerary.
Which of the following types of requirements does the above belong to?
Business requirement
Functional requirement
Regulatory requirement
Non-functional requirement
Published solution
**1. Identify required behaviour:** Sending an itinerary notification when a booking is made states an action the app must perform. It is a functional requirement.
**Answer: B — Functional requirement.**
A: **Incorrect:** A business requirement states a higher-level business objective.
B: **Correct:** It specifies an observable application function.
C: **Incorrect:** No law or regulation is specified.
D: **Incorrect:** It describes behaviour rather than a quality constraint.
Question 5 MCQ · 2.0 marks
Consider the following range of ambient temperature (
) in
(degree Celsius) for an electric
motor.
Which of the following test inputs would satisfy Boundary Value Analysis (BVA) for the given
range?
Published solution
**1. Identify the two limits:** The accepted temperature range is \([-20,110]\). Tests should exercise both limits and invalid values outside them.
**2. Compare the candidates:** The first set contains the lower bound −20, upper bound 110, an interior point 40, and out-of-range values −25 and 115. It is the most complete boundary-oriented set offered.
**Answer: A — \(\{-25,-20,40,110,115\}\).**
**Convention note:** This is the best offered set. A conventional integer robust-BVA suite would also include immediately adjacent values such as −21, −19, 109 and 111; none of the options is that complete conventional suite.
A: **Correct:** It checks both bounds, an interior point and invalid values on both sides.
B: **Incorrect:** It omits the lower bound and an upper out-of-range value.
C: **Incorrect:** It lacks invalid values outside the accepted interval.
D: **Incorrect:** It lacks the lower boundary, an interior point and an upper out-of-range value.
Question 6 MCQ · 2.0 marks
Consider the following code segment for symbolic testing.
Choose the appropriate path constraint (PC) for the
loop with a sequence of
outcomes followed by a
.
Consider each
as a fresh symbolic value.
Published solution
**1. Express continuation:** Each nonnegative input r continues the product loop; a negative input triggers break. The initial product value a does not index the input stream.
**2. Conjoin the fresh-input constraints:** n continuing inputs r0 through r(n−1), followed by a stopping input rn, require \[\left(\bigwedge_{i=0}^{n-1}r_i\ge0\right)\land(r_n<0).\]
**Answer: D — \((\bigwedge_{i=0}^{n-1}r_i\ge0)\land(r_n<0)\).**
**Convention note:** The actual while(true) condition never becomes false. “True outcomes followed by false” is interpreted as the continuation condition r≥0, with exit through break.
A: **Incorrect:** The fresh input sequence starts at index 0, not at initial product a.
B: **Incorrect:** This uses an a-dependent stopping index and includes an extra nonnegative input.
C: **Incorrect:** This encodes n+1 continuing inputs followed by a stop.
D: **Correct:** Exactly n nonnegative inputs precede the negative stopping input.
Question 7 MCQ · 3.0 marks
Consider four partitions with blocks
,
,
, and
.
How many test requirements are there for All Combinations Coverage (ACoC)?
32
24
40
16
Published solution
**1. Count the choices:** The partition sizes are 2,4,2,2.
**2. Form the Cartesian product:** All combinations coverage needs \(2\times4\times2\times2=32\) combinations.
**Answer: A — 32.**
A: **Correct:** This is the product of all four partition sizes.
B: **Incorrect:** 24 is not the Cartesian-product count.
C: **Incorrect:** 40 is not the product of the given sizes.
D: **Incorrect:** 16 omits a factor of 2.
Question 8 MCQ · 3.0 marks
Consider a portal for a university library that determines book borrowing allowance for students
based on two input variables (characteristics).
Academic Level (
):
,
,
Enrollment Type (
):
,
Note: Assume that it is possible for both inputs to be invalid also.
The following are the rules for determining the allowance for one semester:
● Full-time undergraduate students receive an allowance of
books.
● Full-time postgraduate students receive an allowance of
books.
● Doctoral students receive an allowance of
books.
Part-time students receive half the allowance of full-time students.
Doctoral students cannot be part-time.
How many equivalence classes, including both valid and invalid inputs, can be identified in this
scenario in total?
6
8
9
7
A published solution is not available for this question yet.
Question 9 MSQ · 3.0 marks
Which of the following statements are correct regarding symbolic execution?
Each symbolic execution is equivalent to a large number of normal test cases.
Symbolic execution is equivalent to proving that a program is fully correct.
Symbolic execution can also be terminated if the program hits an exit
statement.
SMT solvers can always solve a given predicate constraint efficiently.
Published solution
**1. Interpret symbolic paths:** One symbolic path summarizes concrete inputs satisfying its path constraint. An exit statement ends that execution, but path exploration and constraint solving can be incomplete or expensive.
**Answer: A, C — Statements A and C.**
**Convention note:** A symbolic path can represent many inputs; for special constraints it may represent one or no feasible input. The first statement is the intended general characterization.
A: **Correct:** A path constraint generally represents a class of concrete tests rather than one input.
B: **Incorrect:** Symbolic execution alone does not guarantee complete correctness, especially with bounds and unexamined paths.
C: **Correct:** An executed exit statement terminates that symbolic path.
D: **Incorrect:** SMT solving has no universal efficient solution guarantee.
Question 10 MSQ · 2.0 marks
Consider the predicate
. Which of the following options are
true?
The predicate is in CNF.
The predicate has three clauses
The predicate is in DNF.
The predicate has four clauses
Published solution
**1. Read the syntactic form:** \[p=(a\lor b)\land(\neg a\lor b)\land(a\lor\neg b).\] It is a conjunction of three disjunctions.
**2. Classify:** This is CNF with three CNF clauses; the written expression is not a disjunction of conjunctions.
**Answer: A, B — CNF with three CNF clauses.**
**Convention note:** “Clause” here means a CNF disjunction, as in propositional logic/SAT. In logic-coverage terminology, the atomic conditions are a and b, so that different use of “clause” would count two.
A: **Correct:** The top-level conjunction connects disjunctions of literals.
B: **Correct:** There are three parenthesized CNF clauses.
C: **Incorrect:** The displayed expression is not written as DNF.
D: **Incorrect:** There are three CNF clauses, not four.
Question 11 MCQ · 2.0 marks
Consider the control flow graph (CFG),
, where
● Set of vertices
● Set of edges
● Initial vertex
● Final vertex
Based on the above data, answer the given subquestions.
How many decision nodes are there in
?
2
3
4
5
Published solution
**1. Count outgoing alternatives:** Node 1 has successors 2,5; node 2 has successors 3,6; node 5 has successors 5,7.
**2. Count decision nodes:** These are the three nodes with out-degree greater than one.
**Answer: B — 3.**
A: **Incorrect:** This misses one branching node.
B: **Correct:** Nodes 1,2,5 each branch.
C: **Incorrect:** Nodes 3,4,6 have only one outgoing edge.
D: **Incorrect:** There are only three branching nodes.
Question 12 MCQ · 3.0 marks
Consider the control flow graph (CFG),
, where
● Set of vertices
● Set of edges
● Initial vertex
● Final vertex
Based on the above data, answer the given subquestions.
How many linearly independent paths are there in
?
3
4
5
6
A published solution is not available for this question yet.
Question 13 MCQ · 3.0 marks
Consider the control flow graph (CFG),
, where
● Set of vertices
● Set of edges
● Initial vertex
● Final vertex
Based on the above data, answer the given subquestions.
What is the minimum number of test paths to achieve edge coverage on
?
1
2
3
4
Published solution
**1. Cover the left branch:** Path 1-2-3-4-2-6-7 covers the loop 2-3-4-2 and the left exit.
**2. Cover the right branch:** Path 1-5-5-7 covers the self-loop and right exit. Together they cover all nine edges.
**3. Establish minimality:** A path must choose either 1→2 or 1→5 and cannot return to node 1, so no single test path can cover both initial edges.
**Answer: B — 2 test paths.**
A: **Incorrect:** One execution cannot take both initial alternatives.
B: **Correct:** The two exhibited paths cover every edge.
C: **Incorrect:** Two paths suffice, so three is not minimal.
D: **Incorrect:** Two paths suffice, so four is not minimal.
Question 14 MCQ · 3.0 marks
Consider the predicate
and its truth table given below.
Note that the blank cells represent the value
in the truth table.
Based on the above data, answer the given subquestions.
Which of the following is the set of GACC pairs for clause
?
Published solution
For \(p=(a\lor\neg b)\land\neg c\), rows 1–8 use the standard order TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF.
**1. Determine when c is active:** Flipping c changes p exactly when \(a\lor\neg b\) is true. The active c=true rows are 1,3,7; the active c=false rows are 2,4,8.
**2. Form valid GACC pairs:** Minor clauses may change, so the exact valid set is \(\{1,3,7\}\times\{2,4,8\}\).
**3. Compare offered candidates:** Option A contains all these pairs but also includes the inactive rows 5 and 6. It is the intended covering candidate, rather than an exact set of valid pairs.
**Answer: A — A as intended covering candidate; exact pairs {1,3,7}×{2,4,8}.**
**Convention note:** No option equals the exact valid GACC pair set. A is retained as the intended superset covering candidate; rows 5 and 6 must be removed if the question requires only valid GACC pairs.
A: **Correct:** Its Cartesian product contains every valid GACC pair, though it also contains invalid inactive-row pairs.
B: **Incorrect:** This only lists same-minor pairs and includes the invalid (5,6) pair; it is not the complete GACC pair set.
C: **Incorrect:** The same-c pair (2,4) cannot be a GACC pair.
D: **Incorrect:** These pairs do not consistently flip c with c active.
Question 15 MCQ · 3.0 marks
Consider the predicate
and its truth table given below.
Note that the blank cells represent the value
in the truth table.
Based on the above data, answer the given subquestions.
Which of the following is the set of RACC pairs for clause
?
Published solution
For \(p=(a\lor\neg b)\land\neg c\), rows 1–8 use the standard order TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF.
**1. Hold the minor clauses fixed:** RACC for c requires the same a,b values while c switches and determines p.
**2. List the valid pairs:** (1,2), (3,4), and (7,8) satisfy this. Pair (5,6) is inactive because a=false and b=true force p=false.
**3. Match the intended option:** B contains the three valid pairs, with one extra inactive pair.
**Answer: B — B as intended candidate; exact pairs {(1,2),(3,4),(7,8)}.**
**Convention note:** No option gives precisely the valid RACC set {(1,2),(3,4),(7,8)}. The source’s intended B candidate must omit (5,6) to be an exact set.
A: **Incorrect:** This permits a and b to change and includes inactive rows.
B: **Correct:** It contains all three valid RACC pairs, plus the invalid extra pair (5,6).
C: **Incorrect:** These are not the required same-minor active pairs.
D: **Incorrect:** These do not keep a,b fixed while flipping c.
Question 16 MCQ · 3.0 marks
Consider the predicate
and its truth table given below.
Note that the blank cells represent the value
in the truth table.
Based on the above data, answer the given subquestions.
Which of the following is the set of RICC pairs for clause
?
for
,
, for
for
,
, for
for
, no feasible pair for
.
for
, no feasible pair for
.
Published solution
For \(p=(a\lor\neg b)\land\neg c\), rows 1–8 use the standard order TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF.
**1. Make c inactive:** \(a\lor\neg b=false\) requires a=false and b=true. Then p remains false regardless of c.
**2. Hold the minors fixed and switch c:** Those assignments are rows 5 and 6. No inactive pair can have p=true because c inactive forces the conjunction false.
**Answer: C — (5,6) for p=false; none for p=true.**
A: **Incorrect:** These listed pairs do not switch c while holding a,b fixed and p inactive.
B: **Incorrect:** These listed pairs do not satisfy the required fixed-minor inactive condition.
C: **Correct:** Rows 5,6 keep p=false while c changes; p=true has no inactive pair.
D: **Incorrect:** Rows 5,6 have p=false, not true.
Question 17 MCQ · 3.0 marks
Consider that concolic testing technique (DART) is used to test the following code segment.
Assume that
and
respresent the symbolic values for the variables
,
respectively in the
method
.
Answer the given subquestions.
Which of the following options correctly represents the symbolic state (
) at
?
Published solution
**1. Preserve symbolic inputs:** \(a\mapsto a_0\), \(b\mapsto b_0\).
**2. Execute the assignments:** cube(a) produces \(a_0^3\), and three times addOffset(b) produces \(3(b_0+10)\). Thus \[\sigma=\{a\mapsto a_0,b\mapsto b_0,t_1\mapsto a_0^3,t_2\mapsto3(b_0+10)\}.\]
**Answer: B — \(\{a\mapsto a_0,b\mapsto b_0,t_1\mapsto a_0^3,t_2\mapsto3(b_0+10)\}\).**
A: **Incorrect:** This omits the live input-variable mappings from the full symbolic state.
B: **Correct:** All four variables have their correct symbolic mappings.
C: **Incorrect:** This omits the two assignments already executed.
D: **Incorrect:** This swaps t1 and t2 and does not correctly symbolize the cube result.
Question 18 MCQ · 3.0 marks
Consider that concolic testing technique (DART) is used to test the following code segment.
Assume that
and
respresent the symbolic values for the variables
,
respectively in the
method
.
Answer the given subquestions.
Identify the path constraint that represents an equivalence class of input vectors containing all
inputs that lead to the abort() call at
.
Published solution
**1. Enter the outer branch:** Abort is inside the a<b branch, so \(a_0<b_0\).
**2. Enter the inner branch:** \(t_1-t_2\le0\) becomes \(a_0^3-3(b_0+10)\le0\).
**3. Combine:** \[PC=(a_0<b_0)\land(a_0^3-3(b_0+10)\le0).\]
**Answer: C — \(a_0<b_0\land a_0^3-3(b_0+10)\le0\).**
A: **Incorrect:** This changes the outer strict inequality and wrongly excludes the inner equality case.
B: **Incorrect:** A positive inner difference takes the non-abort branch.
C: **Correct:** Both branch conditions match the abort path.
D: **Incorrect:** Both comparisons are inconsistent with the abort path.
Question 19 MCQ · 3.0 marks
Consider that concolic testing technique (DART) is used to test the following code segment.
Assume that
and
respresent the symbolic values for the variables
,
respectively in the
method
.
Answer the given subquestions.
Consider that DART generates a random input:
.
Which path constraint (PC) is generated for the next execution at
?
Hint: DART negates the PC in the current execution to get the next one.
Published solution
**1. Evaluate the current input:** At (3,5), the outer test is true and \(3^3-3(5+10)=27-45=-18\le0\), so the abort branch is taken.
**2. Flip the target decision:** Keep the preceding condition \(a_0<b_0\) and negate the inner \(\le0\) to \(>0\). The next constraint is \[a_0<b_0\land a_0^3-3(b_0+10)>0.\]
**Answer: D — \(a_0<b_0\land a_0^3-3(b_0+10)>0\).**
A: **Incorrect:** The outer branch must remain strictly a<b.
B: **Incorrect:** This does not flip the required inner outcome and also changes the outer comparison.
C: **Incorrect:** This repeats the current abort-path condition.
D: **Correct:** The prefix is preserved while the targeted inner branch is negated.
Question 20 MCQ · 3.0 marks
Consider that concolic testing technique (DART) is used to test the following code segment.
Assume that
and
respresent the symbolic values for the variables
,
respectively in the
method
.
Answer the given subquestions.
Which of the following sets of concrete test inputs execute all instances of symbolic execution for
the method
?
Published solution
**1. Identify three execution classes:** Outer false; outer true with inner true (abort); outer true with inner false.
**2. Evaluate B’s examples:** (3,5) aborts because 27−45<0; (4,5) takes the inner false branch because 64−45>0; (5,4) skips the outer branch.
**3. Conclude:** B exercises all three feasible path classes.
**Answer: B — {(3,5),(4,5),(5,4)}.**
A: **Incorrect:** All inputs satisfy a<b, so the outer-false class is missing.
B: **Correct:** The three inputs exercise the three distinct path classes.
C: **Incorrect:** The first two examples both abort; the inner-false class is missing.
D: **Incorrect:** Both examples enter the outer branch; the outer-false class is missing.