NPTEL Software Testing Week 9 Assignment Answers 2024
1. Which of the following statements are true about mutation testing applied at the various stages of the software development life-cycle?
- Mutation can be applied to programs, input strings and to design artifacts. In all the cases, test cases are written to kill the mutants.
- Mutation can be only applied to programs and test cases can be written to kill the mutants.
- Mutation can be applied to programs, inputs and to design artifacts. Test cases can be written to kill the mutants for programs and design artifacts, not for input mutations.
- Mutation can be applied only to individual methods, not for inputs and design artifacts. Test cases can be written to kill the mutants.
Answer :- For Answers Click Here
2. State yes or no: Are there mutation operators available for inputs that are XML files that are used in web applications?
- Yes.
- No.
Answer :- For Answers Click Here
3. Consider a method A calling another method B, with the callee method B returning an integer back to method A. In a particular mutation, the method call for B is deleted and instead of the return statement, an integer constant is added in the same statement in method A. Which type of mutation will this be?
- Integration method replacement.
- Integration method call deletion.
- Integration method return value change.
- Integration callee method change.
Answer :- For Answers Click Here
4. Suppose the access level for a method M in a particular class C is changed and this change denies access to the method M for one of the child classes of C. Which mutation operator has been applied here and has the resulting mutant been successfully killed?
- Overriding method change operator has been applied and the resulting mutant has been killed.
- Overriding method deletion operator has been applied and the resulting mutant has been killed.
- Method access has been changed and it need not mean that the resulting mutant has been successfully killed.
- Access modifier change mutation operator has been applied and the resulting mutant has been successfully killed.
Answer :-
5. Is method overloading different from method overriding and if yes, what is the main difference?
- Method overloading and method overriding are the same.
- Method overloading is different from method overriding. In the former case, the two methods are in the same class and in the latter case, the method is present in a class and one of its descendants.
- Method overloading is different from method overriding. In the former case, the method is present in a class and one of its descendants, and in the latter case, the two methods are in the same class.
- Method overloading and method overriding are nearly the same where two different pieces of code are given to the same method.
Answer :-
6. When a particular variable belonging to a class is such that there is only one copy of the variable for the entire class, what is the associated declaration of the variable called?
- Static.
- Private.
- Instance.
- Protected.
Answer :- For Answers Click Here
7. How we say that mutation testing subsumes node and edge graph coverage criteria despite the fact that these are two different testing techniques?
- Mutation testing does not subsume node and edge coverage criteria.
- Mutation testing is a weaker testing technique than node and edge coverage criteria.
- We consider weak mutation and specific mutation operators for the given subsumption.
- We consider strong mutation and specific mutation operators for the given subsumption.
Answer :-
8. What is the use of the this keyword above?
- It refers to the current object in the constructor.
- It invokes the current class method.
- It is used to pass an argument whose value is not clear.
- It is a method parameter
Answer :-
9. What will the output of the above code snippet be if the this keyword is omitted?
- Output will be unknown.
- Output will be 0.
- Output will be 5.
- There will be no output.
Answer :-
10. Will the mutant that is created by a mutation that deletes the this keyword be killed by any test case? State yes or no.
- Yes.
- No.
Answer :- For Answers Click Here