我如何 运行 我的 cucumber-jvm 功能并行? (maven 使用 cucumber-jvm-parallel-plugin)
How do I run my cucumber-jvm features in parallel? (with maven using cucumber-jvm-parallel-plugin)
我正在尝试将 Maven 插件 cucumber-jvm-parallel-plugin 合并到我的 Cucumber-JVM 代码中,并且 运行 遇到了一些问题...我认为我已经正确配置了我的 pom.xml
,但是我的黄瓜 功能仍然一个接一个地 运行 而不是并行 。
如何配置我的 pom.xml 使我的黄瓜功能 运行 并行? 我有一些阻止执行的功能文件,但我没有不想等他们完成才能开始测试其他功能。
我遵循了两个教程,但找不到哪里出错了,或者如果这是预期的:
- https://opencredo.com/test-automation-concepts-parallel-test-execution/
- http://automationrhapsody.com/running-cucumber-tests-in-parallel/
结构
这是我的程序结构:
├── features/
│ └── api/
│ ├── 006-Email.feature
│ └── 999-Login.feature
├── results/
│ └── api-json.json
└── src/
└── java/
├── pom.xml
├── src/
│ └── test/
│ └── java/
│ └── com/
│ └── mycompany/
│ └── commonapps/
│ └── queuemanager/
│ ├── Globals.java
│ ├── GmailHelper.java
│ ├── HttpDeleteWithBody.java
│ ├── JsonHelper.java
│ ├── RequestHelper.java
│ ├── RunApiTest.java
│ ├── ThreadedSteps.java
│ └── UserHelper.java
└── steps/
└── com/
└── mycompany/
└── commonapps/
└── queuemanager/
├── GivenSteps.java
├── Setup.java
├── ThenSteps.java
└── WhenSteps.java
Maven Pom 逻辑
我的pom配置方式如下:
- 将
../../features/api/
复制到我的构建路径
<build>
<resources>
<resource>
<directory>../../features/api/</directory>
</resource>
</resources>
</build>
我告诉cucumber-jvm-parallel-plugin我的features
现在位于target/classes/active/
,因为我认为../../features/api/
被复制到target/
, 所以 target/active/
应该包含我的 .feature
文件..我想.
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
...
<configuration>
...
<featuresDirectory>${project.build.directory}/classes/active/</featuresDirectory>
...
</configuration>
</plugin>
然后,我运行maven test
之后,所有.feature
个文件都编译成target/test-classes/Parallel**IT.class
。每个功能文件一个。
所以我告诉maven-surefire-plugin并行地运行所有<include>**/Parallel*IT.class</include>
文件,这些文件是由cucumber-jvm-parallel-plugin创建的特征文件。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>acceptance-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/Parallel*IT.class</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
完整 pom.xml
而我的 pom.xml 是:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.commonapps</groupId>
<artifactId>e2e-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
...
</dependencies>
<build>
<!-- COPY RESOURCES TO TARGET/ -->
<resources>
<!-- copies features to target: "${project.build.directory}/classes/active/" -->
<resource>
<directory>../../features/api/</directory>
</resource>
</resources>
<!-- RUN EACH CUCUMBER FEATURE FILE AS A FORK -->
<plugins>
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<glue>com.mycompany.commonapps.queuemanager</glue>
<outputDirectory>${project.build.directory}/generated-test-sources</outputDirectory>
<featuresDirectory>${project.build.directory}/classes/active/</featuresDirectory>
<cucumberOutputDir>${project.build.directory}</cucumberOutputDir>
<format>json</format>
<!--<strict>true</strict>
<monochrome>true</monochrome>
<useTestNG>false</useTestNG>
<namingScheme>simple</namingScheme>-->
<parallelScheme>FEATURE</parallelScheme>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- RUN ALL CLASSES CREATED BY cucumber-jvm-parallel-plugin IN PARALLEL -->
<executions>
<execution>
<id>acceptance-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/Parallel*IT.class</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<!-- ADD ../../STEPS/ TO THE SOURCE -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>steps/</source>
<source>src/test/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
黄瓜赛跑者
我的黄瓜 运行ning class 看起来像这样:
@RunWith(Cucumber.class)
@CucumberOptions(plugin={"pretty","json:../../results/api-json.json"}, glue={"com.mycompany.commonapps.queuemanager"}, features={"../../features/api/active"})
public class RunApiTest {
}
输出
当我 运行 mvn test
时,我得到以下信息:
...
[INFO] ------------------------------------------------------------------------
[INFO] Building e2e Server Tests 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-source (add-source) @ e2e--server ---
[INFO] Source directory: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/steps added.
[INFO] Source directory: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java added.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ e2e--server ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO] Copying 2 resources
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ e2e--server ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 12 source files to /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/classes
[INFO] /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java uses unchecked or unsafe operations.
[INFO] /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- cucumber-jvm-parallel-plugin:1.2.1:generateRunners (generateRunners) @ e2e--server ---
[INFO] Adding /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/generated-test-sources to test-compile source root
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ e2e--server ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ e2e--server ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 10 source files to /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/test-classes
[INFO] /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java uses unchecked or unsafe operations.
[INFO] /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ e2e--server ---
[INFO] Surefire report directory: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.mycompany.commonapps.queuemanager.RunApiTest
....
*Tests run one by one properly*
...
Tests run: 31, Failures: 2, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:40 min
[INFO] Finished at: 2016-11-10T15:49:11-08:00
[INFO] Final Memory: 20M/261M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project e2e--server: There are test failures.
[ERROR]
[ERROR] Please refer to /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
有人看到我做错了什么吗?
更多调试信息
- cucumber-jvm-parallel-plugin 的
outputDirectory
是 被创建 正确 并且包含一堆并行**IT.class 个文件
- cucumber-jvm-parallel-plugin 的
featuresDirectory
是正确。
- cucumber-jvm-parallel-plugin 的
cucumberOutputDir
根本没有 创建 构建后。
我终于让它工作了!这是我并行进行测试 运行 必须做的事情:
我将 maven-surefire-plugin
execution
标签中的一些字段移动到 configuration
标签中。我移动了这一段:
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/*IT.class</include>
</includes>
- 所以我的
maven-surefire-plugin
现在看起来像这样:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/*IT.class</include>
</includes>
</configuration>
</plugin>
由于 cucumber-jvm-parallel-plugin
现在 运行 演出,我不得不 删除我的黄瓜 运行ner class。我是这样评论的:
/*
@RunWith(Cucumber.class)
@CucumberOptions(plugin={"pretty","json:../../results/api-json.json"}, glue={"com.mycompany.commonapps.queuemanager"}, features={"../../features/api/active"})
*/
public class RunApiTest {
}
就是这样。由于 Parallel**IT.class
在何处创建,因此 maven-surefire-plugin
无法正常工作。
我正在尝试将 Maven 插件 cucumber-jvm-parallel-plugin 合并到我的 Cucumber-JVM 代码中,并且 运行 遇到了一些问题...我认为我已经正确配置了我的 pom.xml
,但是我的黄瓜 功能仍然一个接一个地 运行 而不是并行 。
如何配置我的 pom.xml 使我的黄瓜功能 运行 并行? 我有一些阻止执行的功能文件,但我没有不想等他们完成才能开始测试其他功能。
我遵循了两个教程,但找不到哪里出错了,或者如果这是预期的:
- https://opencredo.com/test-automation-concepts-parallel-test-execution/
- http://automationrhapsody.com/running-cucumber-tests-in-parallel/
结构
这是我的程序结构:
├── features/
│ └── api/
│ ├── 006-Email.feature
│ └── 999-Login.feature
├── results/
│ └── api-json.json
└── src/
└── java/
├── pom.xml
├── src/
│ └── test/
│ └── java/
│ └── com/
│ └── mycompany/
│ └── commonapps/
│ └── queuemanager/
│ ├── Globals.java
│ ├── GmailHelper.java
│ ├── HttpDeleteWithBody.java
│ ├── JsonHelper.java
│ ├── RequestHelper.java
│ ├── RunApiTest.java
│ ├── ThreadedSteps.java
│ └── UserHelper.java
└── steps/
└── com/
└── mycompany/
└── commonapps/
└── queuemanager/
├── GivenSteps.java
├── Setup.java
├── ThenSteps.java
└── WhenSteps.java
Maven Pom 逻辑
我的pom配置方式如下:
- 将
../../features/api/
复制到我的构建路径<build> <resources> <resource> <directory>../../features/api/</directory> </resource> </resources> </build>
我告诉cucumber-jvm-parallel-plugin我的
features
现在位于target/classes/active/
,因为我认为../../features/api/
被复制到target/
, 所以target/active/
应该包含我的.feature
文件..我想.<plugin> <groupId>com.github.temyers</groupId> <artifactId>cucumber-jvm-parallel-plugin</artifactId> ... <configuration> ... <featuresDirectory>${project.build.directory}/classes/active/</featuresDirectory> ... </configuration> </plugin>
然后,我运行
maven test
之后,所有.feature
个文件都编译成target/test-classes/Parallel**IT.class
。每个功能文件一个。所以我告诉maven-surefire-plugin并行地运行所有
<include>**/Parallel*IT.class</include>
文件,这些文件是由cucumber-jvm-parallel-plugin创建的特征文件。<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <executions> <execution> <id>acceptance-test</id> <phase>integration-test</phase> <goals> <goal>test</goal> </goals> <configuration> <forkCount>5</forkCount> <reuseForks>true</reuseForks> <includes> <include>**/Parallel*IT.class</include> </includes> </configuration> </execution> </executions> </plugin>
完整 pom.xml
而我的 pom.xml 是:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.commonapps</groupId>
<artifactId>e2e-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
...
</dependencies>
<build>
<!-- COPY RESOURCES TO TARGET/ -->
<resources>
<!-- copies features to target: "${project.build.directory}/classes/active/" -->
<resource>
<directory>../../features/api/</directory>
</resource>
</resources>
<!-- RUN EACH CUCUMBER FEATURE FILE AS A FORK -->
<plugins>
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<glue>com.mycompany.commonapps.queuemanager</glue>
<outputDirectory>${project.build.directory}/generated-test-sources</outputDirectory>
<featuresDirectory>${project.build.directory}/classes/active/</featuresDirectory>
<cucumberOutputDir>${project.build.directory}</cucumberOutputDir>
<format>json</format>
<!--<strict>true</strict>
<monochrome>true</monochrome>
<useTestNG>false</useTestNG>
<namingScheme>simple</namingScheme>-->
<parallelScheme>FEATURE</parallelScheme>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- RUN ALL CLASSES CREATED BY cucumber-jvm-parallel-plugin IN PARALLEL -->
<executions>
<execution>
<id>acceptance-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/Parallel*IT.class</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<!-- ADD ../../STEPS/ TO THE SOURCE -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>steps/</source>
<source>src/test/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
黄瓜赛跑者
我的黄瓜 运行ning class 看起来像这样:
@RunWith(Cucumber.class)
@CucumberOptions(plugin={"pretty","json:../../results/api-json.json"}, glue={"com.mycompany.commonapps.queuemanager"}, features={"../../features/api/active"})
public class RunApiTest {
}
输出
当我 运行 mvn test
时,我得到以下信息:
...
[INFO] ------------------------------------------------------------------------
[INFO] Building e2e Server Tests 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-source (add-source) @ e2e--server ---
[INFO] Source directory: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/steps added.
[INFO] Source directory: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java added.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ e2e--server ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO] Copying 2 resources
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ e2e--server ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 12 source files to /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/classes
[INFO] /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java uses unchecked or unsafe operations.
[INFO] /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- cucumber-jvm-parallel-plugin:1.2.1:generateRunners (generateRunners) @ e2e--server ---
[INFO] Adding /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/generated-test-sources to test-compile source root
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ e2e--server ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ e2e--server ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 10 source files to /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/test-classes
[INFO] /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java uses unchecked or unsafe operations.
[INFO] /media/ifc-dev-1/ESD-ISO/e2e-/src/java/src/test/java/com/mycompany/commonapps/queuemanager/GmailHelper.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ e2e--server ---
[INFO] Surefire report directory: /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.mycompany.commonapps.queuemanager.RunApiTest
....
*Tests run one by one properly*
...
Tests run: 31, Failures: 2, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:40 min
[INFO] Finished at: 2016-11-10T15:49:11-08:00
[INFO] Final Memory: 20M/261M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project e2e--server: There are test failures.
[ERROR]
[ERROR] Please refer to /media/ifc-dev-1/ESD-ISO/e2e-/src/java/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
有人看到我做错了什么吗?
更多调试信息
- cucumber-jvm-parallel-plugin 的
outputDirectory
是 被创建 正确 并且包含一堆并行**IT.class 个文件 - cucumber-jvm-parallel-plugin 的
featuresDirectory
是正确。 - cucumber-jvm-parallel-plugin 的
cucumberOutputDir
根本没有 创建 构建后。
我终于让它工作了!这是我并行进行测试 运行 必须做的事情:
我将
maven-surefire-plugin
execution
标签中的一些字段移动到configuration
标签中。我移动了这一段:<forkCount>5</forkCount> <reuseForks>true</reuseForks> <includes> <include>**/*IT.class</include> </includes>
- 所以我的
maven-surefire-plugin
现在看起来像这样:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19.1</version> <configuration> <forkCount>5</forkCount> <reuseForks>true</reuseForks> <includes> <include>**/*IT.class</include> </includes> </configuration> </plugin>
- 所以我的
由于
cucumber-jvm-parallel-plugin
现在 运行 演出,我不得不 删除我的黄瓜 运行ner class。我是这样评论的:
/*
@RunWith(Cucumber.class)
@CucumberOptions(plugin={"pretty","json:../../results/api-json.json"}, glue={"com.mycompany.commonapps.queuemanager"}, features={"../../features/api/active"})
*/
public class RunApiTest {
}
就是这样。由于 Parallel**IT.class
在何处创建,因此 maven-surefire-plugin
无法正常工作。