
Thousands of students demanded the reference answers to the nptel software testing assignment 3. In response to their demand, I shall upload answers to this assignment here. To get the reference answer, connect with us on telegram.
NPTEL Software Testing Assignment 3 Answers
Q1. Which of the following represents a basic block in a control flow graph?
a. A basic block of statements is a set of all statements that are a part of a function that the control flow graph represents.
b. A basic block of statements is a sequence of statements such that if the first statement the sequence is executed then all the statements in the sequence will also be executed.
Answer: b. A basic block of statements is a sequence of statements such that if the first statement the sequence is executed then all the statements in the sequence will also be executed.
Join us on telegram for notification.
Q2. Consider a variable count of type int. Suppose there is a method that has a statement of the type count++;. Which of the following statements are correct regarding the data flow definition of count?
a. The statement is a definition of count.
b. The statement is a use of count.
c. The statement is both a definition and use of count.
d. The statement is neither a definition nor a use of count.
Answer: c. The statement is both a definition and use of count.
Q3. Consider a variable x of type double and suppose a particular method in Java has a statement if(Math.log(x)) >= 4.2, will it be considered a definition of x or a use of x?
a. The statement is a definition of x
b. The statement is a use of x.
Answer: b. The statement is a use of x.
Q4. State true or false: Consider a variable x in a program. Not every definition of x will always reach a use.
a. True
b. False
Answer: a. True
Q5. Which of the following best defines a du-path for a variable x?
a. A du-path is a simple path from a definition of x to a use of x without any further definitions of x in-between
b. A du-path is a path from a definition of x to a use of x without any further definitions of x in-between
c. A du-path is a simple path from a definition of x to a use of x without any further uses of x in-between
d. A du-path is a path from a definition of x to a use of x without any further uses of x in-between
Answer: a. A du-path is a simple path from a definition of x to a use of x without any further definitions of x in-between
Q6. State yes or no: We group du-paths with respect to a variable by their definitions
a. Yes
b. No
Answer: a. Yes
Q7. Is it true that the all-du-paths data flow coverage criterion subsumes prime path coverage?
a. Yes
b. No
Answer: b. No
Q8. Which of the following statements are true when it comes to comparing traditional source code coverage criteria with graph based coverage criteria?
a. Node and statement coverage are the same, edge and branch coverage are the same
b. Edge and decision coverage are the same
Answer: a. Node and statement coverage are the same, edge and branch coverage are the same
Q9. Which of the following defines a linearly independent path of execution in a control flow graph?
a. A path in which there are no branches
b. A path which does not contain other paths within it
c. A path that represents structural complexity of a program
d. A path within a connected component
Answer: b. A path which does not contain other paths within it
Q10. State true or false: Node and edge coverage, as test requirements for structural coverage over graphs, are given with the input graph itself.
a. True
b. False
Answer: a. True
TELEGRAM FOR NOTIFICATION | Click Here |
Follow on Google News (in one click) | Click Here |
Disclaimer: These answers are provided only for the purpose to help students to take references. This website does not claim any surety of 100% correct answers. So, this website urges you to complete your assignment yourself.
Also Available: