MauryaHub PYQ Practice

Software Testing · Quiz 1 · Sep 2025

Software Testing · Quiz 1 · Sep 2025

← 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.

16 / 18 published solutions

Question 191 MCQ · 5.0 marks

In an organization, software testers always look for failures in the software product due to which they have an adversarial relationship with the software developers. Considering this scenario, identify the maximum process maturity level of this organization.
6406535137521.
Level 1
6406535137522.
Level 2
6406535137523.
Level 3
6406535137524.
Level 4

Published solution

**1. Identify the key property:** In Beizer’s testing-maturity interpretation, level 2 emphasizes finding failures and can create an adversarial tester–developer relationship. Higher levels move toward shared risk reduction and quality. **Answer: B — Level 2.** A: **Incorrect:** Level 1 primarily tries to demonstrate that the software works. B: **Correct:** Failure-finding with adversarial relations characterizes level 2. C: **Incorrect:** Level 3 shifts toward reducing risk cooperatively. D: **Incorrect:** Level 4 treats testing as a quality discipline rather than an adversarial contest.

Report a correction for Q191

Question 192 MCQ · 5.0 marks

Consider the following statements and choose the correct option. i) Prime path coverage subsumes node and edge coverage. ii) Prime path coverage does not subsume edge-pair coverage.
6406535137525.
Statement i) is correct and Statement ii) is incorrect.
6406535137526.
Statement ii) is correct and Statement i) is incorrect.
6406535137527.
Both statements are incorrect.
6406535137528.
Both statements are correct.

Published solution

**1. Identify the key property:** Prime paths contain the needed simple node/edge obligations, but edge-pair coverage can require repeated self-loop sequences that are not simple paths. Both statements hold. **Answer: D — Both statements are correct..** A: **Incorrect:** The second statement is also true. B: **Incorrect:** The first statement is also true. C: **Incorrect:** Both stated subsumption claims are true. D: **Correct:** PPC subsumes node/edge coverage but not edge-pair coverage universally.

Report a correction for Q192

Question 193 MCQ · 5.0 marks

Which of the following are required to create a test case?
6406535137529.
Test inputs and actual outputs
6406535137530.
Test inputs and expected outputs
6406535137531.
Actual outputs and expected outputs
6406535137532.
Test inputs only

Published solution

**1. Identify the key property:** A test case supplies inputs plus an oracle or expected result. Actual output is obtained when the case runs and compared with the expectation. **Answer: B — Test inputs and expected outputs.** A: **Incorrect:** Actual output is observed during execution, not the specified oracle. B: **Correct:** Inputs and expected results make the test checkable. C: **Incorrect:** Inputs are also needed to define the execution. D: **Incorrect:** Inputs alone do not specify whether the result is correct.

Report a correction for Q193

Question 194 MCQ · 5.0 marks

Consider the following statements and choose the correct option. i) In JUnit, each test is embedded into one test method. ii) JUnit can be used for unit, integration as well as system testing.
6406535137533.
Statement i) is correct and Statement ii) is incorrect.
6406535137534.
Statement ii) is correct and Statement i) is incorrect.
6406535137535.
Both statements are incorrect.
6406535137536.
Both statements are correct.

A published solution is not available for this question yet.

Report a correction for Q194

Question 195 MCQ · 5.0 marks

A ____________ is a skeletal implementation of a software module, used to develop or test a component that calls the stub or depends on it. Fill in the blank with correct option.
6406535137537.
test method
6406535137538.
test driver
6406535137539.
test stub
6406535137540.
test suite

Published solution

**1. Identify the key property:** A test stub supplies a skeletal implementation of a component called by the component under test. **Answer: C — test stub.** A: **Incorrect:** A test method contains test actions and checks. B: **Incorrect:** A driver invokes the component under test rather than substitutes a called dependency. C: **Correct:** The skeletal called dependency is a stub. D: **Incorrect:** A suite groups tests rather than implements a dependency.

Report a correction for Q195

Question 196 MCQ · 5.0 marks

Source diagram or notation
6406535137541.
Shared memory interface
6406535137542.
Procedure call interface
6406535137543.
Message passing interface
6406535137544.
External file interface

Published solution

**1. Identify the key property:** ModuleA calls ModuleB.setup() and passes data through its parameters. This is a procedure-call interface. **Answer: B — Procedure call interface.** A: **Incorrect:** No shared-memory data region is specified. B: **Correct:** The interaction is a method call with parameters. C: **Incorrect:** No request/response message exchange is specified. D: **Incorrect:** No external file is used to exchange data.

Report a correction for Q196

Question 197 MCQ · 5.0 marks

Consider the following statements regarding structural graph coverage criteria, and choose the correct option. i) A test path always begins with the initial vertex and ends in the final vertex. ii) A prime path may contain cycles within it as a subpath. iii) Complete path coverage may be feasible for some CFGs.
6406535137545.
Statement i) and iii) are correct. Statement ii) is incorrect.
6406535137546.
Statement i) is correct. Statement ii) and iii) are incorrect.
6406535137547.
Statement ii) and iii) are correct. Statement i) is incorrect.
6406535137548.
Statement i) and ii) are correct. Statement iii) is incorrect.

Published solution

**1. Identify the key property:** A test path runs from an initial to a final vertex. Prime paths cannot have an internal repeated-vertex cycle, although a prime path can itself be a simple cycle. Complete path coverage can be feasible in a finite acyclic graph. **Answer: A — Statement i) and iii) are correct. Statement ii) is incorrect..** A: **Correct:** The first and third statements are true; the second is false for internal cycles. B: **Incorrect:** Complete path coverage can be feasible for some graphs. C: **Incorrect:** Test paths have initial/final endpoints, and internal cycles violate simplicity. D: **Incorrect:** The internal-cycle claim is false, while feasibility in some graphs is true.

Report a correction for Q197

Question 198 MCQ · 5.0 marks

The ________ approach to integration testing does not require the use of test stubs or test drivers. Fill in the blank with the correct option.
6406535137549.
bottom-up
6406535137550.
top-down
6406535137551.
sandwich
6406535137552.
big bang

Published solution

**1. Identify the key property:** Big-bang integration combines the real modules at once, so absent-component stubs and absent-caller drivers are not inherent requirements of that strategy. **Answer: D — big bang.** A: **Incorrect:** Bottom-up commonly needs drivers for higher-level callers. B: **Incorrect:** Top-down commonly needs stubs for lower-level dependencies. C: **Incorrect:** Sandwich can require both kinds of temporary test components. D: **Correct:** All real components are combined rather than introduced through stubs/drivers.

Report a correction for Q198

Question 199 MCQ · 5.0 marks

Consider the following statement and fill in the blank(s) with the appropriate option. In a maximal chain, the interior vertices have an indegree of i)___ and outdegree of ii)___.
6406535137553.
i - 1, ii - 2
6406535137554.
i - 0, ii - 2
6406535137555.
i - 1, ii - 1
6406535137556.
i - 1, ii - 0

Published solution

**1. Identify the key property:** An interior chain vertex has exactly one predecessor and one successor; it neither merges alternatives nor branches. **Answer: C — i - 1, ii - 1.** A: **Incorrect:** Out-degree 2 introduces branching. B: **Incorrect:** An interior vertex is not an entry and does not have in-degree 0. C: **Correct:** One incoming and one outgoing edge keep the chain linear. D: **Incorrect:** Out-degree 0 makes it an exit rather than an interior vertex.

Report a correction for Q199

Question 200 MCQ · 5.0 marks

Source diagram or notation
6406535137557.Source diagram or notation
6406535137558.Source diagram or notation
6406535137559.Source diagram or notation
6406535137560.Source diagram or notation

Published solution

**1. Identify the definition and use:** A du-path for x starts at \(v_i\), where x is defined, and reaches \(v_j\), where that value is used. **2. Preserve the value:** The connecting path must be definition-clear for x, with no intervening redefinition. **Answer: B — x defined at vi and used at vj on a def-clear path.** **Convention note:** A formal du-path is also simple; the correct offered option supplies the essential definition-clear reaching condition. A: **Incorrect:** Reachability alone is insufficient if x is overwritten en route. B: **Correct:** The path carries the original definition to its use without redefining x. C: **Incorrect:** This reverses the definition and use locations. D: **Incorrect:** This both reverses the locations and omits definition-clear reachability.

Report a correction for Q200

Question 201 MCQ · 5.0 marks

Source diagram or notation
6406535137561.Source diagram or notation
6406535137562.Source diagram or notation
6406535137563.Source diagram or notation
6406535137564.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q201

Question 202 MCQ · 5.0 marks

Which of the following graph coverage criteria is equivalent to state coverage on a finite state machine (FSM)?
6406535137565.
Node coverage
6406535137566.
Edge coverage
6406535137567.
Edge-pair coverage
6406535137568.
Prime path coverage

Published solution

**1. Identify the key property:** FSM states are graph vertices. Visiting every state is node coverage. **Answer: A — Node coverage.** A: **Correct:** Every state corresponds to a node. B: **Incorrect:** Edge coverage instead checks every transition. C: **Incorrect:** Edge-pair coverage checks consecutive transitions. D: **Incorrect:** Prime-path coverage adds maximal simple sequences of transitions.

Report a correction for Q202

Question 203 MSQ · 5.0 marks

Which of the following types of testing methods are white box, i.e. require knowledge about the internals of the program?
6406535137569.
Unit Testing
6406535137570.
Stress Testing
6406535137571.
Integration Testing
6406535137572.
Beta Testing

