Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem understanding a lowered mutation score #91

Closed
vmassol opened this issue Nov 27, 2018 · 1 comment
Closed

Problem understanding a lowered mutation score #91

vmassol opened this issue Nov 27, 2018 · 1 comment
Labels

Comments

@vmassol
Copy link
Contributor

vmassol commented Nov 27, 2018

Hi, on XWiki our build just failed because of a lowered mutation score.

Indeed we added a new default method to an interface (without adding any test):

    default List<String> getGroup()
    {
        return Collections.emptyList();
    }

When executing descartes we see:

yjgzegeghkyjkkddkbfsxabc

And in issues.html we don't see it:

ioqgnanrvwggxubffadzunyv

Any idea why this is not visible in the pseudo tested/partially tested list? This seems like a pseudo tested one (ie. whatever the return value the tests don't catch it), no?

Thanks

@oscarlvp
Copy link
Member

oscarlvp commented Nov 27, 2018

The default method is not covered and therefore not partially-tested or pseudo-tested.
By definition, a method is classified as pseudo-tested or partially-tested if it is covered by at least one test case and no transformation was detected (pseudo) or some transformations were detected (partially).
When a new method is included, then, new mutants are created. If the new method is not covered, then the new mutants are also not covered and they count as not detected in the PIT score, thus the score lowers.
A better score should not count uncovered mutants. See STAMP-project/pitmp-maven-plugin#42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants