Software Testing NPTEL Week 2 Assignment

                     

Course Name: Software Testing

Link: https://onlinecourses.nptel.ac.in/noc20_cs77/preview

These are Answers for Software Testing NPTEL Week 2 Assignment


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

a)An infeasible test path is one that does not exist in the graph.

b)An infeasible test path is one that can be executed by a failed test case.

c)An infeasible test path is one that cannot be executed by any test case.

d)An infeasible test path is one that does not start at an initial vertex or end at a final vertex.

Answer: b)An infeasible test path is one that can be executed by a failed test case.


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

a)Test requirements are basically the same as test paths, they are given as test paths.

b)Test requirements are defined as properties of test paths and they are met by using test paths that satisfy each test requirement.

Answer: a)Test requirements are basically the same as test paths, they are given as test paths.


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

a)A basic block is a sequence of statements such that there is no branching in the sequence.

b)A basic block is any sequence of statements that occurs as a path in the control flow graph.

Answer: b)A basic block is any sequence of statements that occurs as a path in the control flow graph.


These are Answers for Software Testing NPTEL Week 2 Assignment


Q4.Consider a control flow graph GG corresponding to a method and a strongly connected component SS in CC. Which of the following does SS represent in the code that GG corresponds to?

a)SS represents the entire method in case the method does not have loops.

b)SS represents a loop in the method.

Answer: b)SS represents a loop in the method.


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

a)Breadth first search.

b)Depth first search.

Answer: a)Breadth first search.


These are Answers for Software Testing NPTEL Week 2 Assignment


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

a)True.

b)False.

Answer: b)False.


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

a)Test path [1, 2, 3, 2, 4].

b)Test paths [1, 2, 4] and [1, 2, 3, 2].

c)Both the paths above achieve edge coverage.

d)None of the above two paths achieve edge coverage.

Answer: c)Both the paths above achieve edge coverage.


These are Answers for Software Testing NPTEL Week 2 Assignment


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

a)Yes.

b)No.

Answer: a)Yes.


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

a)Node coverage only.

b)Edge coverage only.

c)Node and edge coverage only.

d)Edge pair coverage.

Answer: d)Edge pair coverage.


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

a)True.

b)False.

Answer: a)True.


These are Answers for Software Testing NPTEL Week 2 Assignment

All weeks Software Testing: Click Here

More Solution of NPTEL: Click me


* The material and content uploaded on this website are for general information and reference purposes only. Please do it by your own first.


These are Answers for Software Testing NPTEL Week 2 Assignment