我正在尝试在黄瓜中运行并行测试用例。可以与默认插件(如junit,json的生成运行器)配合使用。
但是当我使用自定义插件并在pom中提供plugins中的值选项时,执行以下操作会失败。
Running xxxxxxxxx40_01runner
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.032 sec <<< FAILURE! - in xxxxxxxxV40_01runner
initializationError(xxxxxxxxxxx40_01runner) Time elapsed: 0.032 sec <<< ERROR!
cucumber.runtime.CucumberException: Unrecognized plugin: customFormatter.
POM.xML-
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>${cucumber.jvm.parallel.version}</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-resources</phase>
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<glue>
<package>com.qe.tests</package>
<package>com.qe.utils</package>
</glue>
<outputDirectory>${project.build.directory}/generated-test-sources/features</outputDirectory>
<featuresDirectory>src/test/resources/features</featuresDirectory>
<cucumberOutputDir>${project.build.directory}/cucumber_reports/test_results</cucumberOutputDir>
<format>junit</format>
<strict>true</strict>
<monochrome>true</monochrome>
<tags>
<tag>${currentExecutingTag}</tag>
</tags>
<plugins>
<plugin>
<name>com.qe.utils.CustomFormatter</name>
<noOutput>true</noOutput>
</plugin>
</plugins>
<packageName>com.qe.Runner</packageName>
<useTestNG>true</useTestNG>
<namingScheme>pattern</namingScheme>
<namingPattern>{f}_{c}runner</namingPattern>
<parallelScheme>SCENARIO</parallelScheme>
<filterFeaturesByTags>true</filterFeaturesByTags>
</configuration>
</execution>
</executions>
</plugin>