我的黄瓜自动化框架使用 junit 而不是线程安全的,并且在使用 maven surefire 插件并行执行期间,我面临大量数据读写问题和 webdriver 问题。有没有办法可以在不同的实例上运行我的自动化框架,以便每个并行执行功能文件在不同的实例上运行。POM maven surefire 插件配置:-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<forkCount>10</forkCount>
<reuseForks>false</reuseForks>
</configuration>
<executions>
<execution>
<id>execute</id>
<phase>test</phase>
<configuration>
<parallel>methods</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
<perCoreThreadCount>true</perCoreThreadCount>
<skip>false</skip>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>