Software Testing · Quiz 2 · Jan 2026
Software Testing · Quiz 2 · Jan 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.
19 / 20 published solutions
Edge-pair coverage is not subsumed by prime path coverage due to which of the following
reasons?
Because prime path coverage does not subsume edge coverage.
Because all edge-pairs are simple paths.
Because edge-pair coverage requires self-loops to be visited.
Edge-pair coverage is subsumed by prime path coverage.
**1. Identify the key property:** Prime paths are simple paths. Edge-pair coverage also requires consecutive edges involving self-loops, such as m-n-n and n-n-m, which repeat an internal vertex and are not simple.
**Answer: C — Because edge-pair coverage requires self-loops to be visited..**
A: **Incorrect:** PPC does subsume ordinary edge coverage.
B: **Incorrect:** Some self-loop edge pairs are not simple paths.
C: **Correct:** It requires self-loop-related edge pairs that PPC can miss.
D: **Incorrect:** Universal subsumption fails for graphs with self-loops.
Question 3 MCQ · 5.0 marks
Consider four partitions with blocks
,
,
, and
. If
the base choice is
. What is the total number of tests required to satisfy Base
Choice Coverage (BCC) criterion?
10
11
12
14
Published solution
**1. Use the base test:** Start with \((A_2,B_1,w,Z_1)\).
**2. Vary one characteristic at a time:** For block counts 4,2,5,3, BCC needs \[1+(4-1)+(2-1)+(5-1)+(3-1)=11.\]
**Answer: B — 11.**
A: **Incorrect:** The stated structure gives 11, rather than 10.
B: **Correct:** This equals the independently counted result 11.
C: **Incorrect:** The stated structure gives 11, rather than 12.
D: **Incorrect:** The stated structure gives 11, rather than 14.
Question 4 MCQ · 5.0 marks
Consider the predicate
. Which of the following options represents
, i.e. the
conditions under which clause
determines
?
Published solution
**1. Compare c values:** For \(p=(a\lor b)\land\neg c\), c=true makes p=false, while c=false makes \(p=a\lor b\).
**2. Require a change:** Flipping c changes p exactly when \(a\lor b=true\). Hence \(p_c=a\lor b\).
**Answer: D — \(a\lor b\).**
A: **Incorrect:** Both a and b false make c inactive.
B: **Incorrect:** Negating a is not the required determination condition.
C: **Incorrect:** This is incorrect when a=false,b=false, and misses a=false,b=true.
D: **Correct:** At least one of a,b true allows c to determine the predicate.
Question 5 MCQ · 5.0 marks
A university is designing an online course management system for students and faculty. One
requirement of the system is that instructors must be able to create and manage course content,
including assignments and quizzes. What type of requirement does this represent?
Functional requirement
Non-functional requirement
Regulatory requirement
Business requirement
Published solution
**1. Identify the key property:** Creating and managing assignments and quizzes is a specific capability the system must provide, so it is functional.
**Answer: A — Functional requirement.**
A: **Correct:** It specifies required application behaviour.
B: **Incorrect:** It is a capability rather than a quality constraint.
C: **Incorrect:** No regulatory obligation is stated.
D: **Incorrect:** It describes detailed system functionality rather than a high-level business objective.
Question 6 MCQ · 5.0 marks
Consider a program that calculates a fixed shipping cost for online orders based on package
weight (in kilograms) using these rules:
• If weight is between 0.5 to 1.4 kg, shipping cost is Rs. 5.00.
• If weight is between 1.5 to 4.9 kg, shipping cost is Rs. 10.00.
• If weight is between 5.0 to 9.9 kg, shipping cost is Rs. 20.00.
• If weight is 10.0 kg or above, shipping cost is Rs. 50.00.
Assume weight is measured and recorded rounded to one decimal place. How many equivalence
class partitions can be identified for this input domain?
3
4
5
6
Published solution
**1. Identify valid price classes:** 0.5–1.4, 1.5–4.9, 5.0–9.9, and 10.0 or higher have four different charges.
**2. Add invalid weights:** Values below 0.5 form one additional invalid class. One-decimal rounding removes gaps between the stated valid ranges. Thus there are five classes.
**Answer: C — 5.**
A: **Incorrect:** The stated structure gives 5, rather than 3.
B: **Incorrect:** The stated structure gives 5, rather than 4.
C: **Correct:** This equals the independently counted result 5.
D: **Incorrect:** The stated structure gives 5, rather than 6.
Question 7 MCQ · 5.0 marks
Cyclomatic complexity represents the number of _____________ in the control flow graph of a
program.
prime paths
loops
test paths
linearly independent paths
Published solution
**1. Identify the key property:** Cyclomatic complexity is the size of a basis of linearly independent control-flow paths.
**Answer: D — linearly independent paths.**
A: **Incorrect:** Prime paths belong to a different coverage criterion.
B: **Incorrect:** The number of loops alone does not determine complexity.
C: **Incorrect:** All test paths can be far more numerous or infinite.
D: **Correct:** The path-basis size equals cyclomatic complexity.
Question 8 MCQ · 5.0 marks
Consider the following range for a thermostat's allowable temperature setting (in degrees
Celsius).
Which of the following test input sets would satisfy maximal Boundary Value Analysis (BVA) for the
given partition?
Published solution
**1. Identify limits:** For \(-10\le temp\le40\), test immediately below, at, and above each endpoint.
**2. Collect boundary neighbourhoods:** \(\{-11,-10,-9\}\) and \(\{39,40,41\}\) together give the maximal set offered.
**Answer: B — \(\{-11,-10,-9,39,40,41\}\).**
A: **Incorrect:** It misses the just-inside values −9 and 39.
B: **Correct:** It covers below/at/above both endpoints.
C: **Incorrect:** It only checks the endpoints.
D: **Incorrect:** It omits out-of-range values on both sides.
Question 9 MCQ · 5.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. Read the continuation condition:** Each positive input is added. Zero or negative input triggers break.
**2. Express n continuing inputs and a stop:** \[PC=\left(\bigwedge_{i=0}^{n-1}r_i>0\right)\land r_n\le0.\] The initial accumulator a does not affect input numbering.
**Answer: A — \((\bigwedge_{i=0}^{n-1}r_i>0)\land r_n\le0\).**
**Convention note:** The literal while(true) guard never becomes false. The question’s outcomes refer to continuing versus breaking after reading a fresh input.
A: **Correct:** It gives n positive inputs followed by a nonpositive input.
B: **Incorrect:** Zero cannot continue, and input numbering does not start at a.
C: **Incorrect:** This encodes n+1 continuing inputs.
D: **Incorrect:** It has incorrect bounds, continuation inequality and exit index.
Question 10 MSQ · 5.0 marks
Consider the predicate
. Which of the following options
are true?
The predicate is in DNF.
The predicate is in CNF.
There are
possible valuations for this predicate
There are
possible valuations for this predicate
Published solution
**1. Read the form:** \((x\land y\land z)\lor(\neg a\land\neg b)\lor(\neg p\land q)\) is a disjunction of conjunctions: DNF.
**2. Count independent Boolean inputs:** There are seven distinct variables x,y,z,a,b,p,q, hence \(2^7=128\) valuations.
**Answer: A, D — DNF and 2^7 valuations.**
A: **Correct:** The top-level connective joins conjunctions by OR.
B: **Incorrect:** The displayed expression is not a conjunction of disjunctions.
C: **Incorrect:** Three counts conjunction groups rather than seven independent Boolean variables.
D: **Correct:** Seven independent variables give 2^7 valuations.
Question 11 MCQ · 5.0 marks
Based on the above data, answer the given subquestions.
Considering the row numbers (#) given in the truth table, which of the following is a CACC pair for
clause
?
(3,7)
(3,8)
(3,6)
(2,5)
Published solution
**1. Activate a:** In \(p=\neg c\lor(a\land\neg b)\), a determines p only if c=true and b=false.
**2. Choose opposite a values with opposite p outcomes:** Row 3 is (T,F,T), giving p=true. Row 7 is (F,F,T), giving p=false. Both make a active, satisfying CACC.
**Answer: A — (3,7).**
A: **Correct:** Both rows make a active and switch both a and p.
B: **Incorrect:** Row 8 has c=false, which masks a and makes p=true.
C: **Incorrect:** Row 6 has b=true,c=false and masks a.
D: **Incorrect:** Neither pair member makes a active under the required b,c setting.
Question 12 MCQ · 5.0 marks
Based on the above data, answer the given subquestions.
Considering the row numbers (#) given in the truth table, which of the following is a RICC pair for
clause
?
(2, 4) for
, no feasible pair for
(3, 4) for
, no feasible pair for
(1, 3) for
, no feasible pair for
(1, 4) for
, no feasible pair for
Published solution
**1. Make c inactive:** For \(p=\neg c\lor(a\land\neg b)\), a=true,b=false force p=true regardless of c.
**2. Hold a,b fixed:** Rows 3 and 4 differ only in c and both keep p=true. An inactive c cannot keep p=false because setting c=false always makes p=true.
**Answer: B — (3,4) for p=true; no pair for p=false.**
A: **Incorrect:** Rows 2 and 4 change b rather than c.
B: **Correct:** Rows 3 and 4 change only c and keep p=true.
C: **Incorrect:** Rows 1 and 3 change b and do not keep p unchanged.
D: **Incorrect:** Rows 1 and 4 change more than c.
Question 13 MCQ · 5.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 cyclomatic complexity of
?
5
6
3
4
Published solution
**1. Count the connected graph:** \(N=6\), \(E=7\).
**2. Calculate:** \(V=E-N+2=7-6+2=3\).
**Answer: C — 3.**
A: **Incorrect:** The stated structure gives 3, rather than 5.
B: **Incorrect:** The stated structure gives 3, rather than 6.
C: **Correct:** This equals the independently counted result 3.
D: **Incorrect:** The stated structure gives 3, rather than 4.
Question 14 MCQ · 5.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 test requirements are there for edge-pair coverage on
?
8
7
9
10
Published solution
**1. Enumerate length-two paths:** 1-2-3, 1-2-6, 2-3-4, 3-4-5, 4-5-4, 4-5-6, 5-4-5.
**2. Count each distinct adjacent-edge combination:** These are seven edge-pair requirements.
**Answer: B — 7.**
A: **Incorrect:** The stated structure gives 7, rather than 8.
B: **Correct:** This equals the independently counted result 7.
C: **Incorrect:** The stated structure gives 7, rather than 9.
D: **Incorrect:** The stated structure gives 7, rather than 10.
Question 15 MCQ · 5.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 needed to acheive edge coverage on
.
3
2
1
4
Published solution
**1. Supply two covering paths:** 1-2-6 covers the early exit; 1-2-3-4-5-4-5-6 covers the longer branch and both loop directions.
**2. Prove minimality:** Once an execution takes 2→6 it terminates, so no single path can cover that edge and 2→3. Two paths are necessary and sufficient.
**Answer: B — 2.**
A: **Incorrect:** The stated structure gives 2, rather than 3.
B: **Correct:** This equals the independently counted result 2.
C: **Incorrect:** The stated structure gives 2, rather than 1.
D: **Incorrect:** The stated structure gives 2, rather than 4.
Question 16 MCQ · 5.0 marks
Consider the following data flow graph and answer the subsequent questions.
How many test requirements are there to satisfy All-Defs Coverage for variable
?
1
2
3
4
Published solution
**1. Locate definitions:** x is defined at node 1 and redefined at node 4.
**2. Cover each definition:** Both have reachable print(x) uses, so each requires at least one definition-clear use path: two obligations.
**Answer: B — 2.**
A: **Incorrect:** The stated structure gives 2, rather than 1.
B: **Correct:** This equals the independently counted result 2.
C: **Incorrect:** The stated structure gives 2, rather than 3.
D: **Incorrect:** The stated structure gives 2, rather than 4.
Question 17 MCQ · 5.0 marks
Consider the following data flow graph and answer the subsequent questions.
How many test requirements are there to satisfy All-Uses Coverage for variable
?
5
4
3
2
A published solution is not available for this question yet.
Question 18 MCQ · 5.0 marks
Consider the following data flow graph and answer the subsequent questions.
How many test requirements are there to satisfy All DU-Paths Coverage for variable
?
5
4
3
2
Published solution
**1. Enumerate distinct def-clear paths:** From definition 1, the paths are 1-2 (predicate use), 1-5 (predicate and print use), and 1-2-5 (print use).
**2. Include the second definition:** Definition 4 has path 4-5 to print(x). There are four distinct graph-path sequences; 1-2-3-4-5 cannot carry the original x through its redefinition.
**Answer: B — 4.**
A: **Incorrect:** The stated structure gives 4, rather than 5.
B: **Correct:** This equals the independently counted result 4.
C: **Incorrect:** The stated structure gives 4, rather than 3.
D: **Incorrect:** The stated structure gives 4, rather than 2.
Question 19 MCQ · 5.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
,
, and
respectively, in the method
. Answer the subsequent questions.
Published solution
**1. Symbolically execute assignments:** \(t_1=y_0^3\) and \(t_2=3x_0z_0\).
**2. Conjoin the two taken branches:** Abort requires the outer \(x_0>z_0\) and inner \(t_1-t_2<0\), giving \[x_0>z_0\land(y_0^3-3x_0z_0<0).\]
**Answer: C — \(x_0>z_0\land y_0^3-3x_0z_0<0\).**
A: **Incorrect:** The nonstrict outer comparison includes inputs that do not enter the branch.
B: **Incorrect:** A positive difference does not execute abort.
C: **Correct:** Both strict branch conditions match the code.
D: **Incorrect:** Both nonstrict comparisons admit equality cases not reaching abort.
Question 20 MCQ · 5.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
,
, and
respectively, in the method
. Answer the subsequent questions.
Consider that DART generates a random input:
.
Which path constraint (PC) is generated for the next execution at
?
Hint: DART negates the path constraint in the current execution to get the path constraint for the next
execution.
Published solution
**1. Evaluate the initial run:** At (5,2,3), x>z and \(2^3-3(5)(3)=8-45=-37<0\), so abort occurs.
**2. Flip the target inner branch:** Keep \(x_0>z_0\), but negate the strict inner test to \(\ge0\). Thus the next constraint is \[x_0>z_0\land(y_0^3-3x_0z_0\ge0).\]
**Answer: B — \(x_0>z_0\land y_0^3-3x_0z_0\ge0\).**
A: **Incorrect:** It reverses the preceding outer branch instead of the target inner branch.
B: **Correct:** It preserves the prefix and includes equality in the negated inner test.
C: **Incorrect:** It does not correctly flip the inner branch and changes the outer condition.
D: **Incorrect:** Negating <0 gives ≥0, not >0.
Question 21 MCQ · 5.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
,
, and
respectively, in the method
. Answer the subsequent questions.
Which of the following sets of concrete test inputs execute all instances of symbolic execution for
the method
?
{x = 5, y = 2, z = 3}, {x = 4, y = 8, z = 2}
{x = 5, y = 2, z = 3}, {x = 4, y = 8, z = 2}, {x = 5, y = 8, z = 10}
{x = 5, y = 3, z = 5}, {x = 4, y = 8, z = 2}, {x = 5, y = 8, z = 10}
{x = 5, y = 2, z = 3}, {x = 4, y = 8, z = 2}, {x = 5, y = 8, z = 4}
Published solution
**1. Identify three path classes:** Outer false; outer true with inner true (abort); outer true with inner false.
**2. Evaluate B’s triples:** (5,2,3) aborts because 8−45<0; (4,8,2) enters the outer branch without abort because 512−24>0; (5,8,10) skips the outer branch.
**3. Compare candidates:** B includes a representative of every class.
**Answer: B — {(5,2,3),(4,8,2),(5,8,10)}.**
A: **Incorrect:** It omits the outer-false class.
B: **Correct:** All three feasible execution classes are represented.
C: **Incorrect:** The first triple has x=z and does not abort, so the abort class is missing.
D: **Incorrect:** All three inputs enter the outer branch, so its false outcome is missing.