lundi 13 mai 2019

Trying to run JUNIT tests on different JVM using Maven Surefire

I am trying to run each of my tests on different JVMs. To achieve that I am using the following Surefire Configuration:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M3</version>
        <configuration>
            <forkMode>pertest</forkMode>
            <forkCount>1</forkCount>
            <reuseForks>false</reuseForks>
        </configuration>
    </plugin>

This configuration seems to be running each of the TestClasses on a different machine, but I need to get each test method running on a different JVM.

When I set the attached Configurations under Intellij I am getting each test running on a different JVM.

enter image description here

Isn't it equivalent to what I have defined under my Surefire plugin?

Aucun commentaire:

Enregistrer un commentaire