Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 714
Олег Мошняга Avatar asked Nov 23 '25 07:11

Олег Мошняга


1 Answers

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.

like image 93
dan1st Avatar answered Nov 25 '25 21:11

dan1st