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
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
.
Which of the following categories of server response does the above belong to?
Valid response
Abnormal server error
Exposure
None of these
**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.
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?
Documentation test
Reliability test
Spike test
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.
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?
Regression Testing
Scalability Testing
Usability Testing
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.
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
for it, which violates the length restriction.
Which of the following types of testing does the above scenario represents?
Parameter level bypass testing
Control flow level bypass testing
Value level bypass testing
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.
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?
Operational Transition
Form Link Transition
Redirect Transition
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.
Question 7 MCQ · 5.0 marks
Consider the following code segment.
A mutant is created by deleting the
call at
. Which of the following
mutation operators is used to create this mutant?
Overriding Method Deletion (OMD)
Hiding Variable Insertion (HVI)
Super Keyword Deletion (SKD)
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.
Question 8 MCQ · 5.0 marks
Consider ISP with four blocks as
,
,
, and
. How
many tests are needed to satisfy All Combinations Coverage (ACoC) criterion?
32
64
18
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.
Question 9 MCQ · 5.0 marks
Consider the following Java program.
Which of the following sets of methods will be invoked in the given program?
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.
Question 10 MCQ · 5.0 marks
Consider the following code segment for symbolic execution.
Assume that
respresents the symbolic value for the variable
in the method
. Which of the following path constraints would reach the
call at
?
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.
Question 11 MCQ · 5.0 marks
Consider the following code statement (ground string) and a mutant:
Which of the following types of mutation operators is applied to
in the ground string to
obtain
?
Scalar variable replacement
Arithmetic operator replacement
Logical operator replacement
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.
Question 12 MCQ · 5.0 marks
Consider the following data flow graph.
How many test requirements are there for All-Uses Coverage for the variable
?
3
4
5
6
A published solution is not available for this question yet.
Question 13 MCQ · 5.0 marks
Consider a context free grammar
over a finite alphabet
. The following are the
production rules for
:
Let
be the starting symbol. Which of the following sets represents the language
generated by the given grammar?
A published solution is not available for this question yet.
Question 14 MCQ · 5.0 marks
Consider the following Java program.
State Definition Anomaly (SDA)
State Definition Inconsistency Anomaly (SDIA)
Inconsistent Type Use (ITU)
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.
Question 15 MCQ · 5.0 marks
Consider the following code segment of a Java servlet. The atomic sections are marked as
.
Identify the component expression that corresponds to the given code segment.
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.
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:
Which of the following method implementations satisfy the given test suite according to TDD
principles?
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.
Question 17 MSQ · 5.0 marks
Consider the following finite state machine (FSM).
Which of the following sequences can be accepted by the given FSM?
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.
Question 18 MCQ · 5.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 literal
?
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.
Question 19 MCQ · 5.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 literal
?
for
,
for
for
,
for
for
, no feasible pair for
for
,
for
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.
Question 20 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
?
6
5
4
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.
Question 21 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
?
11
10
8
9
A published solution is not available for this question yet.