Skip to content

Plugin is not compatible with junit5 junit.jupiter.execution.parallel.enabled true #73

@tyge68

Description

@tyge68

If your project uses a junit-platform.properties which enable parallel execution, PIT will compute wrong coverage.

As a solution this plugin should disable parallel mode from junit via junit.jupiter.execution.parallel.enabled property.

I suppose in the JUnit5TestPluginFactory createTestFrameworkConfiguration could be a good place to set it (at least it worked for me)

    public Configuration createTestFrameworkConfiguration(TestGroupConfig config, 
        ClassByteArraySource source, 
        Collection<String> excludedRunners,
        Collection<String> includedTestMethods) {
        System.setProperty("junit.jupiter.execution.parallel.enabled", "false"); <--- enforce to disable parallel mode
        return new JUnit5Configuration(config, includedTestMethods);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions