MauryaHub PYQ Practice

Software Testing · End Term · May 2026 · FN

Software Testing · End Term · May 2026 FN

← 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 / 20 published solutions

Question 2 MCQ · 5.0 marks

Consider that a web application is being tested. In one of the tests, invalid credentials are provided during the login process, due to which the server responds with an error message stating
Source diagram or notation
. Which of the following categories of server response does the above belong to?
6406537366445.
Valid response
6406537366446.
Abnormal server error
6406537366447.
Exposure
6406537366448.
None of these

Published solution

**1. Identify the distinction:** Rejecting invalid credentials with an expected authentication error is correct application behaviour. An error message for an invalid request is not automatically a server malfunction. **Answer: A — Valid response.** A: **Correct:** A defined rejection is a valid response to the invalid credentials. B: **Incorrect:** A handled authentication rejection is not an unexpected server fault. C: **Incorrect:** Nothing indicates disclosure of sensitive implementation information. D: **Incorrect:** The valid-response category applies.

Report a correction for Q2

Question 3 MCQ · 5.0 marks

Which of the following types of non-functional tests is used to measure the ability of a system to keep operating over specified periods of time?
6406537366449.
Documentation test
6406537366450.
Reliability test
6406537366451.
Spike test
6406537366452.
Scalability test

Published solution

**1. Identify the distinction:** Reliability testing evaluates continued dependable operation over a specified duration. **Answer: B — Reliability test.** A: **Incorrect:** Documentation testing checks manuals and other documentation. B: **Correct:** The property is reliable sustained operation. C: **Incorrect:** Spike testing examines sudden load changes. D: **Incorrect:** Scalability testing concerns growth in workload or resources.

Report a correction for Q3

Question 4 MCQ · 5.0 marks

An organization has developed a recommendation system that performs well for 10,000 users. Before deployment, they want to verify that the system can continue to provide acceptable performance when the number of users grows to 10 million. Which of the following types of testing is appropriate for this?
6406537366453.
Regression Testing
6406537366454.
Scalability Testing
6406537366455.
Usability Testing
6406537366456.
Compatibility Testing

Published solution

**1. Identify the distinction:** The workload is growing from thousands to millions of users. Scalability testing assesses how the system handles that growth while maintaining acceptable performance. **Answer: B — Scalability Testing.** A: **Incorrect:** Regression tests detect behaviour broken by changes. B: **Correct:** The test specifically examines increased scale. C: **Incorrect:** Usability tests examine ease of use. D: **Incorrect:** Compatibility tests examine operation across environments.

Report a correction for Q4

Question 5 MCQ · 5.0 marks

Consider a form in a web application. It has a field for Phone Number, which is a numeric input field with maximum length of 10. While doing client-side testing, we provide the value
Source diagram or notation
for it, which violates the length restriction. Which of the following types of testing does the above scenario represents?
6406537366457.
Parameter level bypass testing
6406537366458.
Control flow level bypass testing
6406537366459.
Value level bypass testing
6406537366460.
User-session data based testing

Published solution

**1. Identify the distinction:** An existing input parameter is supplied a value outside its length constraint. This is value-level bypass testing. **Answer: C — Value level bypass testing.** A: **Incorrect:** Parameter-level bypass changes or omits parameters rather than only their values. B: **Incorrect:** Control-flow bypass skips required application steps. C: **Correct:** The same field is tested with a constraint-violating value. D: **Incorrect:** No stored user-session data is being manipulated.

Report a correction for Q5

Question 6 MCQ · 5.0 marks

A user is logged into a secure dashboard in a web application. After 15 minutes of inactivity, the session is terminated and browser is redirected to the login screen without any user interaction. Which of the following transitions would take place in the Application Transition Graph (ATG) in this scenario?
6406537366461.
Operational Transition
6406537366462.
Form Link Transition
6406537366463.
Redirect Transition
6406537366464.
Simple Link Transition

Published solution

**1. Identify the distinction:** The application automatically sends the user to a different page after session expiration. The navigation is a redirect transition. **Answer: C — Redirect Transition.** A: **Incorrect:** The described navigation is specifically automatic redirection. B: **Incorrect:** No form is being submitted. C: **Correct:** The application redirects without a clicked navigation link. D: **Incorrect:** No simple hyperlink is clicked.

Report a correction for Q6

Question 7 MCQ · 5.0 marks

Consider the following code segment.
Source diagram or notation
A mutant is created by deleting the
Source diagram or notation
call at
Source diagram or notation
. Which of the following mutation operators is used to create this mutant?
6406537366465.
Overriding Method Deletion (OMD)
6406537366466.
Hiding Variable Insertion (HVI)
6406537366467.
Super Keyword Deletion (SKD)
6406537366468.
Parent Constructor Deletion (PCD)

Published solution

**1. Identify the distinction:** The deleted super(speed) expression explicitly invokes a superclass constructor. Deleting that constructor invocation is Parent Constructor Deletion. **Answer: D — Parent Constructor Deletion (PCD).** A: **Incorrect:** No overriding method is deleted. B: **Incorrect:** No hiding field is inserted. C: **Incorrect:** This operator specifically deletes the parent-constructor call, not merely a super qualifier on an ordinary access. D: **Correct:** The removed call is to the superclass constructor.

Report a correction for Q7

Question 8 MCQ · 5.0 marks

Consider ISP with four blocks as
Source diagram or notation
,
Source diagram or notation
,
Source diagram or notation
, and
Source diagram or notation
. How many tests are needed to satisfy All Combinations Coverage (ACoC) criterion?
6406537366469.
32
6406537366470.
64
6406537366471.
18
6406537366472.
48

Published solution

**1. Count partition sizes:** There are 2,4,3,2 blocks respectively. **2. Multiply choices:** All combinations coverage requires \(2\times4\times3\times2=48\) combinations. **Answer: D — 48.** A: **Incorrect:** 32 incorrectly treats the three-block partition as two-block. B: **Incorrect:** 64 incorrectly treats the three-block partition as four-block. C: **Incorrect:** Adding or partially combining partition sizes does not give ACoC. D: **Correct:** This is the Cartesian-product count.

Report a correction for Q8

Question 9 MCQ · 5.0 marks

Consider the following Java program.
Source diagram or notation
Which of the following sets of methods will be invoked in the given program?
6406537366473.Source diagram or notation
6406537366474.Source diagram or notation
6406537366475.Source diagram or notation
6406537366476.Source diagram or notation

Published solution

**1. Resolve inheritance on a C object:** render() is not overridden and comes from A. display() is inherited from B. print() and show() are overridden in C. **2. Follow the calls:** They invoke A.render(), B.display(), C.print(), C.show() in that order. **Answer: D — A.render(), B.display(), C.print(), C.show().** A: **Incorrect:** A.display is overridden and the C versions of print/show must be selected. B: **Incorrect:** C does not define render, and C overrides print. C: **Incorrect:** B does not define render, C does not define display, and A does not define show. D: **Correct:** Every selected implementation follows the inheritance and override rules.

Report a correction for Q9

Question 10 MCQ · 5.0 marks

Consider the following code segment for symbolic execution.
Source diagram or notation
Assume that
Source diagram or notation
respresents the symbolic value for the variable
Source diagram or notation
in the method
Source diagram or notation
. Which of the following path constraints would reach the
Source diagram or notation
call at
Source diagram or notation
?
6406537366477.Source diagram or notation
6406537366478.Source diagram or notation
6406537366479.Source diagram or notation
6406537366480.Source diagram or notation

Published solution

**1. Enter the odd-input branch:** \(!isEven(k)\) requires \(k_0\bmod2\ne0\). **2. Avoid the early return:** The return occurs when \(m>20\), so abort requires \(m\le20\). Since \(m=k_0^2-5\), \[PC=(k_0\bmod2\ne0)\land(k_0^2-5\le20).\] **Answer: B — \(k_0\bmod2\ne0\land k_0^2-5\le20\).** A: **Incorrect:** Even inputs skip the outer branch. B: **Correct:** Odd inputs with m≤20 reach abort. C: **Incorrect:** When m>20, execution returns before abort. D: **Incorrect:** Even inputs skip the branch, and m>20 would return anyway.

Report a correction for Q10

Question 11 MCQ · 5.0 marks

Consider the following code statement (ground string) and a mutant:
Source diagram or notation
Source diagram or notation
Which of the following types of mutation operators is applied to
Source diagram or notation
in the ground string to obtain
Source diagram or notation
?
6406537366481.
Scalar variable replacement
6406537366482.
Arithmetic operator replacement
6406537366483.
Logical operator replacement
6406537366484.
Assignment operator replacement

Published solution

**1. Identify the distinction:** The mutation changes logical OR to Boolean XOR while retaining the variables and assignment structure. This is logical operator replacement. **Answer: C — Logical operator replacement.** A: **Incorrect:** The operands are not replaced by other scalar variables. B: **Incorrect:** The changed operation is Boolean rather than arithmetic. C: **Correct:** OR is replaced with XOR. D: **Incorrect:** The assignment operator remains unchanged.

