MauryaHub PYQ Practice

Software Testing · End Term · Jan 2026 · FN

Software Testing · End Term · Jan 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.

21 / 21 published solutions

Question 2 MCQ · 5.0 marks

A software application allows users to create accounts, log in, transfer funds between accounts, and generate transaction reports. Which of the following types of testing is performed to verify that each of these features works according to the specified requirements and produces the expected results?
6406536958895.
Performance Testing
6406536958896.
Regression Testing
6406536958897.
Functional Testing
6406536958898.
Usability Testing

Published solution

**1. Match the objective:** Checking that account creation, login, transfers and reports produce their specified results is functional testing. **Answer: C — Functional Testing.** A: **Incorrect:** Performance testing evaluates speed and resource use. B: **Incorrect:** Regression testing checks that changes have not broken established behaviour. C: **Correct:** The specified feature behaviour and outputs are being verified. D: **Incorrect:** Usability testing evaluates ease of use.

Report a correction for Q2

Question 3 MCQ · 5.0 marks

Which of the following options best describes the main objective of integration testing?
6406536958899.
To verify that individual code units work correctly in isolation.
6406536958900.
To verify that different modules and components work together correctly after being combined.
6406536958901.
To verify that the entire system meets all user requirements and business specifications.
6406536958902.
To verify that the application performs well under high load and stress conditions.

Published solution

**1. Identify the scope:** Integration testing targets interfaces and interactions between combined modules, rather than isolated units or only whole-product acceptance. **Answer: B — To verify that different modules and components work together correctly after .** A: **Incorrect:** This is unit testing. B: **Correct:** Combined-component interaction is the integration-testing objective. C: **Incorrect:** This describes overall system or acceptance verification. D: **Incorrect:** This describes load/stress performance testing.

Report a correction for Q3

Question 4 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
Let
Source diagram or notation
be the starting symbol. Which of the following sets represents the language generated by the given grammar?
6406536958903.Source diagram or notation
6406536958904.Source diagram or notation
6406536958905.Source diagram or notation
6406536958906.Source diagram or notation

Published solution

**1. Expand the recursive rule:** After k uses of \(Y\to aYa\), then \(Y\to a\), Y becomes \(a^{2k+1}\), with \(k\ge0\). **2. Add S’s surrounding b symbols:** \[L(G)=\{ba^{2k+1}b\mid k\ge0\}.\] The shortest string is bab. **3. Compare the available formulas:** B is the intended odd-a formula, but its printed bound n≥1 wrongly omits bab. **Answer: B — B with corrected bound: {ba^(2n+1)b | n≥0}.** **Convention note:** No option exactly matches the rules. B is the intended formula after correcting n≥1 to n≥0; the direct derivation S→bYb→bab proves that the printed bound is wrong. A: **Incorrect:** It gives an even number of a symbols rather than an odd number. B: **Correct:** It has the intended odd exponent, but the bound must be n≥0 for the full language. C: **Incorrect:** The grammar produces exactly one b at each end, not growing b groups. D: **Incorrect:** It gives an even number of a symbols.

Report a correction for Q4

Question 5 MCQ · 5.0 marks

Polymorphism factor belongs to which of the following categories of software metrics?
6406536958907.
Product Quality Metrics
6406536958908.
Object-Oriented Software Metrics
6406536958909.
Maintainance Quality Metrics
6406536958910.
In-Process Quality Metrics

Published solution

**1. Identify the measured feature:** Polymorphism factor quantifies object-oriented overriding/polymorphic behaviour, making it an object-oriented software metric. **Answer: B — Object-Oriented Software Metrics.** A: **Incorrect:** General product quality is not the specific metric family asked for. B: **Correct:** Polymorphism is an object-oriented property. C: **Incorrect:** This is not a maintenance-process measure. D: **Incorrect:** This is not a measure of development-process progress.

Report a correction for Q5

Question 6 MCQ · 5.0 marks

Which type of client-side testing executes test cases that replay user interactions with the web application?
6406536958911.
Parameter level bypass testing
6406536958912.
Control flow level bypass testing
6406536958913.
Value level bypass testing
6406536958914.
User-session data based testing

Published solution

**1. Use recorded behaviour:** User-session testing replays previously captured user interactions to exercise web workflows. **Answer: D — User-session data based testing.** A: **Incorrect:** Parameter bypass changes or omits parameters. B: **Incorrect:** Control-flow bypass skips required workflow steps. C: **Incorrect:** Value bypass provides invalid parameter values. D: **Correct:** Recorded sessions supply replayable user interactions.

Report a correction for Q6

Question 7 MCQ · 5.0 marks

The following table lists some access modifiers in object oriented programming.
Source diagram or notation
Match each visibility scope with the appropriate access modifier.
6406536958915.
1 - A, 2 - C, 3 - B
6406536958916.
1 - A, 2 - B, 3 - C
6406536958917.
1 - B, 2 - C, 3 - A
6406536958918.
1 - B, 2 - A, 3 - C

Published solution

**1. Match the scopes:** Protected permits class/subclass access, private restricts access to the declaring class, and public permits general access. **2. Match the table:** Protected→A, Private→C, Public→B. **Answer: A — 1–A, 2–C, 3–B.** **Convention note:** The table uses simplified OO visibility descriptions. Language-specific rules, such as Java’s package access for protected members, add details. A: **Correct:** All three modifier-to-scope assignments match the table. B: **Incorrect:** This swaps private and public scopes. C: **Incorrect:** Protected is not unrestricted public access. D: **Incorrect:** This mismatches all three scopes.

Report a correction for Q7

Question 8 MCQ · 5.0 marks

A user is on the Search Results page of a travel website. They decide they want to start over, so they click the browser's "Back" button to return to the Search Input page. Which type of transition would take place in the Application Transition Graph (ATG) in this scenario?
6406536958919.
Operational Transition
6406536958920.
Form Link Transition
6406536958921.
Redirect Transition
6406536958922.
Simple Link Transition

Published solution

**1. Identify the navigation trigger:** Browser Back is a browser operation, not an application link click, form submission or server redirect. In the ATG taxonomy it is an operational transition. **Answer: A — Operational Transition.** A: **Correct:** Browser navigation operations produce operational transitions. B: **Incorrect:** No form is submitted. C: **Incorrect:** The application is not automatically redirecting the user. D: **Incorrect:** No hyperlink is clicked.

Report a correction for Q8

Question 9 MCQ · 5.0 marks

Consider the following code segment.
Source diagram or notation
A mutant needs to be created by removing the declaration of
Source diagram or notation
in
Source diagram or notation
. Which of the following mutation operators can be used for this purpose?
6406536958923.
Super Keyword Deletion (SKD)
6406536958924.
Overriding Method Deletion (OMD)
6406536958925.
Parent Constructor Deletion (PCD)
6406536958926.
Hiding Variable Deletion (HVD)

Published solution

**1. Identify the hiding field:** B declares value even though A already declares value, creating a distinct hidden field. **2. Identify the mutant change:** Removing B’s declaration removes that field hiding: Hiding Variable Deletion. **Answer: D — Hiding Variable Deletion (HVD).** A: **Incorrect:** No super keyword is deleted. B: **Incorrect:** No overriding method is deleted. C: **Incorrect:** No superclass constructor call is deleted. D: **Correct:** The deleted declaration is the descendant field hiding an ancestor field.

Report a correction for Q9

Question 10 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?
6406536958927.
48
6406536958928.
36
6406536958929.
24
6406536958930.
12

Published solution

**1. Count blocks:** The partition sizes are 3,3,2,2. **2. Multiply:** \(ACoC=3\times3\times2\times2=36\). **Answer: B — 36.** A: **Incorrect:** The stated structure gives 36, rather than 48. B: **Correct:** This equals the independently counted result 36. C: **Incorrect:** The stated structure gives 36, rather than 24. D: **Incorrect:** The stated structure gives 36, rather than 12.

