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
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?
Performance Testing
Regression Testing
Functional Testing
Usability Testing
**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.
Question 3 MCQ · 5.0 marks
Which of the following options best describes the main objective of integration testing?
To verify that individual code units work correctly in isolation.
To verify that different modules and components work together correctly after
being combined.
To verify that the entire system meets all user requirements and business
specifications.
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.
Question 4 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?
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.
Question 5 MCQ · 5.0 marks
Polymorphism factor belongs to which of the following categories of software metrics?
Product Quality Metrics
Object-Oriented Software Metrics
Maintainance Quality Metrics
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.
Question 6 MCQ · 5.0 marks
Which type of client-side testing executes test cases that replay user interactions with the web
application?
Parameter level bypass testing
Control flow level bypass testing
Value level bypass testing
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.
Question 7 MCQ · 5.0 marks
The following table lists some access modifiers in object oriented programming.
Match each visibility scope with the appropriate access modifier.
1 - A, 2 - C, 3 - B
1 - A, 2 - B, 3 - C
1 - B, 2 - C, 3 - A
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.
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?
Operational Transition
Form Link Transition
Redirect Transition
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.
Question 9 MCQ · 5.0 marks
Consider the following code segment.
A mutant needs to be created by removing the declaration of
in
. Which of the
following mutation operators can be used for this purpose?
Super Keyword Deletion (SKD)
Overriding Method Deletion (OMD)
Parent Constructor Deletion (PCD)
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.
Question 10 MCQ · 5.0 marks
Consider ISP with four blocks as
,
,
, and
. How many
tests are needed to satisfy All Combinations Coverage (ACoC) criterion?
48
36
24
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.
Question 11 MCQ · 5.0 marks
Consider the following Java program.
Which of the following types of anomalies or faults are present in the given scenario?
State Definition Anomaly (SDA)
State Definition Inconsistency Anomaly (SDIA)
Inconsistent Type Use (ITU)
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.
Question 12 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 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.
Question 13 MCQ · 5.0 marks
Consider the following code segment for symbolic execution.
Assume that
and
represent the symbolic values for the variables
and
in the method
. Which of the following path constraints would reach the
call at
?
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.
Question 14 MCQ · 5.0 marks
Consider the following code statement (ground string) and a mutant:
Which of the following types of mutation operators can be applied to the ground string to obtain
?
Scalar variable replacement
Arithmetic operator replacement
Relational operator replacement
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.
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. 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.
Question 16 MCQ · 5.0 marks
Consider the following data flow graph.
Given a set of test paths
, which of the following coverage criteria is satisfied
for the variable
?
All-Defs Coverage only
All-Uses Coverage only
All-DU-Paths Coverage
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.
Question 17 MSQ · 4.0 marks
Consider the following finite state machine (FSM).
Which of the following are correct regarding the given FSM?
Sequence
can be accepted by this FSM
There are 11 test requirements for transition coverage
There are 5 test requirements for transition coverage
Sequence
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.
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.
Which of the following are the appropriate implementations of the
method in the
class?
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.
Question 19 MCQ · 4.0 marks
Based on the above data, answer the given subquestions.
Which of the following is the set of RACC pairs for clause
?
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.
Question 20 MCQ · 4.0 marks
Based on the above data, answer the given subquestions.
Which of the following is the set of RICC pairs for clause
?
, for
, no feasible pair for
, for
, no feasible pair for
for
,
, for
for
,
, for
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.
Question 21 MCQ · 4.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
3
4
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.
Question 22 MCQ · 4.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
?
6
9
8
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.