Software Testing | Week 8
Quiz
Link : Software Testing Week 8 (nptel.ac.in)
1. Consider the regular expression (a+b)⋅(a+b)∗ over the alphabet Σ={a,b}. Which of the following options represents a list of words generated by this regular expression?
d. All of the above
2. For the same regular expression (a+b)⋅(a+b)∗, which of the following options represents the language corresponding to the regular expression?
b. The language is the set of all words over a and b that have at least one a or at least one b in them
3 While parsing a program to extract syntactic information, which of the following defines how characters form tokens?
a. Regular expressions
4. Consider the context-free grammar given by G=(N,T,P,S) where N={S,X},T={a,b},P={S→aXb,X→ab}N={S,X},T={a,b},P={S→aXb,X→ab}. Which of the following is the language generated by this grammar?
a. The language generated by G is {w|w=aabb}
5. State yes or no: Is the ground string in mutation testing the same as the program under test?
a. Yes
6. Which of the following is a mutant that can be killed by any test case?
c. Trivial mutant
7. Suppose a decision statement like if (x < 0 && z == 5) is mutated to get if (x > 0 && z == 5) then it is an example of which kind of mutation operator?
b. Replacing a relational operator.
8. As per the lectures, replacing a particular assignment statement with a statement like failOnZero() is an example of a mutation operator applied at which of the levels in testing?
a. Program level
9. A programmer decides to save time and apply two or three mutation operators together to increase the chances of finding many errors together. Is this considered to be a useful strategy in mutation testing?
b. No, mutation operators work best when applied one at a time.
10. State true or false: Mutation testing can be used to show that a program behaves identically when a particular operation is replaced or removed.
a. True