Published solution

**1. Use the question’s intended implementation-aware setting:** Unit tests inspect individual implementation units, while integration tests may inspect their internal interactions. Stress and beta tests are ordinarily driven by external behaviour and usage. **Answer: A, C — Unit and integration testing in the intended white-box setting.** **Convention note:** Test level and white-/black-box technique are separate dimensions. Unit and integration tests can also be black-box; the selected options are the course’s intended implementation-aware cases, not a claim that every such test requires source knowledge. A: **Correct:** Implementation-aware unit testing can be white-box. B: **Incorrect:** Stress testing concerns load tolerance and need not inspect internal code. C: **Correct:** Implementation-aware integration tests can be white-box. D: **Incorrect:** Beta users evaluate behaviour without inspecting the program internals.

Report a correction for Q203

Question 204 MSQ · 5.0 marks

Source diagram or notation
Source diagram or notation
6406535137573.Source diagram or notation
6406535137574.Source diagram or notation
6406535137575.Source diagram or notation
6406535137576.Source diagram or notation

Published solution

**1. Identify the fault:** The loop condition i<length−1 never computes the last vector component. The final result element stays at its default zero. **2. Evaluate the tests:** Test 1 expects a final sum 50−50=0 and passes accidentally. Test 3 also expects a final sum 0+0=0. Test 2 expects 8−5=3 and Test 4 expects 1+1=2, so those two assertions fail. **Answer: B, D — testCase2() and testCase4().** A: **Incorrect:** The true final sum is zero, matching the untouched result element. B: **Correct:** The missing final sum 3 exposes the loop-bound fault. C: **Incorrect:** The true final sum is zero, so the faulty output still matches. D: **Correct:** The missing final sum 2 exposes the loop-bound fault.

Report a correction for Q204

Question 205 MCQ · 5.0 marks

Consider the following control flow graph (CFG), and answer the subsequent questions.
Source diagram or notation
How many test requirements are there for edge-pair coverage?
6406535137577.
9
6406535137578.
10
6406535137579.
11
6406535137580.
8

Published solution

**1. Read the graph’s edges:** 1→2; 2→3,6; 3→4,5; 4→3; 5→2. **2. Count pairs at intermediate nodes:** Node 2 has 2 incoming and 2 outgoing edges; node 3 also has 2 and 2. Nodes 4 and 5 each contribute one: \(4+4+1+1=10\). **Answer: B — 10.** A: **Incorrect:** The stated structure gives 10, rather than 9. B: **Correct:** This equals the independently counted result 10. C: **Incorrect:** The stated structure gives 10, rather than 11. D: **Incorrect:** The stated structure gives 10, rather than 8.

Report a correction for Q205

Question 206 MCQ · 5.0 marks

Consider the following control flow graph (CFG), and answer the subsequent questions.
Source diagram or notation
How many test requirements are there for prime path coverage?
6406535137581.
9
6406535137582.
12
6406535137583.
10
6406535137584.
11

Published solution

**1. Enumerate maximal simple paths:** 1-2-3-4, 1-2-3-5, 1-2-6, 2-3-5-2, 3-4-3, 3-5-2-3, 4-3-4, 4-3-5-2-6, 5-2-3-4, 5-2-3-5. **2. Check the definition:** Every listed path is simple, allowing its first and last vertex to match for a cycle; none is a proper subpath of a longer simple path. These ten are the prime-path requirements. **Answer: C — 10.** A: **Incorrect:** The stated structure gives 10, rather than 9. B: **Incorrect:** The stated structure gives 10, rather than 12. C: **Correct:** This equals the independently counted result 10. D: **Incorrect:** The stated structure gives 10, rather than 11.

Report a correction for Q206

Question 207 MCQ · 5.0 marks

Consider the following control flow graph (CFG), and answer the subsequent questions.
Source diagram or notation
What is the cyclomatic complexity of the given CFG?
6406535137585.
3
6406535137586.
4
6406535137587.
5
6406535137588.
6

Published solution

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

Report a correction for Q207

Question 208 MCQ · 5.0 marks

Consider the following data flow graph, and answer the subsequent questions.
Source diagram or notation
How many test requirements are there for All-Defs-Coverage for variable x?
6406535137589.
1
6406535137590.
2
6406535137591.
3
6406535137592.
4

Published solution

**1. Locate definitions:** x=a defines x at node 1; x=y redefines it at node 3. **2. Require a use from each definition:** Both reach print(x) at node 5 on suitable def-clear paths, giving two all-defs requirements. **Answer: B — 2.** A: **Incorrect:** The stated structure gives 2, rather than 1. B: **Correct:** This equals the independently counted result 2. C: **Incorrect:** The stated structure gives 2, rather than 3. D: **Incorrect:** The stated structure gives 2, rather than 4.

Report a correction for Q208