Report a correction for Q11

Question 12 MCQ · 5.0 marks

Consider the following data flow graph.
Source diagram or notation
How many test requirements are there for All-Uses Coverage for the variable
Source diagram or notation
?
6406537366485.
3
6406537366486.
4
6406537366487.
5
6406537366488.
6

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 5.0 marks

Consider a context free grammar
Source diagram or notation
over a finite alphabet
Source diagram or notation
. The following are the production rules for
Source diagram or notation
:
Source diagram or notation
Source diagram or notation
Source diagram or notation
Source diagram or notation
Let
Source diagram or notation
be the starting symbol. Which of the following sets represents the language
Source diagram or notation
generated by the given grammar?
6406537366489.Source diagram or notation
6406537366490.Source diagram or notation
6406537366491.Source diagram or notation
6406537366492.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 5.0 marks

Consider the following Java program.
Source diagram or notation
Source diagram or notation
6406537366493.
State Definition Anomaly (SDA)
6406537366494.
State Definition Inconsistency Anomaly (SDIA)
6406537366495.
Inconsistent Type Use (ITU)
6406537366496.
State Visibility Anomaly (SVA)

Published solution

**1. Identify field hiding:** Polygon declares another y field, distinct from Shape.y. Triangle.setY changes Polygon.y, while the inherited Shape.print reads Shape.y. **2. Trace the values:** setX(240) writes the inherited x as 250, and setY(30) writes the hidden y as 90. Shape.y remains 0, so the actual printout is x=250,y=0. **3. Classify the mismatch:** A method defines one hidden state field while another uses the ancestor field. This is a state-definition inconsistency. **Answer: B — State Definition Inconsistency Anomaly.** **Convention note:** The source’s prose claims x=240,y=0, but the shown setX method adds 10, so the actual x is 250. The y inconsistency and selected anomaly remain as derived. A: **Incorrect:** The particular cause is two distinct hidden fields, not merely failing to define a variable. B: **Correct:** Definitions and uses refer to different fields because y is hidden. C: **Incorrect:** The object is not being used as an incompatible type. D: **Incorrect:** The stated anomaly is caused by field hiding, not merely changing visibility.

Report a correction for Q14

Question 15 MCQ · 5.0 marks

Consider the following code segment of a Java servlet. The atomic sections are marked as
Source diagram or notation
.
Source diagram or notation
Identify the component expression that corresponds to the given code segment.
6406537366497.Source diagram or notation
6406537366498.Source diagram or notation
6406537366499.Source diagram or notation
6406537366500.Source diagram or notation

Published solution

**1. Model the outer choice:** After P1, null scores execute P2; otherwise P3 repeats for each score, then P4 executes once. **2. Model the inner choice and finish:** Exactly one of P5 or P6 follows P4, and P7 always finishes the response. **3. Combine:** \[P_1\cdot\left(P_2\mid P_3^*\cdot P_4\cdot(P_5\mid P_6)\right)\cdot P_7.\] **Answer: D — \(P_1(P_2\mid P_3^*P_4(P_5\mid P_6))P_7\).** A: **Incorrect:** Its grouping permits P6 without the required loop and P4 computation. B: **Incorrect:** This repeats the wrong section and places the choices in the wrong structure. C: **Incorrect:** P4 is executed once; the repeated loop body is P3. D: **Correct:** The expression represents the outer alternative, P3 repetition, inner choice and final P7.

Report a correction for Q15

Question 16 MSQ · 5.0 marks

Consider test-driven development (TDD) for an online banking application that handles daily ATM withdrawal limit settings. A user story requires that a custom daily withdrawal limit requested by a customer must be validated before updating their account preferences. Consider the following unit tests written for this user story:
Source diagram or notation
Which of the following method implementations satisfy the given test suite according to TDD principles?
6406537366501.Source diagram or notation
6406537366502.Source diagram or notation
6406537366503.Source diagram or notation
6406537366504.Source diagram or notation

Published solution

**1. Read the tests:** 50,500,2000 must be valid; 49 and 2001 invalid. Both limits are inclusive. **2. Compare implementations:** B rejects amount<50 or amount>2000. D rejects amount≤49 or amount≥2001, an equivalent condition for integers. A rejects the valid boundaries; C fails to reject 2001. **Answer: B, D — Implementations B and D.** A: **Incorrect:** The ≤50 and ≥2000 guards wrongly reject both valid endpoints. B: **Correct:** The strict outside-range checks pass all five tests. C: **Incorrect:** There is no upper-bound guard, so 2001 incorrectly succeeds. D: **Correct:** For integers, ≤49 and ≥2001 reject exactly the out-of-range values.

