Software Testing · End Term · Jan 2025 · AN
Software Testing · End Term · Jan 2025 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 / 24 published solutions
“I will give you the bedroom next to the sitting room.”
This sentence is in the _____ aspect.
Future perfect
Future perfect continuous
Future indefinite
Simple present
**1. Identify the verb phrase:** The main verb phrase is will give. It uses will followed by the base form give.
**2. Match the tense/aspect label:** In traditional exam terminology, will + base verb is future indefinite, also called simple future. There is no have + past participle construction to indicate future perfect, and no been + -ing construction to indicate perfect continuous.
**Answer: C — Future indefinite.**
**Convention note:** The question uses aspect loosely; future indefinite is the traditional tense-form label intended by these options.
A: **Incorrect:** Future perfect would use will have given.
B: **Incorrect:** Future perfect continuous would use will have been giving.
C: **Correct:** Will give is the simple-future/future-indefinite construction.
D: **Incorrect:** Simple present would use give or gives without will.
Question 199 MCQ · 1.0 marks
Choose the correct modal verb to fill in the blank.
_____ you mind if I stayed back after class for remedial classes?
Would
Could
**Sw Testing**
**Section Id :** 64065387584
**Section Number :** 7
**Section type :** Online
**Mandatory or Optional :** Mandatory
**Number of Questions :** 19
**Number of Questions to be attempted :** 19
**Section Marks :** 100
**Display Number Panel :** Yes
**Section Negative Marks :** 0
**Group All Questions :** No
**Enable Mark as Answered Mark for Review and**
No
**Clear Response :**
**Section Maximum Duration :** 0
**Section Minimum Duration :** 0
**Section Time In :** Minutes
**Maximum Instruction Time :** 0
Published solution
**1. Recognize the polite-request pattern:** The standard expression is Would you mind if ...? It asks politely whether the listener would object to a proposed action.
**2. Match the following clause:** The past-form stayed expresses polite distance in this hypothetical request. The complete sentence is Would you mind if I stayed back after class for remedial classes?
**Answer: A — Would.**
A: **Correct:** Would you mind if I stayed ... is the standard polite-request construction.
B: **Incorrect:** Could commonly begins Could I stay ...?, but Could you mind if ...? is not the idiomatic construction needed here.
Question 201 MCQ · 4.0 marks
A user fills out a web form and clicks the “Submit” button. This action causes the application to
transition from the form page to another page (e.g., a confirmation or result page). In the context
of an Application Transition Graph (ATG), what type of transition does this represent?
Simple Link Transition
Operational Transition
Form Link Transition
Redirect Transition
Published solution
**1. Explain the graph:** An application transition graph represents application pages or states as nodes and user/application navigation as edges.
**2. Classify the trigger:** Here the user enters data into a form and submits it. The resulting navigation depends on submitting those form fields, making it a form-link transition in the terminology of this question.
**Answer: C — Form Link Transition.**
A: **Incorrect:** A simple-link transition follows an ordinary hyperlink without submitting form data.
B: **Incorrect:** Operational transitions concern an operation/state change rather than the specific form-navigation category requested here.
C: **Correct:** Submitting a form and moving to the resulting page is a form-link transition.
D: **Incorrect:** A redirect is navigation initiated by redirect behavior; that is not specified merely by clicking Submit.
Question 202 MCQ · 4.0 marks
An online booking system requires users to provide a “check-in date” and a “check-out date” while
reserving a hotel room. A tester alters the “check-out date” in the form submission to a date earlier
than the “check-in date” to check if the application properly enforces the relationship between the
two fields. What type of testing does this scenario describe?
Control flow level bypass testing
Parameter level bypass testing
Value level bypass testing
User session data based testing
Published solution
**1. Identify the constraint:** Check-out must occur after check-in. This is a relationship between two submitted parameters rather than a format/range constraint on one isolated field.
**2. Explain bypass testing:** A tester can alter a request directly to bypass restrictions imposed by the browser interface. Server-side validation must still reject the invalid relationship.
**3. Classify the case:** Because the test breaks the dependency between the check-in and check-out parameters, it is parameter-level bypass testing in this classification.
**Answer: B — Parameter level bypass testing.**
A: **Incorrect:** Control-flow bypass skips required steps or pages; this test changes submitted field relationships.
B: **Correct:** The altered request violates an inter-parameter constraint.
C: **Incorrect:** Value-level bypass tests a single field’s own validity, rather than the cross-field ordering emphasized here.
D: **Incorrect:** This case does not involve modifying stored user-session data.
Question 203 MCQ · 4.0 marks
Which type of testing is performed by suddenly increasing the number of users to a very large
amount in order to measure the system’s performance and determine if it can sustain the
workload?
Spike testing
Endurance (soak) testing
Compatibility testing
Regulatory testing
Published solution
**1. Identify the load pattern:** The user count rises abruptly to a very large value. The distinctive feature is the sudden change in demand.
**2. Match the performance test:** Spike testing examines how a system responds to a sharp load increase and, often, how it recovers afterward. Relevant observations include response time, errors and resource exhaustion.
**Answer: A — Spike testing.**
A: **Correct:** A sudden large increase in users is the defining spike-load pattern.
B: **Incorrect:** Soak testing sustains load for a long duration to reveal issues such as resource leaks.
C: **Incorrect:** Compatibility testing checks operation across environments, platforms or configurations.
D: **Incorrect:** Regulatory testing checks compliance with applicable requirements rather than response to abrupt load.
Question 204 MCQ · 4.0 marks
Which of the following metrics is categorized as a Maintenance Quality Metric?
Defect Density
Backlog Management Index (BMI)
Code Coverage
Cyclomatic Complexity
Published solution
**1. Explain maintenance backlog:** During maintenance, new problem reports arrive while existing problems are resolved. The backlog is the set still awaiting resolution.
**2. Identify the maintenance measure:** The backlog management index compares problems closed during a period with problems arriving during that period, often as \[\mathrm{BMI}=\frac{\text{problems closed}}{\text{problems arriving}}\times100.\] A value above 100% indicates that more problems were closed than arrived, under this convention.
**3. Match the category:** Tracking whether the backlog is being reduced is specifically a maintenance-quality concern.
**Answer: B — Backlog Management Index (BMI).**
A: **Incorrect:** Defect density relates defects to product size and is generally a product-quality measure.
B: **Correct:** BMI monitors problem-resolution progress relative to incoming maintenance work.
C: **Incorrect:** Code coverage measures how much program structure a test suite executes.
D: **Incorrect:** Cyclomatic complexity measures control-flow complexity rather than maintenance-backlog progress.
Question 205 MCQ · 4.0 marks
Consider the following method: double root(int a, int b, int c).
Identify the type of the mutation operator.
Scalar variable replacement
Unary operator insertion
Arithmetic operator replacement
Absolute value insertion
Published solution
**1. Compare the expressions:** The original discriminant is b*b - 4*a*c. The mutant changes it to b*b - 4*a*b.
**2. Identify exactly what changed:** The scalar variable c was replaced by the scalar variable b in one occurrence. The multiplication/subtraction operators and the surrounding square-root/division structure remain the same.
**3. Name the mutation:** Replacing one scalar variable reference with another is scalar variable replacement.
**Answer: A — Scalar variable replacement.**
A: **Correct:** The mutation replaces c with b, another scalar variable.
B: **Incorrect:** No new unary operator such as negation or increment was inserted.
C: **Incorrect:** The arithmetic operators did not change.
D: **Incorrect:** No absolute-value operation was added.
Question 206 MCQ · 4.0 marks
Why is Test-Driven Development (TDD) ideal for pair programming?
Because it eliminates the need for collaboration between developers.
Because it allows one developer to write code and the other to test.
Because it requires no test frameworks.
Because TDD does not involve testing during development.
Published solution
**1. Explain the TDD cycle:** Test-driven development starts with a failing test, adds enough production code to pass it, and then refactors while keeping tests passing.
**2. Connect it to pairing:** The two developers can share this short feedback cycle: one writes a test and the other implements the behavior, then they switch roles. Both discuss requirements and review the code continuously.
**3. Interpret the option:** The code-writing/test-writing division describes a useful pairing style, not permanently separate jobs or the removal of collaboration.
**Answer: B — Because it allows one developer to write code and the other to test..**
A: **Incorrect:** Pair programming depends on collaboration; TDD does not remove it.
B: **Correct:** Alternating test and implementation responsibilities supports the TDD feedback cycle.
C: **Incorrect:** Automated test frameworks are commonly used; avoiding them is not the reason TDD suits pairing.
D: **Incorrect:** Writing and running tests during development is central to TDD.
Question 207 MCQ · 4.0 marks
In a ride-sharing application, the User Module sends a ride request to the Driver Module via a
central messaging service. The modules communicate using message queues. What type of
coupling is used in this scenario?
Parameter coupling
Shared data coupling
External device coupling
Message-passing interfaces
Published solution
**1. Identify the communication mechanism:** The User Module sends a message to a queue, and the Driver Module receives it through the messaging service.
**2. Classify the interface:** The modules interact by exchanging messages rather than by directly passing arguments in an ordinary procedure call or accessing one common memory variable. The appropriate interface type is message passing.
**3. Explain the coupling:** A queue can separate sender and receiver in time and execution, although both still depend on a shared message format and delivery contract.
**Answer: D — Message-passing interfaces.**
A: **Incorrect:** The described interaction is queued messaging rather than direct function-parameter transfer.
B: **Incorrect:** The prompt does not describe both modules reading/writing a common data store as their communication mechanism.
C: **Incorrect:** A shared external hardware device is not the stated interface.
D: **Correct:** The queue explicitly carries messages between the modules.
Question 208 MCQ · 5.0 marks
Published solution
**1. Read the productions:** The grammar has S → aSbb and S → abb. The second production terminates a derivation with one a followed by two b symbols.
**2. Track a recursive expansion:** Applying S → aSbb adds one a before the existing string and two b symbols after it. It preserves the pattern of all a symbols preceding all b symbols.
**3. Express all generated strings:** After k recursive expansions followed by the terminating rule, there are k + 1 a symbols and 2(k + 1) b symbols. Letting n = k + 1 gives \[L=\{a^n b^{2n}\mid n\ge1\}.\] The empty string cannot be generated.
**Answer: A — \(\{a^n b^{2n}\mid n\ge1\}\).**
A: **Correct:** The terminating string abb has n = 1, and recursion preserves twice as many b symbols as a symbols.
B: **Incorrect:** This reverses the required count ratio; abb is a counterexample.
C: **Incorrect:** Equal counts do not match even the shortest generated string.
D: **Incorrect:** This includes the empty string at n = 0, but the grammar has no empty production.
Question 209 MCQ · 5.0 marks
Published solution
**1. Interpret the states as parities:** The initial state S1 represents an even number of a symbols and an even number of b symbols. Reading a toggles the a parity, and reading b toggles the b parity.
**2. Assign the remaining states:** S2 is (odd a, even b), S3 is (even a, odd b), and S4 is (odd a, odd b). Each drawn transition agrees with these toggles.
**3. Use the accepting state:** Only S4 is double-circled. Therefore a string is accepted exactly when both symbol counts are odd; ab and ba are simple accepted examples.
**Answer: C — Odd number of a symbols and odd number of b symbols.**
A: **Incorrect:** Even a and odd b lead to S3, which is not accepting.
B: **Incorrect:** Odd a and even b lead to S2, which is not accepting.
C: **Correct:** Odd counts of both symbols lead to accepting state S4.
D: **Incorrect:** Even counts of both symbols lead back to S1.
Question 210 MCQ · 5.0 marks
Published solution
**1. Rewrite the predicate:** The first if sets r to the truth value of x > y. Thus the second predicate is \[p=a\land b,\qquad a:(x>y),\quad b:(x=z).\]
**2. State RACC requirements:** To show that a independently controls p, hold b true and use both truth values of a. To show that b independently controls p, hold a true and use both truth values of b. The required clause combinations are TT, FT and TF.
**3. Evaluate the selected tests:** (5,4,4) gives TF and p false. (5,4,5) gives TT and p true. (4,4,4) gives FT and p false. The latter two form the pair for a; the first two form the pair for b.
**Answer: D — Tests (5,4,4), (5,4,5), (4,4,4).**
A: **Incorrect:** The tests give FT and FF; no test makes the predicate true or makes a true.
B: **Incorrect:** These tests give TT, FF and FT, so the TF combination needed for b is missing.
C: **Incorrect:** The tests never make x > y true, so they cannot demonstrate both clauses independently controlling the predicate.
D: **Correct:** The tests supply TF, TT and FT, meeting both required RACC pairs.
Question 211 MCQ · 5.0 marks
Consider the prime path P = [1, 2, 4, 5]. Among the options given, identify the path that tours P
with a sidetrip but not a detour.
[1, 2, 4, 2, 4, 5]
[1, 2, 4, 2, 3, 4]
[1, 2, 3, 2, 4, 5]
[1, 2, 3, 4, 5]
A published solution is not available for this question yet.
Question 212 MCQ · 5.0 marks
Inconsistent type use
State definition anomaly
State definition inconsistency anomaly
State visibility anomaly
Published solution
**1. Identify the two fields:** Device declares memorySizeGB, while Laptop declares another field with the same name. In Java, fields are hidden rather than dynamically overridden. The two fields occupy distinct state locations.
**2. Follow the update:** Laptop.setMemorySize writes the Laptop field, setting it to 16. The inherited Computer.printSpecs method refers to the Device field visible in its defining class hierarchy; that field remains at its default integer value 0.
**3. Identify the anomaly:** The operation that defines the intended memory state and the operation that reads it refer to different hidden fields. This is the stated state-definition inconsistency anomaly.
**Answer: C — State definition inconsistency anomaly.**
**Convention note:** The source describes the field as overridden. Java fields are hidden; dynamic overriding applies to instance methods.
A: **Incorrect:** The problem is two distinct state fields, not use of an incompatible runtime type.
B: **Incorrect:** A generic state-definition issue is less specific than the mismatch between the field written and the field subsequently read.
C: **Correct:** The setter and printer disagree about which hidden state field represents memory size.
D: **Incorrect:** The fields are accessible under their protected visibility; visibility denial is not causing the wrong value.
Question 213 MCQ · 5.0 marks
Overriding method deletion (OMD)
Overriding method moving (OMM)
Overloading method deletion (OMD)
Super keyword deletion (SKD)
Published solution
**1. Identify the deleted statement:** Line 8 is super.draw(), which explicitly invokes the parent Shape implementation before the subclass prints Drawing circle.
**2. Explain the effect:** Removing this line removes the superclass call. The overriding Circle.draw method remains, so a call to it now prints only the circle-specific message.
**3. Match the mutation family:** Among the choices, this is the superclass/super deletion mutation category labeled SKD.
**Answer: D — Super keyword deletion (SKD).**
**Convention note:** The statement, not just the literal keyword super, is deleted in the described edit. Deleting only super. while retaining draw() would create a recursive self-call, which is a different mutation effect.
A: **Incorrect:** The overriding draw method is retained; only its superclass-call statement is deleted.
B: **Incorrect:** The method is not moved to another class or location.
C: **Incorrect:** No overloaded method with a different parameter list is deleted.
D: **Correct:** The mutation removes the super-qualified parent-method call.
Question 214 MCQ · 5.0 marks
Published solution
**1. Propagate symbolic inputs:** Initially a = a₀ and b = b₀. The helper calls produce \(t_1=a_0+5\) and \(t_2=b_0-3\). The outer condition is \[C:(a_0+5)^2<2(b_0-3).\]
**2. Keep the path prefix:** Reaching LINE-1 already requires C to hold. Symbolic execution must retain that condition when splitting on the inner test t1 > t2.
**3. Form the two child constraints:** The true branch has \[C\land(a_0+5>b_0-3),\] and the false branch has \[C\land(a_0+5\le b_0-3).\] Both include the same true outer condition.
**Answer: D — Outer condition conjoined with each branch of the inner condition.**
**Convention note:** This is the usual mathematical-integer symbolic interpretation; an implementation modeling finite-width overflow would need corresponding machine-arithmetic constraints.
A: **Incorrect:** These split the outer condition, not the inner conditional reached at LINE-1.
B: **Incorrect:** These omit the outer path constraint required to reach LINE-1.
C: **Incorrect:** The second constraint negates the outer condition and retains the wrong inner branch.
D: **Correct:** It retains the outer true condition and conjoins the inner condition or its negation.
Question 215 MSQ · 4.0 marks
{58, 67, 78}
{58, 59, 68, 77, 78}
{57, 58, 67, 78, 79}
{57, 58, 59, 65, 77, 78, 79}
A published solution is not available for this question yet.
Question 216 MCQ · 4.0 marks
Consider the following Java method below with a mutant indicated in the comments and answer
the given subquestions.
TRUE
FALSE
A published solution is not available for this question yet.
Question 217 MSQ · 5.0 marks
Consider the following Java method below with a mutant indicated in the comments and answer
the given subquestions.
refer
river
level
little
Published solution
**1. Explain propagation:** For a nonempty input, skipping index 0 changes the temporary reversed string. That infected state propagates to an observable failure only if it changes the final palindrome decision/message.
**2. Use the length argument:** The mutant reverse has length n - 1, so it cannot equal a nonempty input of length n. The mutant therefore reports not a palindrome for every nonempty candidate.
**3. Compare the original decisions:** river and little are already non-palindromes, so both versions print not a palindrome. refer and level are palindromes, so their printed decisions change. The non-propagating cases are river and little.
**Answer: B, D — river; little.**
A: **Incorrect:** refer is a palindrome; the mutant changes its reported result, so the infection propagates.
B: **Correct:** river is not a palindrome, and both versions report that; the internal reverse difference does not change output.
C: **Incorrect:** level is a palindrome and its message changes, so the infection propagates.
D: **Correct:** little is already not a palindrome, so both versions produce the same classification.
Question 218 MSQ · 5.0 marks
Consider the following Java method below with a mutant indicated in the comments and answer
the given subquestions.
refer
river
level
little
Published solution
**1. Define strong killing:** A test strongly kills a mutant when the original and mutated programs produce different observable results for that input.
**2. Determine the mutant output:** The changed loop uses i > 0, omitting the first character of every nonempty input. Its reverse string has one fewer character and therefore never equals the full input. It reports not a palindrome.
**3. Select distinguishing inputs:** The original recognizes refer and level as palindromes, while the mutant rejects them. For river and little both versions reject, so those tests do not strongly kill the mutant.
**Answer: A, C — refer; level.**
A: **Correct:** The original accepts refer as a palindrome while the mutant rejects it.
B: **Incorrect:** Both versions report that river is not a palindrome.
C: **Correct:** The original accepts level as a palindrome while the mutant rejects it.
D: **Incorrect:** Both versions report that little is not a palindrome.
Question 219 MCQ · 4.0 marks
Consider the following annotated control flow graph (CFG) and answer the given subquestions.
Which of the following is a def-clear path with respect to variable **y**?
[1, 2, 4, 5, 7]
[1, 2, 4, 6, 7]
[1, 3, 4, 5, 7]
[1, 3, 4, 6, 7]
Published solution
**1. Define a definition-clear path:** Relative to a variable’s definition at the start, a def-clear path reaches the intended later use without redefining that variable along the way.
**2. Locate assignments to y:** Node 1 defines y = j. Node 3 assigns y = x, and node 5 assigns y = 0. Node 2 only assigns x = y; node 6 only assigns x = 0. Node 7 prints y.
**3. Choose the clear route:** The route [1,2,4,6,7] avoids nodes 3 and 5. Hence the definition from node 1 reaches the print at node 7 without a new assignment to y.
**Answer: B — [1, 2, 4, 6, 7].**
A: **Incorrect:** Node 5 redefines y as 0.
B: **Correct:** Nodes 2, 4 and 6 do not redefine y, so this path is def-clear from node 1 to node 7.
C: **Incorrect:** Nodes 3 and 5 both redefine y.
D: **Incorrect:** Node 3 redefines y before the later print.
Question 220 MCQ · 5.0 marks
Consider the following annotated control flow graph (CFG) and answer the given subquestions.
Which of the following statements is true about the set of testpaths {[1, 2, 4, 6, 7], [1, 2, 4, 5, 7]} ?
It satisfies all defs coverage for variable **y**.
It satisfies both the all defs coverage, and all uses coverage for variable **y**.
It satisfies both the all defs coverage, all-use coverage, and all du-paths
coverage for variable **y**.
None of these
Published solution
**1. Identify all definitions:** The graph defines y at nodes 1, 3 and 5. All-definitions coverage requires a test to exercise a definition-clear path from each applicable definition to at least one use.
**2. Inspect the supplied paths:** Both [1,2,4,6,7] and [1,2,4,5,7] take the node-2 branch. Neither visits node 3, so its definition y = x is not covered by any definition-use tour.
**3. Compare the criteria:** Because all-definitions coverage already fails, the stronger requirements all-uses and all-du-paths cannot be claimed either. Thus none of the first three descriptions holds.
**Answer: D — None of these.**
A: **Incorrect:** The definition at node 3 is missed entirely.
B: **Incorrect:** All-definitions already fails, so both criteria cannot hold.
C: **Incorrect:** The stronger combined claim fails because the node-3 definition is missed.
D: **Correct:** None of the listed coverage claims is satisfied.
Question 221 MCQ · 5.0 marks
Based on the above data, answer the given subquestions.
Published solution
**1. Isolate the major clause:** The predicate is \(p=a\land(\neg b\lor\neg c)\). Let \(q=\neg b\lor\neg c\), so p = a AND q.
**2. Test determination:** Clause a determines p when changing only a changes the predicate. With a true, p = q; with a false, p = false. These results differ exactly when q is true.
**3. Write the condition:** \[p_a=p(a=T)\oplus p(a=F)=q\oplus F=\neg b\lor\neg c.\]
**Answer: B — \(\neg b\lor\neg c\).**
A: **Incorrect:** The c term has the wrong polarity; for b = c = true this expression is true even though a cannot affect p.
B: **Correct:** This is precisely the condition that makes the other conjunct true, allowing a to control p.
C: **Incorrect:** This is sufficient but not necessary; either b false or c false already allows a to determine p.
D: **Incorrect:** When b and c are both true, the other conjunct is false, so a does not determine p.
Question 222 MCQ · 5.0 marks
Based on the above data, answer the given subquestions.
From the given options, identify all pairs of test requirements to satisfy the restricted inactive
clause coverage (RICC) for clause a.
**Statistics1**
**Section Id :** 64065387585
**Section Number :** 8
**Section type :** Online
**Mandatory or Optional :** Mandatory
**Number of Questions :** 14
**Number of Questions to be attempted :** 14
**Section Marks :** 40
**Display Number Panel :** Yes
**Section Negative Marks :** 0
**Group All Questions :** No
**Enable Mark as Answered Mark for Review and**
No
**Clear Response :**
**Section Maximum Duration :** 0
**Section Minimum Duration :** 0
**Section Time In :** Minutes
**Maximum Instruction Time :** 0
Published solution
**1. State restricted inactive coverage:** The major clause a must take both truth values while the minor clauses b and c stay fixed and a does not change p. Feasible pairs are sought for each predicate result.
**2. Find when a is inactive:** For \(p=a\land(\neg b\lor\neg c)\), a is inactive only when \(\neg b\lor\neg c=F\). By De Morgan’s law, this requires \(b=T,c=T\).
**3. Construct the feasible pair:** With those minor values, both assignments \((a,b,c)=(T,T,T)\) and \((F,T,T)\) give p = F. No inactive pair can give p = T, since making a false always makes this conjunction false.
**Answer: B — No pair for p = T; for p = F use (T,T,T) and (F,T,T).**
A: **Incorrect:** With c true and b false, p follows a, so the proposed pair changes the predicate rather than keeping a inactive.
B: **Correct:** It correctly states no true-predicate pair and the false-predicate pair (T,T,T), (F,T,T).
C: **Incorrect:** The proposed pairs make the other conjunct true, so changing a changes p.
D: **Incorrect:** The purported true-predicate pair cannot stay true when a is false, and the other pairs fail the inactive/minor-fixed requirements.