Software Testing · End Term · Jan 2026 · AN
Software Testing · End Term · Jan 2026 AN
← 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
Consider that an organization has developed an e-commerce system. After a release that
refactored the checkout flow and updated the payment gateway integration, which type of testing
should be performed to ensure these existing features still function correctly and no previously
working behavior was broken?
Performance Testing
Regression Testing
Functional Testing
Usability Testing
**1. Identify the risk:** Checkout and payment previously worked, but refactoring and integration changes can accidentally break their existing behavior.
**2. Recheck established behavior:** Regression testing reruns suitable tests to detect such unintended breakage. These may be functional tests, but regression describes why they are being rerun after a change. Performance and usability have different specific goals.
**Answer: B.**
A: **Incorrect:** Performance testing measures responsiveness or capacity rather than specifically detecting regressions.
B: **Correct:** Regression testing checks that changes have not broken previously working behavior.
C: **Incorrect:** Functional tests can be part of the regression suite, but regression is the more precise purpose here.
D: **Incorrect:** Usability testing concerns users' ease of interaction.
Question 3 MCQ · 5.0 marks
Which of the following options best describes the main objective of usability testing?
To ensure that the software code is free of syntax errors and logical bugs.
To verify that the software installs correctly across different operating systems
and hardware configurations.
To evaluate how easily and intuitively a representative user can interact with
the product to achieve their goals.
To confirm that the application’s database can handle a high volume of
concurrent transactions.
Published solution
**1. Define the target:** Usability concerns whether representative users can achieve their goals effectively, efficiently and with an understandable interaction.
**2. Test with users and tasks:** Observing users attempt realistic tasks can reveal confusing labels, navigation difficulties or error-prone controls. Syntax checks, installation compatibility and database capacity do not directly answer that usability question.
**Answer: C.**
A: **Incorrect:** Code correctness and syntax are not the principal usability objective.
B: **Incorrect:** Installation and compatibility testing concern deployment across environments.
C: **Correct:** This directly measures ease and intuitiveness of user interaction toward goals.
D: **Incorrect:** High transaction volume concerns performance and scalability.
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. Start with S:** The rule S→aXa places one a at each end. Those outer letters are fixed and are not repeated by any rule.
**2. Expand X:** Each use of X→bX adds one b. Eventually X→b terminates the derivation, so at least one b is required. This gives X⇒b to the power n for every integer n≥1.
**3. Combine:** The language is \(\{ab^na:n\geq1\}\). For example, S⇒aXa⇒aba, or S⇒aXa⇒abXa⇒abba. Empty interiors and repeated aba blocks cannot be generated.
**Answer: D.**
A: **Incorrect:** The grammar does not recursively add matching a blocks at the two ends.
B: **Incorrect:** Repeated aba blocks are not the derivation pattern.
C: **Incorrect:** Allowing n=0 would include aa, but X has no empty production.
D: **Correct:** There is exactly one a at each end and one or more b letters between them.
Question 5 MCQ · 5.0 marks
Backlog Management Index (BMI) 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. Understand backlog:** A maintenance backlog contains unresolved reported problems or requested fixes. An index of incoming versus completed maintenance work indicates whether that backlog is accumulating or being reduced.
**2. Match the metric category:** BMI therefore measures maintenance handling and quality, rather than properties of object-oriented class structure or only the initial product's static characteristics. Interpret a reported BMI using its specified period and numerator/denominator convention.
**Answer: C.**
A: **Incorrect:** BMI tracks handling of maintenance work rather than directly measuring an inherent product property.
B: **Incorrect:** It is not a class/inheritance metric.
C: **Correct:** Backlog handling is a maintenance-quality concern.
D: **Incorrect:** This is not primarily a metric of activities during the original development process.
Question 6 MCQ · 5.0 marks
Which type of client-side testing attempts to bypass security or business logic by directly accessing
a specific URL and breaking the normal sequence?
Parameter level bypass testing
Control flow level bypass testing
Value level bypass testing
User-session data based testing
Published solution
**1. Identify what is bypassed:** Direct URL access skips expected pages or workflow stages. For example, a user may attempt to reach confirmation without completing earlier checks.
**2. Classify the bypass:** This attacks the application's control flow or permitted transition sequence. Parameter or value testing instead alters submitted inputs while session-based tests focus on session-related data.
**Answer: B.**
A: **Incorrect:** Parameter-level tests modify or omit parameters rather than primarily skipping workflow steps.
B: **Correct:** The test deliberately bypasses the required sequence of application states.
C: **Incorrect:** Value-level tests vary input values rather than navigation order.
D: **Incorrect:** No particular session-data manipulation is described.
Question 7 MCQ · 5.0 marks
The following table lists some mutation operators for integration.
Match each mutation operator with the appropriate description.
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 access changes:** Access Modifier Change changes whether a field or method is public, protected, private or package-visible. This matches description B.
**2. Match reference changes:** Reference Type Change changes compatible object references on the right-hand side of assignments, matching A in the supplied table.
**3. Match construction changes:** Actual Type Change changes the concrete object type used in a new expression, matching C. Therefore the mapping is 1-B,2-A,3-C.
**Answer: D.**
A: **Incorrect:** This swaps access/reference/actual-type descriptions incorrectly.
B: **Incorrect:** Access modifiers do not describe assignment-object changes in A.
C: **Incorrect:** Actual type change should match new expressions in C, not assignment references in A.
D: **Correct:** Each operator is paired with the corresponding mechanism in the table.
Question 8 MCQ · 5.0 marks
A user submits a booking form on a flight reservation site. After the server processes the payment
successfully, the browser is automatically instructed to load the confirmation page without any
user action. 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. Distinguish the user's submission:** Initially the user submits a form, but the question asks about the subsequent move after successful server processing.
**2. Identify server-directed navigation:** The server instructs the browser to load the confirmation page automatically. In the application transition graph this is a redirect transition, rather than a user clicking an ordinary link or submitting another form.
**Answer: C.**
A: **Incorrect:** The described transition specifically involves automatic redirection.
B: **Incorrect:** The original submission is a form transition, but the subsequent server-directed page load is different.
C: **Correct:** A server-instructed automatic move is a redirect transition.
D: **Incorrect:** A simple link transition would involve following a hyperlink.
Question 9 MCQ · 5.0 marks
Consider the following code segment.
A mutant needs to be created by removing the
call
. 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 statement:** super(brand) explicitly invokes Vehicle's constructor from Car's constructor.
**2. Match the targeted mutation:** Deleting this parent-constructor invocation is Parent Constructor Deletion. It is not deletion of an overriding method or a hiding field.
**Compilation note:** In this exact example, deleting the call would introduce an implicit super(), but Vehicle has no no-argument constructor. Such a mutant can therefore fail compilation and must be classified as an invalid/stillborn mutant rather than executed as an ordinary valid program.
**Answer: C.**
A: **Incorrect:** General super keyword deletion is not the named operator specifically targeting this constructor call.
B: **Incorrect:** No overriding method body is being deleted.
C: **Correct:** The removed construct is the explicit parent-constructor invocation.
D: **Incorrect:** No hidden instance variable is being removed.
Question 10 MCQ · 5.0 marks
Consider ISP with four blocks as
,
,
, and
. The base test is
. How many additional tests are needed to satisfy Base Choice Coverage (BCC)
criterion?
3
4
5
6
Published solution
**1. Count choices per characteristic:** The partitions have 2 A choices, 3 B choices, 2 P choices and 2 Q choices. One choice of each is already represented in the base test (A2,B3,P1,Q1).
**2. Apply Base Choice Coverage:** Keep every other characteristic at its base value while varying one characteristic to each nonbase block. The additional-test count is
\[(2-1)+(3-1)+(2-1)+(2-1)=1+2+1+1=5.\]
**3. Distinguish total and additional:** Including the original base test, there are six tests; the question asks for the five additional tests.
**Answer: C.**
A: **Incorrect:** This misses two required nonbase variations.
B: **Incorrect:** This misses one nonbase variation.
C: **Correct:** The sum of nonbase blocks is exactly five.
D: **Incorrect:** Six includes the already supplied base test.
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. Notice two fields with the same name:** SmartBulb and DimmerBulb each declare their own brightness field. Fields are hidden, not dynamically overridden like methods.
**2. Trace the state update:** DimmerBulb.powerOn sets the inherited isOn field true, but assigns 100 to DimmerBulb.brightness.
**3. Trace the state observation:** The inherited SmartBulb.showStatus method reads SmartBulb.brightness, still 0. Thus it prints ON with brightness 0 instead of the intended 100. The update and observation refer to inconsistent state definitions, giving the named State Definition Inconsistency Anomaly.
**Answer: B.**
A: **Incorrect:** The more specific inconsistency arises from the two distinct hidden brightness definitions.
B: **Correct:** The overridden update and inherited observation use different brightness fields.
C: **Incorrect:** This is not a mismatch in the runtime type used at the call site.
D: **Incorrect:** The principal defect is state-definition inconsistency, not changing a field's visibility.
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. Use the actual object class:** obj is a C object. Each instance-method call uses the most specific inherited implementation for that signature.
**2. Resolve the four methods:** C does not override u, so B.u runs. C overrides v, so C.v runs. w is inherited from B. C overrides x, so C.x runs.
**3. List in call order:** B.u, C.v, B.w, C.x. Inherited methods are not automatically replaced simply because an object belongs to a deeper subclass.
**Answer: D.**
A: **Incorrect:** Both u and x are resolved to more specific implementations than A in this program.
B: **Incorrect:** This ignores the B override of u and the C overrides.
C: **Incorrect:** C provides v and x, so their inherited older implementations are not used.
D: **Correct:** This is the correct most-specific implementation for each signature.
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. Substitute symbolic inputs:** mode=m0, ambientTemp=a0 and targetTemp=t0. The local gap becomes t0-a0.
**2. Negate the helper result:** isEcoMode(mode) returns mode==0. Therefore !isEcoMode(mode) requires m0≠0.
**3. Follow the nested branch:** abort is inside if(gap>=3), adding t0-a0≥3. Both conditions must hold on the same execution, so the path constraint is
\[(m_0\ne0)\land(t_0-a_0\geq3).\]
For example, mode=1, ambient=20, target=23 reaches abort.
**Answer: C.**
A: **Incorrect:** This makes Eco mode true, so its negation prevents entry.
B: **Incorrect:** This uses the wrong inequality for the inner branch.
C: **Correct:** Both required branch conditions are correctly conjoined.
D: **Incorrect:** A disjunction permits paths where one required condition is false.
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 only the changed token:** currentBalance in the condition becomes accountLimit. The comparison operator >=, the withdrawalAmount operand and the called method stay unchanged.
**2. Classify the mutation:** One scalar variable reference is replaced by another compatible scalar variable reference. This is scalar variable replacement, not changing arithmetic, relational or assignment operators.
**Answer: A.**
A: **Correct:** The mutation replaces one variable operand with another.
B: **Incorrect:** No arithmetic operator is changed.
C: **Incorrect:** The relational operator >= is unchanged.
D: **Incorrect:** No assignment operator is changed.
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. Identify unconditional sections:** P1 initializes and obtains the data. P7 prints the closing output. Both surround the conditional body.
**2. Follow the outer choice:** Invalid city data executes P2 only. Otherwise the code processes the available list: P3 repeats for its items, then P4 computes the average.
**3. Follow the inner choice:** After P4, exactly one of P5 or P6 prints the high/normal result. With a dot for sequence, a bar for choice and a star for repetition, the expression is
\[P_1\cdot\big(P_2\mid(P_3^*\cdot P_4\cdot(P_5\mid P_6))\big)\cdot P_7.\]
Only P3 is repeated; the average calculation P4 happens after the loop.
**Answer: A.**
A: **Correct:** This preserves the outer choice, repetition of P3 alone, inner choice and final P7.
B: **Incorrect:** This incorrectly repeats the average calculation P4.
C: **Incorrect:** The nesting and alternatives do not match the code's invalid-data versus valid-data paths.
D: **Incorrect:** This incorrectly sequences both mutually exclusive printing branches instead of choosing one.
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. Identify definitions of x:** Node 1 defines x=a. Node 3 redefines x=b. Other relevant nodes either use x in predicates or print x at node 5.
**2. Trace definition-clear routes:** The supplied tests cover routes 1-2-5, 1-4-5, 1-2-4-5 and 1-3-4-5. The first three carry the node-1 definition to its downstream predicate/output uses. The fourth visits the node-3 definition and carries that new value to the print.
**3. Compare coverage levels:** These paths cover every definition-clear def-use route for x in this acyclic graph. Thus All-DU-Paths holds, which also implies All-Uses and All-Defs; the 'only' alternatives are too weak.
**Answer: C.**
A: **Incorrect:** All-Defs is achieved, but the given tests satisfy a stronger criterion.
B: **Incorrect:** All-Uses is achieved, but not merely that weaker level.
C: **Correct:** All definition-clear paths connecting x definitions to uses are covered.
D: **Incorrect:** The graph does satisfy a listed coverage criterion.
Question 17 MSQ · 4.0 marks
Consider the following finite state machine (FSM).
Which of the following are correct regarding the given FSM?
There are 8 test requirements for state coverage
Sequence
can be accepted by this FSM
There are 6 test requirements for state coverage
Sequence
can be accepted by this FSM
Published solution
**1. Count states, not edges:** The FSM has states 1 through 6, so state coverage has six state requirements. The number of labelled transitions is a separate measure.
**2. Trace ABDWQ:** Start at 1. A goes to 2, B to 3, D back to 2, W to 5 and Q to 6. State 6 is accepting, so the sequence is accepted.
**3. Trace AWVXY:** A goes 1→2 and W goes 2→5, but V is defined from state 1 to 6, not from 5. The sequence cannot continue as written.
**Answer: B, C.**
A: **Incorrect:** Eight confuses some other graph count with the six state requirements.
B: **Correct:** The complete labelled path ends in accepting state 6.
C: **Correct:** There is one requirement for each of the six states.
D: **Incorrect:** After AW the machine is in state 5, where V is unavailable.
Question 18 MSQ · 5.0 marks
Consider a Test-Driven Development (TDD) approach for a billing system in a retail store. The store
offers a Standard Shipping tier. The policy states that shipping is free for orders of Rs. 500.00 or
more. For any order total less than Rs. 500.00, a flat shipping fee is applied. 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. Translate the policy:** Free shipping is allowed when total>=500.00, including the exact boundary 500.00.
**2. Compare implementations:** A directly returns that predicate. D returns false below 500 and true otherwise, which is equivalent for ordinary finite order totals. C uses >500 and fails the provided exact-boundary test.
**3. Inspect B beyond the tests:** total>499.99 passes all five listed tests, but is not equivalent over arbitrary double values; for total=499.995 it grants free shipping below 500. If valid currency inputs are strictly restricted to exact two-decimal amounts, this distinction disappears. The source intends the complete threshold policy over the method's numeric input domain, not merely passing the five examples.
**Answer: A, D.**
A: **Correct:** The inclusive comparison exactly encodes the free-shipping threshold.
B: **Incorrect:** It incorrectly accepts values between 499.99 and 500 over unrestricted finite doubles, despite passing the shown tests.
C: **Incorrect:** The strict comparison rejects 500.00 and fails a provided test.
D: **Correct:** The below-threshold rejection and otherwise-true result match the policy for ordinary finite totals.
Question 19 MCQ · 4.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 clause
?
Published solution
**1. Write the predicate:** \(p=(c\lor\neg b)\land\neg a\). Clause a determines p only when the other factor c or not b is true.
**2. Apply restricted active coverage:** In each pair, change a while holding b and c fixed, and require the predicate to change. The fixed pairs (b,c)=(T,T),(F,T),(F,F) satisfy the active condition.
**3. Map to row numbers:** With the table's row ordering, these yield (1,5), (3,7) and (4,8). For (b,c)=(T,F), p is false regardless of a, so (2,6) is inactive rather than active.
**Answer: C.**
A: **Incorrect:** This wrongly includes inactive pair (2,6) and omits active pair (4,8).
B: **Incorrect:** Pair (2,6) keeps p false and therefore does not demonstrate active determination.
C: **Correct:** All three pairs hold minor clauses fixed and flip p when a changes.
D: **Incorrect:** Rows 1 and 6 also change minor-clause values and do not form a restricted active pair.
Question 20 MCQ · 4.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 clause
?
, for
, no feasible pair for
, for
, no feasible pair for
for
,
, for
for
,
, for
Published solution
**1. Make a inactive:** For \(p=(c\lor\neg b)\land\neg a\), changing a cannot matter when c or not b is false. That requires c=F and b=T.
**2. Hold the minor clauses fixed:** Rows 2 and 6 have those same b,c values and opposite a values. Both give p=F. Thus (2,6) supplies restricted inactive coverage with the predicate false.
**3. Check predicate true:** If p=T, both factors must be true, so a=F and c or not b=T. Changing a to T would make p false. Hence a cannot be inactive while p remains true, and no corresponding true-output pair exists.
**Answer: B.**
A: **Incorrect:** These are not the inactive false-output pair, and p cannot remain true when a changes.
B: **Correct:** Only (2,6) works for p false; no restricted inactive pair exists for p true.
C: **Incorrect:** The listed pairs are active pairs, not the required inactive pair.
D: **Incorrect:** This reverses the active/inactive interpretation and output conditions.
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 graph components:** The CFG has N=6 vertices and E=8 directed edges. It is one connected control-flow component.
**2. Apply the formula:** Cyclomatic complexity is \(V(G)=E-N+2=8-6+2=4\).
**3. Interpret:** Four is the size of a basis of independent paths, not the total number of all possible start-to-finish paths. Counting branch alternatives also gives the same independent-path complexity.
**Answer: C.**
A: **Incorrect:** Six is the number of vertices, not the complexity.
B: **Incorrect:** The required formula gives four, not three.
C: **Correct:** E-N+2 gives 4 for this connected CFG.
D: **Incorrect:** Five does not match the graph counts.
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. Define an edge pair:** An edge-pair requirement is a reachable path of two adjacent edges, represented by three vertices. Use the given directed edges rather than arbitrary triples.
**2. Enumerate by middle vertex:** Through vertex 2: (1,2,3),(1,2,5). Through 3: (1,3,4),(1,3,6),(2,3,4),(2,3,6). Through 4: (3,4,5). Through 5: (2,5,6),(4,5,6).
**3. Count:** There are 2+4+1+2=9 distinct two-edge requirements. Every listed pair lies on a start-to-finish route in this graph.
**Answer: B.**
A: **Incorrect:** This misses three valid two-edge paths.
B: **Correct:** Enumerating the compatible incoming/outgoing edges gives nine pairs.
C: **Incorrect:** Eight is the number of edges, not the number of consecutive edge pairs.
D: **Incorrect:** Seven omits two valid pairs.