MauryaHub PYQ Practice

Software Testing · Quiz 1 · May 2025

Software Testing · Quiz 1 · May 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.

17 / 20 published solutions

Question 18 MCQ · 5.0 marks

The following table lists some concepts from Software Testing.
Source diagram or notation
Match each term given in Column A with the related term given in Column B.
6406534313460.
i - a, ii - b, iii - c, iv - d
6406534313461.
i - d, ii - c, iii - b, iv - a
6406534313462.
i - b, ii - c, iii - a, iv - d
6406534313463.
i - d, ii - b, iii - c, iv - a

Published solution

**1. Identify the concept:** Cyclomatic complexity counts independent paths; edge coverage corresponds to branch coverage; data-flow testing follows definition-clear paths; DD-paths compress maximal chains. **Answer: B — i - d, ii - c, iii - b, iv - a.** A: **Incorrect:** The four concepts are mismatched. B: **Correct:** All four mappings agree with the definitions. C: **Incorrect:** Data-flow testing is not maximal-chain analysis. D: **Incorrect:** Edge coverage and data-flow testing are swapped.

Report a correction for Q18

Question 19 MCQ · 5.0 marks

A mobile app sends a request over the network to the server, to retrieve results of students in a particular subject, upon receiving the request, the server responds back with the results data for that subject. In this scenario, which type of interface exists between the mobile app and the server?
6406534313476.
Shared memory interface
6406534313477.
Message-passing interface
6406534313478.
Procedure call interface
6406534313479.
External file interface

Published solution

**1. Identify the concept:** The app and server exchange request and response messages over a network, so their communication is a message-passing interface. **Answer: B — Message-passing interface.** A: **Incorrect:** No shared memory block is described. B: **Correct:** Network messages carry the request and response. C: **Incorrect:** The scenario describes message exchange, without specifying a procedure-call abstraction. D: **Incorrect:** No shared external file is used.

Report a correction for Q19

Question 20 MCQ · 5.0 marks

In an organization, software developers and testers are cooperating with each other in order to reduce risks in using the software product. Considering this scenario, identify the minimum process maturity level of this organization.
6406534313488.
Level 1
6406534313489.
Level 2
6406534313490.
Level 3
6406534313491.
Level 4

Published solution

**1. Identify the concept:** In the testing-maturity model used here, Level 3 treats testing as risk reduction and encourages cooperation between developers and testers. **Answer: C — Level 3.** A: **Incorrect:** Level 1 aims primarily to demonstrate that software works. B: **Incorrect:** Level 2 emphasizes detecting failures rather than the cooperative risk-reduction objective. C: **Correct:** Cooperative reduction of usage risks characterizes Level 3. D: **Incorrect:** Level 4 is the broader quality-discipline perspective; Level 3 already meets this scenario.

Report a correction for Q20

Question 21 MCQ · 5.0 marks

A software testing engineer performed various tests on a web application to ensure that users can easily access and use the application user interface on different types of devices such as smartphones, tablets, and desktop computers, all of which have different form factors and screen sizes. Which of the following types of testing does this scenario represent?
6406534313492.
Stress Testing
6406534313493.
Usability Testing
6406534313494.
Functional Testing
6406534313495.
Performance Testing

Published solution

**1. Identify the concept:** The objective is making the interface easy to access and use across different device sizes. This is usability testing. **Answer: B — Usability Testing.** A: **Incorrect:** No overload or resource-exhaustion condition is described. B: **Correct:** Ease of using the interface is the primary concern. C: **Incorrect:** Functional testing checks specified feature outputs. D: **Incorrect:** Performance testing focuses on response time, throughput and resource use.

Report a correction for Q21

Question 22 MCQ · 5.0 marks

Fill in the blank with the appropriate option. _______________ deals with testing each linearly independent path in the CFG of the program.
6406534313500.
Complexity testing
6406534313501.
Basis path testing
6406534313502.
Unit testing
6406534313503.
Integration testing

Published solution

**1. Identify the concept:** Basis path testing selects a basis of linearly independent control-flow paths, whose size is the cyclomatic complexity. **Answer: B — Basis path testing.** A: **Incorrect:** Complexity measures path structure but is not this named testing technique. B: **Correct:** It explicitly tests independent basis paths. C: **Incorrect:** Unit testing specifies scope, not this path-selection criterion. D: **Incorrect:** Integration testing targets component interactions.

Report a correction for Q22

Question 23 MCQ · 4.0 marks

Consider the following statements and choose the appropriate option. i) A module or a component is a self-contained element of a system. ii) Interfaces implement a mechanism for passing control and data between modules.
6406534313464.
Statement i) is correct and Statement ii) is incorrect.
6406534313465.
Statement ii) is correct and Statement i) is incorrect.
6406534313466.
Both statements are incorrect.
6406534313467.
Both statements are correct.

Published solution

**1. Identify the concept:** A module packages a self-contained portion of a system. Its interfaces define how it exchanges control and data with other modules, so both statements are correct. **Answer: D — Both statements are correct..** A: **Incorrect:** The interface statement is also correct. B: **Incorrect:** The component statement is also correct. C: **Incorrect:** Both descriptions are valid. D: **Correct:** Both descriptions match modular software design.

Report a correction for Q23

Question 24 MCQ · 4.0 marks

Consider the following statements and choose the appropriate option. i) Each du-path is a simple path, so prime path coverage subsumes all-du-paths coverage. ii) All-du-paths coverage does not subsume edge coverage.
6406534313468.
Statement i) is correct and Statement ii) is incorrect.
6406534313469.
Statement ii) is correct and Statement i) is incorrect.
6406534313470.
Both statements are incorrect.
6406534313471.
Both statements are correct.

Published solution

**1. Compare prime and DU paths:** A DU-path is simple and definition-clear. It is contained in a maximal simple path, so directly covering every prime path also covers all DU-path requirements. **2. Apply the course’s program-CFG hierarchy:** With reachable definitions for branch predicate uses, all-DU-paths covers those branch outcomes and subsumes edge coverage; statement ii is false under this convention. **Answer: A — i true; ii false under the program-CFG convention.** **Convention note:** The edge-coverage implication assumes a program CFG whose required edges are exercised by reachable data-flow obligations. For a general abstract graph with edges unrelated to variable uses, all-DU coverage alone need not cover every edge. A: **Correct:** Statement i is true and ii is false under the course hierarchy. B: **Incorrect:** This reverses the intended truth values. C: **Incorrect:** The simple-path argument establishes statement i. D: **Incorrect:** Statement ii is false under the course’s coverage assumptions.

Report a correction for Q24

Question 25 MCQ · 4.0 marks

Fill in the blank with the appropriate option. _______________ is a software component or test tool that replaces a component that takes care of the control and/or the calling of a software component.
6406534313472.
Test driver
6406534313473.
Test suite
6406534313474.
Test method
6406534313475.
Test stub

Published solution

**1. Identify the concept:** A test driver stands in for a caller and invokes the component under test, passing inputs and checking or recording results. **Answer: A — Test driver.** A: **Correct:** It replaces the controlling or calling component. B: **Incorrect:** A suite is a collection of tests. C: **Incorrect:** A test method implements a test case rather than identifying this caller replacement. D: **Incorrect:** A stub replaces a component called by the tested component.

Report a correction for Q25

Question 26 MCQ · 4.0 marks

Fill in the blank with the appropriate option. A path from node ni to nj is a _________ if no node appears more than once, except possibly the first and last node.
6406534313484.
simple path
6406534313485.
test path
6406534313486.
DD-path
6406534313487.
def-clear path

Published solution

**1. Identify the concept:** A simple path has no repeated internal vertex; a cycle may repeat its first vertex as its last vertex. **Answer: A — simple path.** A: **Correct:** This is exactly the stated definition. B: **Incorrect:** A test path starts at an initial node and ends at a final node. C: **Incorrect:** A DD-path is a specific compressed chain or qualifying singleton. D: **Incorrect:** Def-clear describes absence of variable redefinitions.

Report a correction for Q26

Question 27 MCQ · 4.0 marks

Fill in the blank with the appropriate option. A DD-path consists of a maximal chain of length __________.
6406534313504.
equal to 1
6406534313505.
equal to 2
6406534313506.
greater than or equal to 1
6406534313507.
at most 3

Published solution

**1. Identify the concept:** The maximal-chain case of a DD-path permits chains of length at least one; it is not restricted to a fixed length or a three-edge bound. **Answer: C — greater than or equal to 1.** A: **Incorrect:** Length is not restricted to exactly one. B: **Incorrect:** Length is not restricted to exactly two. C: **Correct:** The definition allows any maximal chain of length at least one. D: **Incorrect:** There is no universal upper bound of three.

Report a correction for Q27

Question 28 MCQ · 6.0 marks

Consider the following statements regarding the approaches in integration testing: i) In big bang approach, the entire system is tested as a whole. ii) Sandwich approach uses a mix of top-down and bottom-up testing approaches. iii) Top-down approach does not work well for systems with hierarchical design. Choose the correct option.
6406534313480.
Statement i) and iii) are correct. Statement ii) is incorrect.
6406534313481.
Statement i) is correct. Statement ii) and iii) are incorrect.
6406534313482.
Statement ii) and iii) are correct. Statement i) is incorrect.
6406534313483.
Statement i) and ii) are correct. Statement iii) is incorrect.

Published solution

**1. Identify the concept:** Big-bang integration combines and tests the whole set of components together. Sandwich integration combines top-down and bottom-up work. Top-down integration naturally suits a hierarchical design, making statement iii false. **Answer: D — Statement i) and ii) are correct. Statement iii) is incorrect..** A: **Incorrect:** Statement ii is true and iii is false. B: **Incorrect:** Statement ii is also true. C: **Incorrect:** Statement i is true and iii is false. D: **Correct:** Exactly statements i and ii are correct.

