Software Testing Week 2 NPTEL Assignment Answers 2025

Need help with this week’s assignment? Get detailed and trusted solutions for Software Testing Week 2 NPTEL Assignment Answers. Our expert-curated answers help you solve your assignments faster while deepening your conceptual clarity.

✅ Subject: Software Testing
📅 Week: 2
🎯 Session: NPTEL 2025 July-October
🔗 Course Link: Click Here
🔍 Reliability: Verified and expert-reviewed answers
📌 Trusted By: 5000+ Students

For complete and in-depth solutions to all weekly assignments, check out 👉 NPTEL Software Testing Week 2 NPTEL Assignment Answers

🚀 Stay ahead in your NPTEL journey with fresh, updated solutions every week!

NPTEL Software Testing Week 2 Assignment Answers 2025

1. Which of the following best defines an infeasible test path?

  • An infeasible test path is one that does not exist in the graph.
  • An infeasible test path is one that can be executed by a failed test case.
  • An infeasible test path is one that cannot be executed by any test case.
  • An infeasible test path is one that does not start at an initial vertex or end at a final vertex.
Answer : See Answers 

2. How are test requirements defined and met in graphs-based structural coverage criteria?

  • Test requirements are basically the same as test paths, they are given as test paths.
  • Test requirements are defined as properties of test paths and they are met by using test paths that satisfy each test requirement.
Answer :

3. In control flow graphs, which of the terms below represents a basic block?

  • A basic block is a sequence of statements such that there is no branching in the sequence.
  • A basic block is any sequence of statements that occurs as a path in the control flow graph.
Answer :

4. Consider a control flow graph G corresponding to a method and a strongly connected component S
in C. Which of the following does S represent in the code that G corresponds to?

  • S represents the entire method in case the method does not have loops.
  • represents a loop in the method.
Answer :

5. Which of the algorithms will return the shortest paths between two nodes in a control flow graph?

  • Breadth first search.
  • Depth first search.
Answer :

6. State true or false: There are test paths that achieve node coverage but not edge coverage.

  • True.
  • False.
Answer : See Answers

7. Which of the following test paths achieve edge coverage?

  • Test path [1, 2, 3, 2, 4].
  • Test paths [1, 2, 4] and [1, 2, 3, 2].
  • Both the paths above achieve edge coverage.
  • None of the above two paths achieve edge coverage.
Answer :

8. State yes or no: In the graph above, the test path [1, 2, 3, 2, 4] tours the pair of edges [3, 2, 3].

  • Yes.
  • No.
Answer :

9. The test paths {[1, 2, 4], [1, 2, 3, 2, 3, 2, 4]} achieve which of the following coverage criteria?

  • Node coverage only.
  • Edge coverage only.
  • Node and edge coverage only.
  • Edge pair coverage
Answer :

10. State true or false: The test path [1, 2, 3, 2, 4] achieves edge coverage.

True.
False.

Answer : See Answers

NPTEL Software Testing Week 2 Assignment Answers 2024

1. When do we say that a test path p tours a sub-path q with a side-trip?

a. When p is an infeasible test path on its own.
b. When every vertex and every edge in q also occurs in p in the same order.
c. When every vertex in q also occurs in p in the same order.
d. When every edge in q also occurs in p in the same order. ✅

✅ Answer: d
Explanation:
A test path tours a sub-path q with a side-trip if all edges in q occur in t in the same order, though possibly with extra vertices and edges between them. Side-trips allow deviations from q, as long as the essential edges of q are preserved in order.


2. Which graph traversal algorithm returns the shortest path in an unweighted graph?

a. Depth First Search (DFS)
b. Breadth First Search (BFS) ✅
c. Both DFS and BFS
d. Neither BFS nor DFS

✅ Answer: b
Explanation:
BFS explores level by level, so it finds the shortest path (in terms of number of edges) from the start node to every other reachable node in an unweighted graph.


3. Why is complete path coverage considered infeasible as a structural graph coverage criterion?

a. Disconnected components make path coverage infeasible.
b. Graphs with loops or strongly connected components can create infinite paths, making complete path coverage infeasible. ✅
c. Isolated vertices or edges make it infeasible.
d. It’s unnecessary to test all paths.

✅ Answer: b
Explanation:
In the presence of loops or cycles, there are infinitely many paths, so covering every possible path (complete path coverage) becomes impractical or impossible.


4. Which graph coverage criterion requires visiting all simple paths of maximal length?

a. Complete path coverage
b. Simple path coverage
c. Specified path coverage
d. Prime path coverage ✅

✅ Answer: d
Explanation:
Prime paths are simple paths (no repeated nodes except possibly first and last) that are not sub-paths of any longer simple paths. Covering them ensures good test coverage without infinite loops.


5. Which are the three vertices added to the BFS queue first, and does their order matter?

a. 2, 3, 4 – order matters
b. 2, 3, 4 – order does not matter ✅
c. 2, 3, 5 – order matters
d. 2, 3, 5 – order does not matter

✅ Answer: b
Explanation:
In BFS, neighboring nodes are added to the queue, and while the order of addition affects internal queue state, the correctness of the BFS traversal does not depend on the order in which neighbors are enqueued.


6. If 2, 3, and 4 are added to the BFS queue in that order, which will be visited first?

a. Vertex 2 ✅
b. Vertex 3
c. Vertex 4
d. None

✅ Answer: a
Explanation:
BFS uses a queue, which is First-In-First-Out (FIFO). So, the first vertex added (2) is the first to be dequeued and visited.


7. When is BFS traversal complete?

a. When all vertices are visited and the queue is empty ✅
b. When all vertices are added to the queue

✅ Answer: a
Explanation:
BFS is complete when every reachable node has been visited and the queue is empty (no more nodes to process).


8. What is the correct BFS order starting from vertex 1?

a. 1, 2, 3, 4, 5 ✅
b. 1, 4, 5, 2, 3
c. 1, 5, 4, 3, 5
d. 1, 4, 5, 2, 3

✅ Answer: a
Explanation:
BFS visits nodes in increasing levels of distance. Starting from 1, its neighbors (2, 3, 4, etc.) are visited level by level.


9. What is a valid DFS order starting from vertex 1?

a. 1, 4, 5, 2, 3
b. 1, 2, 3, 4, 5
c. 1, 2, 3, 5, 4 ✅
d. 1, 5, 4, 3, 2

✅ Answer: c
Explanation:
DFS goes deep along one branch before backtracking. The exact order depends on the adjacency list, but 1-2-3-5-4 is a valid depth-first traversal.


10. Which statement is true regarding DFS and BFS order?

a. DFS and BFS will always visit vertices in the same order.
b. DFS order need not be the same as BFS order ✅

✅ Answer: b
Explanation:
DFS and BFS use different traversal strategies, so their visit orders will usually differ unless the graph has a specific shape (like a straight line).