# NPTEL Software Testing Assignment 2 Answers 2022

In this post, We have provided answers of NPTEL Software Testing Assignment 2 Answers 2022. We provided answers here only for reference. Plz, do your assignment at your own knowledge.

## NPTEL Software Testing Assignment 2 Answers July 2022

1. 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:- c`

2. How are test requirements defined and met in graphsbased 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:- b`

3. 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:- a`

Note:- We Do not claim 100% surety of answers, copy at your own risk.

4. Consider a control flow graph G corresponding to a method and a strongly connected component S in C. Which of the following does S represent in the code that G corresponds to?

a. S represents the entire method in case the method does not have loops.
b. S represents a loop in the method.

`Answer:- b`

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

b. Depth first search.

`Answer:- a`

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

a. True.
b. False.

`Answer:- b`

7. 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:- a`

8. 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:- b`

9. 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`

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

a. True.
b. False

`Answer:- a`

## About Software Testing NPTEL Course

This course will cover various techniques for test case design, as used for testing of software artifacts including requirements, design and code. We will discuss algorithms and techniques for test case design based on graphs, logic, syntax of programming languages and on inputs. Special techniques for testing object-oriented features and web applications will also be discussed. The course will end with symbolic testing techniques. These broadly will cover test cases for both white-box and black-box.

### COURSE LAYOUT

• Week 1: Techniques and algorithms for test case design: Graphs based testing- structural coverage criteria.
• Week 2: Graphs based testing: Data flow coverage criteria
• Week 3: Graphs based testing: Data flow coverage criteria
• Week 4: Graphs coverage for source code, design elements and requirements
• Week 5: Techniques and algorithms for test case design: Logic based testing- Predicates, logic based coverage criteria
• Week 6: Specification based logic coverage, logic coverage on finite state machines
• Week 7: Input space partitioning: Input domain modeling, combination strategies criteria
• Week 8: Syntax based testing: Coverage criteria based on syntax, mutation testing
• Week 9: Test case design (as learnt above) applied to object-oriented applications
• Week 10: Test case design (as learnt above) applied to web applications
• Week 11: Symbolic testing
• Week 12: Concolic testing, Conclusion

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of the best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.