Mutation Test Minion exited OK during testing

157 views
Skip to first unread message

Rebecca O'Donoghue

unread,
Jan 17, 2017, 9:40:41 PM1/17/17
to PIT Users
Hi, 

Sometimes when I run tests, the mutation test minion exits and restarts throughout the process. I understand this happens when a TIMEOUT occurs but it also happens quite a bit when there appears to be no problem to cause it. I get the log messages "Exit code was - OK" and "Minion exited ok" without an obvious pattern. I am modifying the Pitest source code for my thesis project so I was wondering if this was something I have caused or if it is part of the normal functionality of PIT. If this is normal, why does it occur?

Thank you,

Rebecca

henry

unread,
Jan 18, 2017, 4:34:07 AM1/18/17
to PIT Users
It is possible that a mutation might corrupt some state in the JVM (e.g set a static variable to an impossible value). This could result in incorrect results for other mutations (most likely making it appear that a mutation is killed that would otherwise survive).

The only way to 100% guarantee that this doesn't happen would be to launch a new JVM/minion for each mutant. This would make mutation testing unworkably slow so, as a compramise, PIT launches a new minion for each class analysed.

This means PIT can guarantee that mutations in different classes will not interfere with each other, but can't guarantee that mutations within the same class won't. It also means that you will see minions exiting without an error.

If you do need a 100% guarantee of no interference between mutants you can get it by setting mutationUnitSize to 1, but this will make things horrifically slow.

The isolation vs performance tradeoff is a really interesting area - Markus Schirp has a neat solution he uses in the Ruby tool Mutant that I hope to replicate in pitest if I ever get time. Unfortunately it requires a few architectural issues to be fixed first.

Henry

Rebecca O'Donoghue

unread,
Jan 18, 2017, 10:08:37 PM1/18/17
to PIT Users
Thanks for the reply! That makes sense, I just wanted to make sure I hadn't caused it through anything I had done. Thank you for the information, I may explore it further for my thesis.

Rebecca
Reply all
Reply to author
Forward
0 new messages