My E2E tests are running pretty slowly (25 minutes) as they call a bunch of services and wait for some data to be populated in the database. I want to run it concurrently. I'm using the following maven-failsafe-plugin
setup:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${plugin.failsave.version}</version>
<executions>
<execution>
<id>run-integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
And my test looks something like this (more information can be provided if it is needed):
@Stepwise
@DataJpaTest
@ContextConfiguration(classes = SomeControllerITConfig)
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
class SomeControllerIT extends Specification {
// some variables definition
def "test1":
// some test
def "test2":
// some test
// some more tests
}
I tried to use threadCount
property along with parallel
or forkCount
but nothing works for me. Also I tried to force the following dependency in the maven-failsafe-plugin
dependencies:
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.16</version>
</dependency>
Thanks in advance!