MauryaHub PYQ Practice

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

Question 2 MCQ · 2.0 marks

Consider the following statements regarding logic coverage criteria, and choose the correct option: i) A predicate with
Source diagram or notation
clauses has
Source diagram or notation
possible valuations. ii) GACC subsumes predicate coverage.
6406537134644.
Both statements are incorrect.
6406537134645.
Statement (ii) is correct and statement (i) is incorrect.
6406537134646.
Statement (i) is correct and statement (ii) is incorrect.
6406537134647.
Both statements are correct.

Published solution

**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.

Report a correction for Q2

Question 3 MCQ · 2.0 marks

Consider the predicate
Source diagram or notation
. Which of the following options represents
Source diagram or notation
, i.e. the conditions under which clause
Source diagram or notation
determines
Source diagram or notation
?
6406537134652.Source diagram or notation
6406537134653.Source diagram or notation
6406537134654.Source diagram or notation
6406537134655.Source diagram or notation

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.

Report a correction for Q3

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?
6406537134656.
Business requirement
6406537134657.
Functional requirement
6406537134658.
Regulatory requirement
6406537134659.
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.

Report a correction for Q4

Question 5 MCQ · 2.0 marks

Consider the following range of ambient temperature (
Source diagram or notation
) in
Source diagram or notation
(degree Celsius) for an electric motor.
Source diagram or notation
Which of the following test inputs would satisfy Boundary Value Analysis (BVA) for the given range?
6406537134664.Source diagram or notation
6406537134665.Source diagram or notation
6406537134666.Source diagram or notation
6406537134667.Source diagram or notation

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.

Report a correction for Q5

Question 6 MCQ · 2.0 marks

Consider the following code segment for symbolic testing.
Source diagram or notation
Choose the appropriate path constraint (PC) for the
Source diagram or notation
loop with a sequence of
Source diagram or notation
Source diagram or notation
outcomes followed by a
Source diagram or notation
. Consider each
Source diagram or notation
as a fresh symbolic value.
6406537134668.Source diagram or notation
6406537134669.Source diagram or notation
6406537134670.Source diagram or notation
6406537134671.Source diagram or notation

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.

Report a correction for Q6

Question 7 MCQ · 3.0 marks

Consider four partitions with blocks
Source diagram or notation
,
Source diagram or notation
,
Source diagram or notation
, and
Source diagram or notation
. How many test requirements are there for All Combinations Coverage (ACoC)?
6406537134648.
32
6406537134649.
24
6406537134650.
40
6406537134651.
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.

Report a correction for Q7

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 (
Source diagram or notation
):
Source diagram or notation
,
Source diagram or notation
,
Source diagram or notation
Enrollment Type (
Source diagram or notation
):
Source diagram or notation
,
Source diagram or notation
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
Source diagram or notation
books. ● Full-time postgraduate students receive an allowance of
Source diagram or notation
books. ● Doctoral students receive an allowance of
Source diagram or notation
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?
6406537134660.
6
6406537134661.
8
6406537134662.
9
6406537134663.
7

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MSQ · 3.0 marks

Which of the following statements are correct regarding symbolic execution?
6406537134672.
Each symbolic execution is equivalent to a large number of normal test cases.
6406537134673.
Symbolic execution is equivalent to proving that a program is fully correct.
6406537134674.
Symbolic execution can also be terminated if the program hits an exit statement.
6406537134675.
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.

Report a correction for Q9

Question 10 MSQ · 2.0 marks

Consider the predicate
Source diagram or notation
. Which of the following options are true?
6406537134676.
The predicate is in CNF.
6406537134677.
The predicate has three clauses
6406537134678.
The predicate is in DNF.
6406537134679.
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.

Report a correction for Q10

Question 11 MCQ · 2.0 marks

Consider the control flow graph (CFG),
Source diagram or notation
, where ● Set of vertices
Source diagram or notation
● Set of edges
Source diagram or notation
● Initial vertex
Source diagram or notation
● Final vertex
Source diagram or notation
Based on the above data, answer the given subquestions.
How many decision nodes are there in
Source diagram or notation
?
6406537134680.
2
6406537134681.
3
6406537134682.
4
6406537134683.
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.

Report a correction for Q11

Question 12 MCQ · 3.0 marks

Consider the control flow graph (CFG),
Source diagram or notation
, where ● Set of vertices
Source diagram or notation
● Set of edges
Source diagram or notation
● Initial vertex
Source diagram or notation
● Final vertex
Source diagram or notation
Based on the above data, answer the given subquestions.
How many linearly independent paths are there in
Source diagram or notation
?
6406537134684.
3
6406537134685.
4
6406537134686.
5
6406537134687.
6

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 3.0 marks