Report a correction for Q10

Question 11 MCQ · 5.0 marks

Consider the following Java program.
Source diagram or notation
Source diagram or notation
Which of the following types of anomalies or faults are present in the given scenario?
6406536958931.
State Definition Anomaly (SDA)
6406536958932.
State Definition Inconsistency Anomaly (SDIA)
6406536958933.
Inconsistent Type Use (ITU)
6406536958934.
State Visibility Anomaly (SVA)

Published solution

**1. Trace the hidden state:** updateReading(30) writes the ZoneController.temperature field as 90. displayLogs() is inherited from MasterController and reads its different temperature field, still 0. **2. Classify:** A descendant definition and ancestor use refer to different hidden fields, giving a state-definition inconsistency. **3. Check the other field:** configureId(8) adds 10, so the actual displayed device ID is 18, not 8. **Answer: B — State Definition Inconsistency Anomaly.** **Convention note:** The source prose reports Device=8,Temp=0. The displayed code instead prints Device=18,Temp=0; this does not change the hidden-temperature anomaly. A: **Incorrect:** The specific cause is hidden-field inconsistency, not merely an omitted definition. B: **Correct:** Definition and use target different temperature fields. C: **Incorrect:** No incompatible object type is supplied. D: **Incorrect:** The root cause is field hiding rather than a visibility-only change.

Report a correction for Q11

Question 12 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?
6406536958935.Source diagram or notation
6406536958936.Source diagram or notation
6406536958937.Source diagram or notation
6406536958938.Source diagram or notation

Published solution

**1. Resolve a C object’s inherited methods:** u is overridden in B; v is overridden in C; w is defined in B; x is overridden in C. **2. Follow the four calls:** B.u(), C.v(), B.w(), C.x() execute in order. **Answer: D — B.u(), C.v(), B.w(), C.x().** A: **Incorrect:** A.u and A.x are overridden. B: **Incorrect:** u,v,x have later overriding definitions. C: **Incorrect:** v and x are overridden in C. D: **Correct:** Each method is resolved to its most specific implementation.

Report a correction for Q12

Question 13 MCQ · 5.0 marks

Consider the following code segment for symbolic execution.
Source diagram or notation
Assume that
Source diagram or notation
and
Source diagram or notation
represent the symbolic values for the variables
Source diagram or notation
and
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
?
6406536958939.Source diagram or notation
6406536958940.Source diagram or notation
6406536958941.Source diagram or notation
6406536958942.Source diagram or notation

Published solution

**1. Enter the active branch:** isActive(s) requires \(s_0=1\). **2. Avoid the return:** projectedTemp<100 returns early, so abort requires \(t_0+15\ge100\). **3. Combine:** \[(s_0=1)\land(t_0+15\ge100).\] **Answer: C — \(s_0=1\land t_0+15\ge100\).** A: **Incorrect:** This temperature condition returns before abort. B: **Incorrect:** Inactive status skips the outer block. C: **Correct:** Both required conditions are conjoined. D: **Incorrect:** OR admits inputs that do not satisfy both necessary branches.

Report a correction for Q13

Question 14 MCQ · 5.0 marks

Consider the following code statement (ground string) and a mutant:
Source diagram or notation
Which of the following types of mutation operators can be applied to the ground string to obtain
Source diagram or notation
?
6406536958943.
Scalar variable replacement
6406536958944.
Arithmetic operator replacement
6406536958945.
Relational operator replacement
6406536958946.
Assignment operator replacement

Published solution

