how to set up parallel testing in maven-surefire-plugin

all tests run instantly and load the computer

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>3.0.0-M3</version>
    <configuration>
        <includes>
            <include>**/*CucumberRegressionRunner.java</include>
        </includes>
        <parallel>all</parallel>
        <useSystemClassLoader>false</useSystemClassLoader>
        <perCoreThreadCount>false</perCoreThreadCount>
        <forkCount>2.5c</forkCount>
        <reuseForks>true</reuseForks>
        <threadCount>2</threadCount>
    </configuration>
</plugin>

i want to run not all package, i need to run only 2-5 tests in parallel

Upvotes: 3

Views: 1467

Answers (1)

dan1st
dan1st

Reputation: 16476

As the answer of this post describes, you can create an execution for the tests, that should run parallel and an execution for the tests, that should not run parallell.

Upvotes: 1

Related Questions