Consider the control flow graph (CFG),
Source diagram or notation
, where ● Set of vertices
Source diagram or notation
● Set of edges
Source diagram or notation
● Initial vertex
Source diagram or notation
● Final vertex
Source diagram or notation
Based on the above data, answer the given subquestions.
What is the minimum number of test paths to achieve edge coverage on
Source diagram or notation
?
6406537134688.
1
6406537134689.
2
6406537134690.
3
6406537134691.
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.

Report a correction for Q13

Question 14 MCQ · 3.0 marks

Consider the predicate
Source diagram or notation
and its truth table given below. Note that the blank cells represent the value
Source diagram or notation
in the truth table.
Source diagram or notation
Based on the above data, answer the given subquestions.
Which of the following is the set of GACC pairs for clause
Source diagram or notation
?
6406537134692.Source diagram or notation
6406537134693.Source diagram or notation
6406537134694.Source diagram or notation
6406537134695.Source diagram or notation

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.

Report a correction for Q14

Question 15 MCQ · 3.0 marks

Consider the predicate
Source diagram or notation
and its truth table given below. Note that the blank cells represent the value
Source diagram or notation
in the truth table.
Source diagram or notation
Based on the above data, answer the given subquestions.
Which of the following is the set of RACC pairs for clause
Source diagram or notation
?
6406537134696.Source diagram or notation
6406537134697.Source diagram or notation
6406537134698.Source diagram or notation
6406537134699.Source diagram or notation

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.

Report a correction for Q15

Question 16 MCQ · 3.0 marks

Consider the predicate
Source diagram or notation
and its truth table given below. Note that the blank cells represent the value
Source diagram or notation
in the truth table.
Source diagram or notation
Based on the above data, answer the given subquestions.
Which of the following is the set of RICC pairs for clause
Source diagram or notation
?
6406537134700.Source diagram or notation
for
Source diagram or notation
,
Source diagram or notation
, for
Source diagram or notation
6406537134701.Source diagram or notation
for
Source diagram or notation
,
Source diagram or notation
, for
Source diagram or notation
6406537134702.Source diagram or notation
for
Source diagram or notation
, no feasible pair for
Source diagram or notation
.
6406537134703.Source diagram or notation
for
Source diagram or notation
, no feasible pair for
Source diagram or notation
.

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.

Report a correction for Q16

Question 17 MCQ · 3.0 marks

Consider that concolic testing technique (DART) is used to test the following code segment.
Source diagram or notation
Assume that
Source diagram or notation
and
Source diagram or notation
respresent the symbolic values for the variables
Source diagram or notation
,
Source diagram or notation
respectively in the method
Source diagram or notation
. Answer the given subquestions.
Which of the following options correctly represents the symbolic state (
Source diagram or notation
) at
Source diagram or notation
?
6406537134704.Source diagram or notation
6406537134705.Source diagram or notation
6406537134706.Source diagram or notation
6406537134707.Source diagram or notation

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.

Report a correction for Q17

Question 18 MCQ · 3.0 marks

Consider that concolic testing technique (DART) is used to test the following code segment.
Source diagram or notation
Assume that
Source diagram or notation
and
Source diagram or notation
respresent the symbolic values for the variables
Source diagram or notation
,
Source diagram or notation
respectively in the method
Source diagram or notation
. 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
Source diagram or notation
.
6406537134708.Source diagram or notation
6406537134709.Source diagram or notation
6406537134710.Source diagram or notation
6406537134711.Source diagram or notation

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.

Report a correction for Q18

Question 19 MCQ · 3.0 marks

Consider that concolic testing technique (DART) is used to test the following code segment.
Source diagram or notation
Assume that
Source diagram or notation
and
Source diagram or notation
respresent the symbolic values for the variables
Source diagram or notation
,
Source diagram or notation
respectively in the method
Source diagram or notation
. Answer the given subquestions.
Consider that DART generates a random input:
Source diagram or notation
. Which path constraint (PC) is generated for the next execution at
Source diagram or notation
? Hint: DART negates the PC in the current execution to get the next one.
6406537134712.Source diagram or notation
6406537134713.Source diagram or notation
6406537134714.Source diagram or notation
6406537134715.Source diagram or notation

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.

Report a correction for Q19

Question 20 MCQ · 3.0 marks

Consider that concolic testing technique (DART) is used to test the following code segment.
Source diagram or notation
Assume that
Source diagram or notation
and
Source diagram or notation
respresent the symbolic values for the variables
Source diagram or notation
,
Source diagram or notation
respectively in the method
Source diagram or notation
. Answer the given subquestions.
Which of the following sets of concrete test inputs execute all instances of symbolic execution for the method
Source diagram or notation
?
6406537134716.Source diagram or notation
6406537134717.Source diagram or notation
6406537134718.Source diagram or notation
6406537134719.Source diagram or notation

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.

Report a correction for Q20