**1. Compare the condition:** The mutant changes currentInventory≥threshold into currentInventory>threshold. Only the comparison relation changes. **2. Classify the mutation:** This is relational operator replacement; equality-at-threshold behaviour is changed. **Answer: C — Relational operator replacement.** A: **Incorrect:** The variable names are unchanged. B: **Incorrect:** No arithmetic operation changes. C: **Correct:** The ≥ comparison is replaced with >. D: **Incorrect:** No assignment operator changes.

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.
6406536958947.Source diagram or notation
6406536958948.Source diagram or notation
6406536958949.Source diagram or notation
6406536958950.Source diagram or notation

Published solution

**1. Read the control structure:** P1 initializes and retrieves data. Null data takes P2; valid data repeats P3 for the readings, computes P4 once, then chooses P5 or P6. **2. Append the common finish:** Both branches end in P7, giving \[P_1(P_2\mid P_3^*P_4(P_5\mid P_6))P_7.\] **Answer: A — \(P_1(P_2\mid P_3^*P_4(P_5\mid P_6))P_7\).** A: **Correct:** The choices, repeated P3 and one-time P4 occur in the correct order. B: **Incorrect:** P4 is not the repeated loop body. C: **Incorrect:** This repeats the invalid-data action and groups alternatives incorrectly. D: **Incorrect:** It permits P6 without the required loop/average-computation prefix.

Report a correction for Q15

Question 16 MCQ · 5.0 marks

Consider the following data flow graph.
Source diagram or notation
Given a set of test paths
Source diagram or notation
, which of the following coverage criteria is satisfied for the variable
Source diagram or notation
?
6406536958951.
All-Defs Coverage only
6406536958952.
All-Uses Coverage only
6406536958953.
All-DU-Paths Coverage
6406536958954.
None of these

Published solution

**1. Cover both definitions:** x is defined at node 1 and redefined at node 3. Path 1-2-5 carries definition 1 to print(x); path 1-3-4-5 carries definition 3 to print(x). **2. Check stronger criteria:** The test set omits predicate-use edges such as 1→4 and 2→4. It therefore fails all-uses and consequently all-du-paths coverage. **Answer: A — All-Defs Coverage only.** A: **Correct:** Each x definition reaches a use in the test set. B: **Incorrect:** Some reachable predicate uses are not covered. C: **Incorrect:** The test set omits reachable uses and du paths. D: **Incorrect:** All-defs is satisfied.

Report a correction for Q16

Question 17 MSQ · 4.0 marks

Consider the following finite state machine (FSM).
Source diagram or notation
Which of the following are correct regarding the given FSM?
6406536958955.
Sequence
Source diagram or notation
can be accepted by this FSM
6406536958956.
There are 11 test requirements for transition coverage
6406536958957.
There are 5 test requirements for transition coverage
6406536958958.
Sequence
Source diagram or notation
can be accepted by this FSM

Published solution

**1. Count labelled transitions:** The graph contains A,B,C,D,U,V,W,P,Q,X,Y: eleven transitions. **2. Trace the strings:** ACAWQ follows 1→2→1→2→5→6 and ends in accepting state 6. ACVXY follows 1→2→1→6→5→4 and ends in nonaccepting state 4. **Answer: B, D — 11 transition requirements; ACAWQ is accepted.** A: **Incorrect:** ACVXY ends at state 4 rather than accepting state 6. B: **Correct:** Each of the eleven labelled transitions is a coverage requirement. C: **Incorrect:** Five does not count all the graph’s transitions. D: **Correct:** ACAWQ ends in the accepting state 6.

Report a correction for Q17

Question 18 MSQ · 5.0 marks

Consider a Test-Driven Development (TDD) approach for a retail management system. A specific user story requires that a store manager can apply a percentage-based discount to a product. The discount value must be validated upon entry to ensure it falls within a specific operational range. Consider the following JUnit test for this user story.
Source diagram or notation
Which of the following are the appropriate implementations of the
Source diagram or notation
method in the
Source diagram or notation
class?
6406536958959.Source diagram or notation
6406536958960.Source diagram or notation
6406536958961.Source diagram or notation
6406536958962.Source diagram or notation

Published solution

