SE - 2024 - Assignment 12
SE - 2024 - Assignment 12
Software Engineering
Assignment-12
TYPE OF QUESTION: MCQ/MSQ
Number of questions: 10 Total mark: 10 X 1 = 10
For each of the following questions one or more of the given options are correct. Choose the
correct options.
QUESTION 1:
Which one of the following statements concerning mutation testing is correct?
a. Mutation testing is used to test if a program has bugs
b. Mutation testing is used to test if it is possible to mutate the program
c. Mutation testing is used to optimize the designed suite
d. Mutation testing is used to test if the test suite is adequate
e. Mutation testing is used to count the number of mutants of the program
Correct Answer: d. Mutation testing is used to test if the test suite is adequate
Detailed Solution:
The mutant whose introduced change does not modify the meaning of the original program are equivalent
mutant. So, equivalent mutant cannot be killed by test cases.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 3:
Which of the following is not a major shortcoming of the mutation testing technique?
a. Hard to automate mutant generation
b. Certain types of mutants are hard to generate
c. Presence of equivalent mutants make it difficult to automate the entire mutation
testing process
d. Mutation testing is computationally very expensive, as a large number of possible
mutants can be generated.
e. Multiple mutants may get killed by the same test case
Correct Answer: a. Hard to automate mutant generation
Detailed Solution:
The process of generation and killing of mutants:
–Can be automated by predefining a set of primitive changes that can be applied to the program. So,
option a. is correct.
QUESTION 4:
In the context of mutation testing, suppose to create a mutant you replace the instruction y=2*x
in your program by y=x+x. What kind of mutant have you created?
a. Trivial mutant
b. Stillborn mutant
c. Higher-order mutant
d. Equivalent mutant
e. Erroneous mutant
Detailed Solution:
The mutant whose introduced change does not modify the meaning of the original program are equivalent mutant.
Here y=2*x and y = x+x are giving same results. So, option d. is correct.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 5:
At least how many test cases are required to achieve MC/DC coverage of the following code
segment:
Correct Answer: c. 3
Detailed Solution:
In MC/DC, for n basic condition n+1 test cases required. Here n=2, so test cases required =3.
QUESTION 6:
If MC/DC coverage has been achieved on a unit under test, which of the following test coverage
are implicitly implied?
a. Path coverage
b. Multiple condition coverage
c. Condition/decision coverage
d. Statement coverage
e. Data flow coverage
MC/DC subsumes statement coverage and Condition/decision coverage. Please refer slide no. 14 to 15
of week 12 lecture material.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
QUESTION 7:
What is the McCabe’s Cyclomatic complexity measure for the following code segment?
a. 2
b. 3
c. 4
d. 5
e. 6
Correct Answer: c. 4
Detailed Solution:
If we represent a control flow graph of the program we will find, number of edges=10, number of
vertices = 8. So, E-N+2=4.
QUESTION 8:
Which one of the following can be considered as a fault-based testing technique?
a. Cause-effect graphing
b. Data flow testing
c. Orthogonal array testing
d. Mutation testing
e. Pair-wise testing
Correct Answer: d. Mutation testing
Detailed Solution:
QUESTION 9:
Among the following testing techniques, which one of the following is the strongest?
a. All path coverage testing
e. MC/DC testing
QUESTION 10:
Which of the following attributes of a program can be inferred from its Cyclomatic complexity?
a. Computational complexity
b. Lines of code (LoC)
c. Understandability
d. Executable code size
e. Testability