Search code examples
javacode-coveragemutationmutation-testingpitest

What does removed call to "com.some.Filename::someMethodName" --> SURVIVED mean in pitest?


What does removed call to "com.some.Filename::someMethodName" --> SURVIVED mean in pitest. Does it mean that if that method call is removed, the code will still work properly?


Solution

  • When pitest says the mutantion has survived it means it changed the codebase, and not a single test detected the code has changed. So you are not being very demanding on your test suite.

    Ideally each mutation created should be killed by at least 1 unit test.

    some more information regarding mutation test that may help you: https://pedrorijo.com/blog/intro-mutation/. (disclaimer, I'm the tutorial author)