Software Testing NPTEL Week 3 Assignment Answers

Are you looking for Software Testing NPTEL Week 3 Assignment Answers? You’ve come to the right place! Access the latest and most accurate solutions for your Week 3 assignment in the Software Testing course. Our detailed answers are designed to help you understand key concepts and excel in your studies. Stay updated with the most recent information and answers by joining our Telegram channel.

Course Link: Click Here


Software Testing NPTEL Week 3 Assignment Answers
Software Testing NPTEL Week 3 Assignment Answers

Software Testing NPTEL Week 3 Assignment Answers ( July-Dec 2024 )


Q1.State true or false: The control flow graph fragments for loops like while, for etc., can vary slightly and this is acceptable as long as the control flow is captured correctly.
True.
False.

Answer: True.


Q2.A node or a set of nodes that in a particular control flow graph that cannot be reached through DFS or BFS represents which kind of statements in the corresponding program source code?
These node(s) represent statements that are incorrect.
These node(s) represent statements that are not reachable by any input.
These node(s) represent statements that are reachable only by inputs that are wrong or out of range.
These node(s) represent statements that will not contribute to generating outputs when the program is executed.

Answer: These node(s) represent statements that are not reachable by any input.


For answers or latest updates join our telegram channel: Click here to join

These are Software Testing NPTEL Week 3 Assignment Answers


Q3.Given a piece of source code, what is the information about the data that is captured in a data flow graph corresponding the code?
A data flow graph tracks information about how a value of a variable changes.
A data flow graph captures information about how a variable gets defined, in the sense, the kind of statement that defines a variable.
A data flow graph captures information about the statements that define a value for a variable and statements that use the defined value of a variable.
A data flow graph tracks the change of data from the statements where the variables are defined to the statements where the variables are used.

Answer: A data flow graph captures information about the statements that define a value for a variable and statements that use the defined value of a variable.


Q4.Which of the following represents a correct order of subsumption exclusively amongst data flow coverage criteria? In the options below, read →
as ‘subsumes’.

All-defs coverage →All-du-paths coverage →All-uses coverage.

All-defs coverage →All-uses-coverage →All-du-paths coverage.

All-du-paths coverage →All-defs coverage →All-uses-coverage.

All-du-paths coverage →All-uses coverage →All-defs-coverage.

Answer: All-defs coverage →All-uses-coverage →All-du-paths coverage.


For answers or latest updates join our telegram channel: Click here to join

These are Software Testing NPTEL Week 3 Assignment Answers


Q5.Considering the coverage criteria on both control flow graphs and data flow graphs, which of the following represents a correct order of subsumption amongst the mentioned criteria? Again, read →
as ‘subsumes’.

Prime paths coverage →All-du-paths coverage.

All-du-paths coverage →Prime paths coverage.
Since one kind of criteria are on control flow only and the other on data flow only, the two cannot be compared.
None of the control flow coverage criteria subsumes any of the data flow coverage criteria.

Answer: Since one kind of criteria are on control flow only and the other on data flow only, the two cannot be compared.


Q6.List all the nodes where the variable z is defined

Node 6 only.
Nodes 3, 4 and 6 only.
Nodes 3, 4, 5 and 6 only.
Nodes 2, 3, 4, 5 and 6 only

Answer: Nodes 3, 4 and 6 only.


For answers or latest updates join our telegram channel: Click here to join

These are Software Testing NPTEL Week 3 Assignment Answers


Q7.Which of the statements below are correct regarding the definitions and uses of the variables x and y?
The nodes that define the variables x and y are the same.
The nodes that define and use the variables x and y are the same.
The nodes and edges that define the variables x and y are the same.
The nodes and edges that define and use the variables x and y are the same

See also  Software Testing | Week 4

Answer: The nodes and edges that define and use the variables x and y are the same


Q8.State yes or no: The use of the variables at the edges (2, 3) and (2, 4) are the same as the use of the variables at the nodes 3 and 4.
Yes.
No.

Answer: No.


For answers or latest updates join our telegram channel: Click here to join

These are Software Testing NPTEL Week 3 Assignment Answers


Q9.How many du-pairs are there for the variable z?
Eight du-pairs.
Nine du-pairs.
Ten du-pairs.
Eleven du-pairs.

Answer: Nine du-pairs.


Q10.How many unique du-paths are there for the variable z?
Four paths.
Five paths.
Six paths.
Seven paths.

Answer: Five paths.


For answers or latest updates join our telegram channel: Click here to join

These are Software Testing NPTEL Week 3 Assignment Answers

All Weeks of Software Testing: Click here

For answers to additional Nptel courses, please refer to this link: NPTEL Assignment Answers


Software Testing Nptel Week 3 Assignment Answers (Jan-Apr 2024)

Course name: Software Testing

Course Link: Click Here

For answers or latest updates join our telegram channel: Click here to join


Q1. Which of the following pairs of white-box test techniques are complementary test techniques?
a. Statement-coverage and path coverage
b. Multiple condition coverage and MC/DC testing
c. MC/DC and Data flow testing
d. Multiple condition coverage and decision coverage
e. Path coverage and MC/DC testing

Answer: c, e


Q2. Which of the following are the measures of the testing difficulty of a program segment?
a. Number of statements in the program segment
b. Number of decision statements in the program segment
c. Complexity of the arithmetic expressions used in the program segment
d. Mc Cabe’s cyclometric complexity for the program segment
e. Number of arithmetic expressions used in the program segment

Answer: b, d


Q3. At least how many test cases are needed for achieving decision coverage on the given C code?
a) 2
b) 3
c) 5
d) 6
e) 7

Answer: a) 2


For answers or latest updates join our telegram channel: Click here to join


Q4. At least how many test cases are needed for the given C code for achieving basic condition coverage?
a) 2
b) 3
c) 5
d) 6
e) 8

Answer: a) 2


Q5. At least how many test cases are needed for the given C code for achieving multiple condition coverage?
a) 2
b) 4
c) 8
d) 16
e) Multiple condition coverage is not achievable for the given code

Answer: a) 2


Q6. At least how many test cases are needed for the given C code for achieving MC/DC coverage?
a) 2
b) 4
c) 8
d) 16
e) MC/DC coverage is not achievable for the given code

Answer: a) 2


For answers or latest updates join our telegram channel: Click here to join

These are Software Testing Nptel Week 3 Assignment Answers


Q7. At least how many test cases are needed for the given C code for achieving basis path coverage?
a) 2
b) 3
c) 5
d) 7
e) Basis path coverage is not achievable for the given code

Answer: b) 3


Q8. At least how many test cases are required to achieve multiple condition coverage of the following code segment:
If((a>5) and (b<100) and (c>50)) x=x+1;

a) 2
b) 4
c) 6
d) 8
e) 16

Answer: d) 8


Q9. 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 statements in the program
d. Difficulty of understanding the function.
e. Number of test cases required to achieve MC/DC

Answer: c, e


These are Software Testing Nptel Week 3 Assignment Answers


Q10. What is the McCabe’s Cyclomatic complexity for the following code segment?
a. 2
b. 3
c. 4
d. 5
e. 6

Answer: b. 3


For answers or latest updates join our telegram channel: Click here to join

See also  Software Testing NPTEL Week 8 Assignment Answers

More Weeks of Software Testing: Click here

More Nptel Courses: https://progiez.com/nptel-assignment-answers


Software Testing Nptel Week 3 Assignment Answers (Jan-Apr 2023)

Course Name: Soft Skills Development

Course Link: Click Here

These are Software Testing Nptel Week 3 Assignment 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: c. Structure chart


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: c, e



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: c. Mutants for which no test cases fail


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

Answer: b. 3


These are Software Testing Nptel Week 3 Assignment 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: d. Big-bang


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: c, d


These are Software Testing Nptel Week 3 Assignment 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: a, e


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: c. 4


These are Software Testing Nptel Week 3 Assignment 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

These are Software Testing Nptel Week 3 Assignment Answers


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: a,d


These are Software Testing Nptel Week 3 Assignment Answers

More Weeks of Software Testing: Click Here

For answers to additional Nptel courses, please refer to this link: NPTEL Assignment Answers


Software Testing Nptel Week 3 Assignment Answers (Jul-Dec 2022)

Course Name: Software Testing

Link to Enroll: Click here


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.

See also  Software Testing NPTEL Week 6 Assignment Answers

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 Software Testing Nptel Week 3 Assignment 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 Software Testing Nptel Week 3 Assignment 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 Software Testing Nptel Week 3 Assignment 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 Software Testing Nptel Week 3 Assignment 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 Software Testing Nptel Week 3 Assignment 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.


These are Software Testing Nptel Week 3 Assignment Answers


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 Software Testing Nptel Week 3 Assignment 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 Software Testing Nptel Week 3 Assignment 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 Software Testing Nptel Week 3 Assignment Answers