Concurrency Lecture 5 Flashcards
Mutation Operators
What is a mutation operator?
A bug that we inject into our concurrency code to find help find faults in our code.
Name the steps in the Quality Assurance Process.
- Get system source code that is to be tested.
- Do a static analysis of the code.
- Create a set of test targets.
- Write the tests according to the targets.
- Execute the test.sets.
- Perform a test set evaluation of the results.
What are the advantages of using mutation operators?
- They give us better insight into the code we are testing
- Help decide whether or not the coverage metric we are using is suitable
Why can only writing tests for our code not be as good as also using mutation operators?
- Sometimes tests cannot reveal all concurrency faults and bugs.
- It can be hard to write tests for every single test target we found
What do we do once we have added mutation operators to our code?
We run the mutated code with the tests that we wrote. Then we observe what new bugs have been revealed by our mutations. We then calculate the mutation score.
How do we calculate mutation score?
(Number of bugs revealed)
_______________________________ x 100
(Total number of bugs)
What are bug patterns?
Bugs that arise in faulty code. They are common mistakes that a programmer makes.
What does the mutation operator: Modify Method Timeout do?
…
What does the mutation operator: Modify Synchronized Block Parameter do?
…
What does the mutation operator: Exchange Synchronized Block Parameters do?
…
What does the mutation operator: Remove Thread Method Call do?
…
What does the mutation operator: Remove Concurrency Mechanism Method Call do?
…
What does the mutation operator: Replace notifyAll() With notify() do?
…
What does the mutation operator: Replace join() With sleep() do?
…
What does the mutation operator: Remove Synchronized Keyword From Method do?
…