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 test path p tours a sub-path q with a side-trip when p is an infeasible test path on its own.
- A test path p tours a sub-path q with a side-trip when every vertex and every edge in q also occurs in p in the same order.
- A test path p tours a sub-path q with a side-trip when every vertex in q also occurs in p in the same order.
- A test path p tours a sub-path q with a side-trip when every edge in q also occurs in p in the same order.
Answer :- For Answers Click Here
2. Which of the graph traversal algorithms given below, when run on a graph that does not have edge weights, will return the shortest path between a pair of vertices?
- Depth first search (DFS)
- Breadth first search (BFS)
- Both DFS and BFS
- Neither BFS nor DFS
Answer :- For Answers Click Here
3. Why is complete path coverage considered to be an infeasible structural graph coverage criterion?
- Complete path coverage could be infeasible if the graph has several disconnected components.
- Complete path coverage could be infeasible if the graph has strongly connected components or loops.
- Complete path coverage could be infeasible if the graph has isolated vertices or edges.
- Complete path coverage could be infeasible as covering all paths in a graph through test cases is not needed.
Answer :-
4. Which graph coverage criterion considers writing test cases where all the simple paths of maximal length are visited?
- Complete path coverage.
- Simple path coverage.
- Specified path coverage.
- Prime path coverage.
Answer :- For Answers Click Here
5. Which are the three vertices that will be added to the BFS queue in the first step of the BFS algorithm? Does the order in which they are added matter?
- The three vertices will be 2, 3 and 4, their order will be exactly the same as the one given in this answer option.
- The three vertices will be 2, 3 and 4, their order does not matter.
- The three vertices will be 2, 3 and 5, their order will be exactly the same as the one given in this answer option.
- The three vertices will be 2, 3 and 5, their order does not matter.
Answer :-
6. If vertices 2, 3 and 4 are added in the queue in the given order during the BFS visit, which vertex will be marked as visited first?
- Vertex 2 will be marked as visited first.
- Vertex 3 will be marked as visited first.
- Vertex 4 will be marked as visited first.
- None of the three given vertices will be marked as visited first.
Answer :-
7. When will BFS traversal be complete for the given graph?
- BFS traversal will be complete when all the vertices are marked as visited and the queue is empty.
- BFS traversal will be complete when all the vertices are added to the queue.
Answer :- For Answers Click Here
8. Which of the following represents a correct order of visit during a breadth first search traversal of the given graph starting from vertex 1?
- 1, 2, 3, 4, 5.
- 1, 4, 5, 2, 3.
- 1, 5, 4, 3, 5.
- 1, 4, 5, 2, 3.
Answer :-
9. Which of the following represents a correct order of visit during a depth first search traversal of the given graph starting from vertex 1?
- 1, 4, 5, 2, 3.
- 1, 2, 3, 4, 5.
- 1, 2, 3, 5, 4.
- 1, 5, 4, 3, 2.
Answer :-
10. Which of the following options are true regarding DFS and BFS traversals in the given graph starting with vertex 1?
- Both DFS and BFS will always visit the vertices in the same order.
- DFS order of traversal need not be the same as the BFS order of traversal for the give graph.
Answer :- For Answers Click Here