Skip to content

Getting the mutation bytes requires adding the SUT classes and dependencies to the PIT launch classpath #156

@Vampire

Description

@Vampire

I have a project where PIT is running just fine.

Now I added a second task that runs with the descartes engine and is otherwise set up identically to the original pitest task.
Same classpaths, same configuration, ...

Additionally, I have a custom MutationInterceptor in use, that ensures that duplicate mutations are filitered out.
This happens quite regularly in standard pitest where different mutators produce the exact same byte-code and to save the time to execute and kill those mutants multiple time, that duplicates filter is in place.

In its intercept method I do mutater.getMutation(mutationDetails.getId()).getBytes() and then ensure that mutants with identical byte-code are only hunted for once.

As this is a MutationInterceptor, the code runs in the pitest process using the pitest launch classpath, not the additional classpath where the SUT classes and dependencies are present for usage in the minion worker processes.

Now the problem is, with the standard GregorMutater this works perfectly fine.
But with the DescartesMutater, it requires the SUT classes and dependencies to be present on the pitest launch classpath.

The descartes mutater should also be able to produce the mutant bytecode without having the SUT classes and dependencies available, just like the Gregor murater.

As a work-around I can either add the SUT classes and dependencies to the PIT launch classpath which pollutes it unnecessarily of course, or disable my duplicates filter, as the descartes mutators should probably not produce the same mutants.

But nevertheless it would be nice if this worked just like for the built-in gregor mutater.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions