Software Testing (IIITB) Week 9 Solutions

Is deleting a method call and replacing it with an appropriate constant as return value accepted as an integration mutation operator?

 Yes

 No

1 point

Which of the following is a list of mutation operations applied at the integration testing level for programs that are not written in an object-oriented language?

 Using bomb() statement, arithmetic operator replacement and relational operator replacement.

 Hiding variable deletion, polymorphic method overriding and integration variable replacement.

 Integration parameter exchange, integration parameter replacement and integration call deletion.

 Integration method exchange, integration parameter exchange and integration method moving.

1 point

Which of the following is a correct definition of a static class variable?

 They are local variables that are declared within a method.

 They are global variables whose copy is shared with all the instances of the class.

 They are local copies that are available for each instance of a class.

 They can be of all the three kinds above, as long as they are associated with a class.

1 point

Which of the following is correct regarding constructors in object oriented programming?

 It is a special type of procedure that creates and prepares an object for use by the code.

 It is a special method that is inherited from a parent class.

 Is is a method that has one or more polymorphic attributes.

 Constructors are methods that support type abstraction.

1 point

Which of the following options describes a typical use of the integration mutation operator that renames an overridden method?

 This mutation operator renames an overridden method so that dynamic binding is ensured.

 This mutation operator renames an overridden method in the child class to avoid confusing its name with an ancestor class.

 This mutation operator does renaming of an overridden method to ensure that the program is syntactically correct.

 This mutation operator gives a new name to the parent’s version of the methods that are overridden in a child class so that the overriding does not affect the original parent’s method.

1 point

What does the mutation operator that changes an overloading method do?

 This mutation operator changes the name of the overloading method.

 For each pair of overloading methods with the same name, this mutation operator interchanges their corresponding code.

 For each pair of overloading methods with the same name, this mutation operator interchanges their corresponding code.

 For each pair of overloading methods, this mutation operator ensures that they have the same name but different code.

1 point

When we apply mutation testing to grammars, what can be changed in the grammar?

 While mutating grammars, the production rules can be changed to create both valid and invalid strings.

 While mutating grammars, only the set of non-terminals can be changed.

 While mutating grammars, only the set of terminals can be changed.

 Mutation testing cannot be applied to grammars.

1 point

State true or false: The mutants obtained while mutating inputs to programs can be killed by writing test cases.

 True

 False

1 point

State true or false: Mutation operators for different kinds of mutation like mutation of programs, mutation of inputs etc., all depend on an underlying grammar of the respective artifact.

 True

 False

1 point

What does the mutation operator that modifies the access levels of variables do?

 It modifies the access levels of each variable and method to other access levels.

 It ensures that enough modifications are done to the access levels so that all possible mistakes can be identified.

 It changes access levels of public to private so that the programmer can check if there are any issues related to public variables.

 It changes the access levels of the variables in polymorphic methods that are owned by descendent classes. 

Post a Comment (0)
Previous Question Next Question

You might like