Report a correction for Q16

Question 17 MSQ · 5.0 marks

Consider the following finite state machine (FSM).
Source diagram or notation
Which of the following sequences can be accepted by the given FSM?
6406537366505.Source diagram or notation
6406537366506.Source diagram or notation
6406537366507.Source diagram or notation
6406537366508.Source diagram or notation

Published solution

**1. Follow the automaton:** S4 is accepting. The upper branch starts with 0 and then toggles between S2 and S4 on 1; the lower branch starts with 1, permits zeros at S3, then reaches S4 on 1. **2. Trace the candidates:** 011111 ends at S4; 100001 ends at S4. 011011 tries a missing 0-transition after reaching S2, while 100011 ends at nonaccepting S2. **Answer: B, C — 011111 and 100001.** A: **Incorrect:** After prefix 011, the machine is at S2, which has no 0-transition. B: **Correct:** The five 1s after initial 0 end at S4. C: **Correct:** Initial 1 enters S3, zeros stay there, and final 1 reaches S4. D: **Incorrect:** The last 1 moves from S4 to nonaccepting S2.

Report a correction for Q17

Question 18 MCQ · 5.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 literal
Source diagram or notation
?
6406537366509.Source diagram or notation
6406537366510.Source diagram or notation
6406537366511.Source diagram or notation
6406537366512.Source diagram or notation

Published solution

Rows 1–8 use TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF for \(p=(a\lor\neg b)\land c\). **1. Activate b:** b determines p only when \(a=false\) and \(c=true\). Otherwise a masks it or c forces p=false. **2. Keep minors fixed and flip b:** Rows 5 and 7 are (F,T,T) and (F,F,T), giving p=false and p=true. Hence the sole RACC pair is (5,7). **Answer: C — {(5,7)}.** A: **Incorrect:** Only (5,7) holds the minors fixed with b active; the other included pairs are inactive. B: **Incorrect:** (6,8) has c=false and therefore b inactive. C: **Correct:** Rows 5 and 7 are the only fixed-minor active pair. D: **Incorrect:** These have a=true, which masks b.

Report a correction for Q18

Question 19 MCQ · 5.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 literal
Source diagram or notation
?
6406537366513.Source diagram or notation
for
Source diagram or notation
,
Source diagram or notation
for
Source diagram or notation
6406537366514.Source diagram or notation
for
Source diagram or notation
,
Source diagram or notation
for
Source diagram or notation
6406537366515.Source diagram or notation
for
Source diagram or notation
, no feasible pair for
Source diagram or notation
6406537366516.Source diagram or notation
for
Source diagram or notation
,
Source diagram or notation
for
Source diagram or notation

Published solution

Rows 1–8 use TTT, TTF, TFT, TFF, FTT, FTF, FFT, FFF for \(p=(a\lor\neg b)\land c\). **1. Make b inactive:** If a=true, p=c regardless of b. If c=false, p=false regardless of b. **2. Keep a,c fixed and flip b:** Pair (1,3) keeps p=true; pairs (2,4) and (6,8) keep p=false. The remaining pair (5,7) is active. **Answer: D — {(1,3)} for p=true; {(2,4),(6,8)} for p=false.** A: **Incorrect:** (1,5) changes a instead of b, and other listed pairs do not preserve the required outcome. B: **Incorrect:** The listed pairs do not hold a,c fixed and b inactive. C: **Incorrect:** (5,7) is an active rather than inactive pair. D: **Correct:** All three pairs flip only b while keeping p unchanged.

Report a correction for Q19

Question 20 MCQ · 5.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 cyclomatic complexity of
Source diagram or notation
?
6406537366517.
6
6406537366518.
5
6406537366519.
4
6406537366520.
3

Published solution

**1. Count elements:** There are 7 nodes and 9 edges in one connected CFG. **2. Use the formula:** \[V(G)=E-N+2=9-7+2=4.\] **Answer: C — 4.** A: **Incorrect:** The formula gives 4, not 6. B: **Incorrect:** The formula gives 4, not 5. C: **Correct:** The connected CFG has cyclomatic complexity 4. D: **Incorrect:** Three counts branching nodes but omits the base path.

Report a correction for Q20

Question 21 MCQ · 5.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 test requirements are there for edge-pair coverage on
Source diagram or notation
?
6406537366521.
11
6406537366522.
10
6406537366523.
8
6406537366524.
9

A published solution is not available for this question yet.

Report a correction for Q21