Reputation: 113
I've found out Junit5 supports parallelism since version 5.3, but i din't find any reference to how run parallel tests using a csv source. Do you have any suggestion?
Upvotes: 3
Views: 1182
Reputation: 8056
Alternatively you can create src/test/resources/junit-platform.properties
with the same content:
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = concurrent
junit.jupiter.execution.parallel.mode.classes.default = concurrent
Upvotes: 1
Reputation: 113
configuring failsafe plugin as follow does that
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<!--override configuration from parent pom-->
<configuration combine.self="override">
<properties>
<configurationParameters>
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = concurrent
junit.jupiter.execution.parallel.mode.classes.default =concurrent
</configurationParameters>
</properties>
</configuration>
</plugin>
As explained here https://junit.org/junit5/docs/snapshot/user-guide/#writing-tests-parallel-execution .This works also for parameterized tests
Upvotes: 0