Software Testing | Week 3

   
   

Session Jan-Apr 2023

Course Name: Soft Skills Development

Course Link: Click Here

These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q1. Which of the following types of program models is/are normally used to design the integration test plan in a software project deploying procedural development?
a. Control Flow graph (CFG)
b. Data Flow Diagram (DFD)
c. Structure chart
d. Entity Relationship Diagram (ERD)
e. Program dependency graph (PDG)

Answer: Update Soon


Q2. For a given function, the computed McCabe’s Cyclometric complexity metric does not correlate with which of the following?
a. Number of errors existing in the function after unit testing is complete
b. Time required to find the location of an error after a failure.
c. Number of lines of code (LOC)
d. Difficulty of understanding the function.
e. Number of test cases required to achieve MC/DC

Answer: Update Soon


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q3. Which of the following characterize the equivalent mutants?
a. Mutants which arise from the similar code changes
b. Mutants which fail with the same set of test cases
c. Mutants for which no test cases fail
d. Mutants for which all test cases fail
e. Mutants for which number of test cases fail

Answer: Update Soon


Q4. What would be the Cyclomatic complexity of the following function?
a. 2
b.3
c. 4
d. 5
e. 6

Answer: Update Soon


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q5. Which one of the following is the recommended integration testing strategy for a program having only three modules?
a. Top-down
b. Bottom-up
c. Mixed
d. Big-bang
e. Use-based

Answer: Update Soon


Q6. If MC/DC coverage has been achieved on a unit under test, which of the following test coverage is/are implicitly implied?
a. Path coverage
b. Multiple condition coverage
c. Statement coverage
d. Condition/decision coverage
e. Data flow coverage

Answer: Update Soon


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q7. For the following program statement, which of the following test suites would achieve basic condition/decision coverage?
if (a>50 || b<50) p++;

a. (a=100, b=0), (a=0, b=100)
b. (a=20, b=10), (a=0,b=15)
c. (a=20, b=10), (a=0, b=15), (a=5, b=45)
d. (a=60, b-70), (a=0, b=35)
e. (a=60, b=20), (a=1, b=85)

Answer: Update Soon


Q8. At least how many test cases are required to achieve modified condition/decision coverage (MC/DC) of the following code segment:
if((a>15) and (b<100) and (c>55)) x=x*y+100;

a. 2
b. 3
c. 4
d. 5
e. 6

Answer: Update Soon


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q9. Why is the all path testing strategy rarely used in practice?
a. Too many test cases are required to be executed
b. Too weak a testing technique
c. It is subsumed by basis path testing
d. It is subsumed by statement coverage
e. It subsumes statement coverage

Answer: Update Soon


Q10. Which of the following are true of the “competent programmer hypothesis”, as used in the mutation testing literature?
a. Mutants corresponding to only simple programming bugs need to be generated as competent programmers make only simple mistakes.
b. Mutants corresponding to only unusual programming bugs need to be generated as competent programmers rarely make simple mistakes.
c. Mutants corresponding to complex algorithmic bugs need to be generated during mutation testing, when the developing team consists of competent programmers,
d. Mutation testing can be meaningfully carried out only for programs developed by competent programmers
e. Mutation testing can be meaningfully carried out only for programs developed by rather novice and incompetent programmers

Answer: Update Soon


These are NPTEL Software Testing Week 3 Assignment 3 Answers

More Weeks of Software Testing: Click Here

More Nptel course: https://progiez.com/nptel


Session Jul-Dec 2022

Course Name: Software Testing

Link to Enroll: Click here

These are NPTEL Software Testing Week 3 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.


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q2. Consider a variable count of type intint. Suppose there is a method that has a statement of the type count++;count++;. Which of the following statements are correct regarding the data flow definition of countcount?

a. The statement is a definition of countcount.
b. The statement is a use of countcount.
c. The statement is both a definition and use of countcount.
d. The statement is neither a definition nor a use of countcount.

Answer: c. The statement is both a definition and use of countcount.


Q3. Consider a variable xx 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 xx or a use of xx?

a. The statement is a definition of xx
b. The statement is a use of xx.

Answer: a. The statement is a definition of xx


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q4. State true or false: Consider a variable xx in a program. Not every definition of xx will always reach a use.
a. True.
b. False.

Answer: a. True.


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q5. Which of the following best defines a du-path for a variable 

a. A du-path is a simple path from a definition of xx to a use of xx without any further definitions of xx in-between.
b. A du-path is a path from a definition of xx to a use of xx without any further definitions of xx in-between.
c. A du-path is a simple path from a definition of xx to a use of xx without any further uses of xx in-between.
d. A du-path is a path from a definition of xx to a use of xx without any further uses of xx in-between.

Answer: d. A du-path is a path from a definition of xx to a use of xx without any further uses of xx in-between.


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q6. State yes or no: We group du-paths with respect to a variable by their definitions.

a. Yes.
b. No.

Answer: b. No.


These are NPTEL Software Testing Week 3 Assignment 3 Answers


Q7. Is it true that the all-du-paths data flow coverage criterion subsumes prime path coverage?

a. Yes.
b. No.

Answer: a. Yes.


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: b. Edge and decision coverage are the same.


These are NPTEL Software Testing Week 3 Assignment 3 Answers


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: c. A path that represents structural complexity of a program.


These are NPTEL Software Testing Week 3 Assignment 3 Answers


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.


These are NPTEL Software Testing Week 3 Assignment 3 Answers

More Solution of NPTEL: https://progiez.com/nptel


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


More from PROGIEZ

These are NPTEL Software Testing Week 3 Assignment 3 Answers