This set of MCQ(multiple choice questions) focuses on the Software Testing NPTEL Week 3 Solutions.
Over the years program several testing techniques have developed and tools have become available. Also, testing has been acknowledged as the primary technique for ensuring software reliability. The course would provide a brief introduction to test process and techniques available for black box and white box test case design. Integration, system and regression testing would also be discussed. A few of the test tools would be discussed and the participants would be encouraged to use.
Course layout
Answers COMING SOON! Kindly Wait!
Week 1: Assignment answers
Week 2: Assignment answers
Week 3: Assignment answers
Week 4: Assignment answers
Week 5: Assignment answers
Week 6: Assignment answers
Week 7: Assignment answers
Week 8: Assignment answers
Week 9: Assignment answers
Week 10: Assignment answers
Week 11: Assignment answers
Week 12: Assignment answers
NOTE: You can check your answer immediately by clicking show answer button. Software Testing NPTEL 2023 Week 3 Assignment Solution” contains 10 questions.
Now, start attempting the quiz.
Software Testing NPTEL Week 3 Solutions
Q1. Which one of the following correlates well with the testing difficulty of a program?
a) Number of statements in the program
b) Number of decision statements in the program
c) Complexity of the arithmetic expressions used in the program
d) Time complexity of the program
e) Number of looping statements present in the program
f) Number of arithmetic operators used in the program
Answer: b)
Q2. If two code segments have Cyclomatic complexities of N1 and N2 respectively, what will be the Cyclomatic complexity of the juxtaposition of the two code segments?
a) N1+N2
b) N1+N2+1
c) N1+N2-1
d) N1+N2+2
e) N1*N2
Answer: c)
Q3. Which one of the following is a fault-based testing technique?
a) Pair wise testing
b) Dataflow testing
c) Path testing
d) Mutation testing
e) Boundary value testing
Answer: d)
Q4. Which of the following subsumption relations among white-box test coverage criteria are incorrect?
a) Multiple condition coverage subsumes decision coverage
b) Basic condition coverage subsumes decision coverage
c) Basic condition coverage subsumes statement coverage
d) Path coverage subsumes MC/DC
e) Modified Condition/Decision Coverage (MC/DC) subsumes basic condition coverage
Answer: b), d)
Q5. Which of the follwoing are NOT true of white box code coverage?
a) Code coverage increases as more and more test cases are designed and exercised.
b) 100% path coverage is achieved when all the test cases have been exercised.
c) 100% faults in a program are detected when full path coverage is achieved.
d) Test completion criteria are often specified in terms of code coverage criteria.
e) As the code coverage increases, the number of test case failure increases.
Answer: b), c)
Q6. Consider the folowing code snippet.
What would be the path coverage achieved, for a test case with the input values i-5, j=6, k=7?
a) 20%
b) 25%
c) 40%
d) 66.6%
e) 100%
Answer: b)
Q7. If MC/DC coverage has been achieved on a unit under test, which of the following test coverage are implicitly implied?
a) Basis path coverage
b) Decision coverage
c) Multiple condition coverage
d) Condition/decision coverage
e) Data flow coverage
Answer: b), d)
Q8. Which of the following mutants are considered as equivalent mutants?
a) Mutants which arise from the same change
b) Mutants which do not cause failure with the same set of test cases
c) Mutants which cause failure for the same set of test cases
d) Mutants which are obtained from application of the same mutation operator
e) Mutants which cannot be killed by any test case
Answer: e)
Q9. At least how many test cases are required to achieve MC/DC coverage of the following code segment:
If((x==5) or (y<100) or (z>=500)) x=x+1;
a) 1
b) 2
c) 3
d) 4
e) 5
Answer: d)
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)
Software Testing NPTEL Week 3 Solutions
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)
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)
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) Mutatns for which number of test cases fail
Answer: b)
Q4. What would be the Cyclomatic complexity of the following function?
a) 2
b) 3
c) 4
d) 5
e) 6
Answer: a)
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)
Q6. If MC/DC coverge 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: d)
Q7. For the following program statement, which of the following test suites would achieve basic condition/decision coverage?
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: e)
Q8. At least how many test cases are required to achieve modified condition/decision coverage (MC/DC) of the following code segment:
a) 2
b) 3
c) 4
d) 5
e) 6
Answer: c)
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 susumes statement coverage
Answer: a)
Q10. Which fo the following are true of the “competent programmer hypthesis”, as used in the mutation testing literature?
a) Mutants corresposnding to only simple programming bugs need to be generated as competent programmers make only simple mistakes
b) Mutants corresposnding to only unsual programming bugs need to be generated as competent programmers rarely make simple mistakes
c) Mutants corresposnding 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)
<< Prev- Compiler Design NPTEL Week 2 Solutions
>> Next- Compiler Design NPTEL Week 4 Solutions
DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.
For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.
Checkout for more NPTEL Courses: Click Here!