Report a correction for Q28

Question 29 MCQ · 6.0 marks

Complete path coverage on a CFG becomes infeasible due to which of the following reasons?
6406534313496.
Due to presence of multiple branches
6406534313497.
Due to presence of multiple terminal nodes
6406534313498.
Due to presence of loops
6406534313499.
Complete path coverage is always feasible

Published solution

**1. Identify the concept:** An unbounded loop permits arbitrarily many iteration counts and therefore infinitely many execution paths. Complete path coverage cannot test all of them. **Answer: C — Due to presence of loops.** A: **Incorrect:** Branches create many paths but need not create infinitely many. B: **Incorrect:** Several terminal nodes do not inherently prevent finite coverage. C: **Correct:** Unbounded loop repetition creates an unbounded path set. D: **Incorrect:** Loops and infeasible paths can make complete coverage impossible.

Report a correction for Q29

Question 30 MSQ · 6.0 marks

Source diagram or notation
6406534313508.
testcase1()
6406534313509.
testcase2()
6406534313510.
testcase3()
6406534313511.
testcase4()

A published solution is not available for this question yet.

Report a correction for Q30

Question 31 MCQ · 5.0 marks

Consider the CFG given below, and answer the subquestions.
Source diagram or notation
How many test requirements are there for edge-pair coverage?
6406534313512.
12
6406534313513.
11
6406534313514.
9
6406534313515.
10

A published solution is not available for this question yet.

Report a correction for Q31

Question 32 MCQ · 6.0 marks

Consider the CFG given below, and answer the subquestions.
Source diagram or notation
How many test requirements are there for prime path coverage?
6406534313516.
8
6406534313517.
6
6406534313518.
3
6406534313519.
10

Published solution

**1. Enumerate maximal simple paths:** [1,2,3,4], [1,2,6,7], [1,5,7], [2,3,4,2], [3,4,2,3], [3,4,2,6,7], [4,2,3,4], [5,5]. **2. Count:** There are eight. The three rotations of the 2–3–4 cycle are distinct path requirements, and the 5 self-loop is a simple cycle. **Answer: A — 8.** A: **Correct:** The derived count is 8, which matches this option. B: **Incorrect:** The derived count is 8, not 6. C: **Incorrect:** The derived count is 8, not 3. D: **Incorrect:** The derived count is 8, not 10.

Report a correction for Q32

Question 33 NAT · 5.0 marks

Consider the CFG given below, and answer the subquestions.
Source diagram or notation
What is the cyclomatic complexity of the given CFG?

Published solution

**1. Count graph elements:** There are \(N=7\) vertices and \(E=9\) directed edges, including the self-loop. **2. Apply the connected-CFG formula:** \(V=E-N+2=9-7+2=4\). **Answer: 4.**

Report a correction for Q33

Question 34 NAT · 5.0 marks

Consider the following data flow graph and answer the given subquestions.
Source diagram or notation
How many definitions are there for the variable **p**?

Published solution

**1. Locate assignments to p:** Node 2 contains p=a; node 4 contains p=q. No other node assigns a new value to p, so there are two definitions. **Answer: 2.**

Report a correction for Q34

Question 35 NAT · 5.0 marks

Consider the following data flow graph and answer the given subquestions.
Source diagram or notation
How many uses are there for the variable **p**?

Published solution

**1. Count predicate uses:** p is read on edges (3,4), (3,5), (6,7), (6,8): four predicate-use locations. **2. Count computation uses:** Node 7 reads p in q=p. Thus there are 4+1=5 uses. **Answer: 5.**

Report a correction for Q35

Question 36 NAT · 6.0 marks

Consider the following data flow graph and answer the given subquestions.
Source diagram or notation
How many du-pairs are there for the variable **p**?

A published solution is not available for this question yet.

Report a correction for Q36

Question 37 MCQ · 5.0 marks

Consider the following data flow graph and answer the given subquestions.
Source diagram or notation
Which of the following is not a def-clear path for variable **p**?
6406534313524.
[2, 3, 5]
6406534313525.
[2, 3, 4]
6406534313526.
[2, 3, 4, 3, 5]
6406534313527.
[6, 7, 6, 8]       **AI** **Section Id :** 64065391696 **Section Number :** 3 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 7 **Number of Questions to be attempted :** 7 **Section Marks :** 25 **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

Published solution

**1. Check interior redefinitions:** p is defined at nodes 2 and 4. Path [2,3,4,3,5] passes through node 4 internally, overwriting the value that originated at node 2. **2. Compare the alternatives:** [2,3,5] has no redefinition; in [2,3,4], node 4 is the endpoint. The 6–7 loop changes q, not p. **Answer: C — [2,3,4,3,5].** A: **Incorrect:** It does not pass through an interior definition of p. B: **Incorrect:** The new assignment is at the endpoint rather than an interior node. C: **Correct:** Its interior node 4 redefines p. D: **Incorrect:** Nodes 6 and 7 assign q rather than p.

Report a correction for Q37