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
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.
Level 1
Level 2
Level 3
Level 4
**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.
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.
Statement i) is correct and Statement ii) is incorrect.
Statement ii) is correct and Statement i) is incorrect.
Both statements are incorrect.
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.
Question 193 MCQ · 5.0 marks
Which of the following are required to create a test case?
Test inputs and actual outputs
Test inputs and expected outputs
Actual outputs and expected outputs
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.
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.
Statement i) is correct and Statement ii) is incorrect.
Statement ii) is correct and Statement i) is incorrect.
Both statements are incorrect.
Both statements are correct.
A published solution is not available for this question yet.
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.
test method
test driver
test stub
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.
Question 196 MCQ · 5.0 marks
Shared memory interface
Procedure call interface
Message passing interface
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.
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.
Statement i) and iii) are correct. Statement ii) is incorrect.
Statement i) is correct. Statement ii) and iii) are incorrect.
Statement ii) and iii) are correct. Statement i) is incorrect.
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.
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.
bottom-up
top-down
sandwich
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.
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)___.
i - 1, ii - 2
i - 0, ii - 2
i - 1, ii - 1
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.
Question 200 MCQ · 5.0 marks
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.
Question 201 MCQ · 5.0 marks
A published solution is not available for this question yet.
Question 202 MCQ · 5.0 marks
Which of the following graph coverage criteria is equivalent to state coverage on a finite state
machine (FSM)?
Node coverage
Edge coverage
Edge-pair coverage
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.
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?
Unit Testing
Stress Testing
Integration Testing
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.
Question 204 MSQ · 5.0 marks
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.
Question 205 MCQ · 5.0 marks
Consider the following control flow graph (CFG), and answer the subsequent questions.
How many test requirements are there for edge-pair coverage?
9
10
11
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.
Question 206 MCQ · 5.0 marks
Consider the following control flow graph (CFG), and answer the subsequent questions.
How many test requirements are there for prime path coverage?
9
12
10
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.
Question 207 MCQ · 5.0 marks
Consider the following control flow graph (CFG), and answer the subsequent questions.
What is the cyclomatic complexity of the given CFG?
3
4
5
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.
Question 208 MCQ · 5.0 marks
Consider the following data flow graph, and answer the subsequent questions.
How many test requirements are there for All-Defs-Coverage for variable x?
1
2
3
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.