**1. Read the tested interval:** 0,50,75 must return true; −1 and 76 must return false. The intended interval is inclusive 0≤discount≤75. **2. Evaluate guards:** B explicitly checks both inclusive bounds. D rejects values below 0 or above 75. A misses the lower bound; C excludes both valid endpoints. **Answer: B, D — Implementations B and D.** A: **Incorrect:** It wrongly accepts −1. B: **Correct:** It checks both inclusive endpoints and rejects outside values. C: **Incorrect:** Strict bounds wrongly reject 0 and 75. D: **Correct:** The two rejection checks are equivalent to the inclusive interval.

Report a correction for Q18

Question 19 MCQ · 4.0 marks

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
?
6406536958963.Source diagram or notation
6406536958964.Source diagram or notation
6406536958965.Source diagram or notation
6406536958966.Source diagram or notation

Published solution

**1. Activate a:** For \(p=(c\lor\neg b)\land\neg a\), a determines p when \(c\lor\neg b=true\). **2. Keep b,c fixed and flip a:** Valid pairs are (1,5), (3,7), and (4,8); each changes the predicate outcome. **Answer: C — {(1,5),(3,7),(4,8)}.** A: **Incorrect:** (2,6) has b=true,c=false and makes a inactive. B: **Incorrect:** (2,6) is inactive rather than active. C: **Correct:** All three pairs keep the minors fixed and a active. D: **Incorrect:** (1,6) changes c as well as a.

Report a correction for Q19

Question 20 MCQ · 4.0 marks

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
?
6406536958967.Source diagram or notation
, for
Source diagram or notation
, no feasible pair for
Source diagram or notation
6406536958968.Source diagram or notation
, for
Source diagram or notation
, no feasible pair for
Source diagram or notation
6406536958969.Source diagram or notation
for
Source diagram or notation
,
Source diagram or notation
, for
Source diagram or notation
6406536958970.Source diagram or notation
for
Source diagram or notation
,
Source diagram or notation
, for
Source diagram or notation

Published solution

**1. Make a inactive:** The other factor must be false, so c=false and b=true. Then p=false regardless of a. **2. Flip only a:** Rows 2 and 6 have those fixed minors, giving the sole RICC pair for p=false. No inactive pair can have p=true. **Answer: B — (2,6) for p=false; none for p=true.** A: **Incorrect:** These are active pairs with changing outcomes. B: **Correct:** (2,6) keeps p=false while only a changes. C: **Incorrect:** The listed pairs are active and their outcome classification is wrong. D: **Incorrect:** The listed active pairs do not satisfy inactivity.

Report a correction for Q20

Question 21 MCQ · 4.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
?
6406536958971.
6
6406536958972.
3
6406536958973.
4
6406536958974.
5

Published solution

**1. Count elements:** The connected CFG has 6 nodes and 8 edges. **2. Calculate:** \(V=8-6+2=4\). **Answer: C — 4.** A: **Incorrect:** The stated structure gives 4, rather than 6. B: **Incorrect:** The stated structure gives 4, rather than 3. C: **Correct:** This equals the independently counted result 4. D: **Incorrect:** The stated structure gives 4, rather than 5.

Report a correction for Q21

Question 22 MCQ · 4.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
?
6406536958975.
6
6406536958976.
9
6406536958977.
8
6406536958978.
7

Published solution

**1. Enumerate the length-two paths:** 1-2-3, 1-2-5, 1-3-4, 1-3-6, 2-3-4, 2-3-6, 2-5-6, 3-4-5, 4-5-6. **2. Count each adjacent-edge requirement:** There are nine distinct edge pairs. **Answer: B — 9.** A: **Incorrect:** The stated structure gives 9, rather than 6. B: **Correct:** This equals the independently counted result 9. C: **Incorrect:** The stated structure gives 9, rather than 8. D: **Incorrect:** The stated structure gives 9, rather than 7.

Report a correction for Q22