带有胶合参数的cumul-jvm-parallel-plugin错误

时间:2018-12-05 13:33:45

标签: maven cucumber cucumber-jvm

我正在尝试第一次使用Cucumber-parallel-plugin。 当我尝试运行generateRunners目标时,总是会得到一个错误,提示我的胶合参数丢失或有错误...

通过我尝试在Kotlin中使用此插件的方式。

以下是一些相关的pom片段:

<build>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>


<plugins>
  <plugin>
    <groupId>com.github.temyers</groupId>
    <artifactId>cucumber-jvm-parallel-plugin</artifactId>
    <version>5.0.0</version>
    <executions>
      <execution>
        <id>generateRunners</id>
        <phase>generate-test-sources</phase>
        <goals>
          <goal>generateRunners</goal>
        </goals>
        <configuration>
          <!-- Mandatory -->
          <!-- List of package names to scan for glue code. -->
          <glue>
            <package>cucumber.runtime.step_definitions</package>
          </glue>
          <outputDirectory>${project.build.directory}/generated-test-sources/cucumber</outputDirectory>
          <!-- The directory, which must be in the root of the runtime classpath, containing your feature files.  -->
          <featuresDirectory>src/test/resources/features</featuresDirectory>
          <!-- Directory where the cucumber report files shall be written  -->
          <cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>
          <plugins>
            <plugin>
              <name>json</name>
            </plugin>
            <plugin>
              <name>com.example.CustomHtmlFormatter</name>
              <extension>html</extension>
            </plugin>
          </plugins>
          <!-- CucumberOptions.strict property -->
          <strict>true</strict>
          <!-- CucumberOptions.monochrome property -->
          <monochrome>true</monochrome>
          <!-- The tags to run, maps to CucumberOptions.tags property. Default is no tags. -->
          <tags>
            <!--tag>~@ignore</tag -->
          </tags>
          <!-- The naming scheme to use for the generated test classes.  One of ['simple', 'feature-title', 'pattern'] -->
          <namingScheme>simple</namingScheme>
          <!-- The class naming pattern to use.  Only required/used if naming scheme is 'pattern'.-->
          <namingPattern>Parallel{c}IT</namingPattern>
          <!-- One of [SCENARIO, FEATURE]. SCENARIO generates one runner per scenario.  FEATURE generates a runner per feature. -->
          <parallelScheme>SCENARIO</parallelScheme>
        </configuration>
      </execution>
    </executions>
  </plugin>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.19</version>
    <configuration>
      <forkCount>10</forkCount>
      <reuseForks>true</reuseForks>
      <includes>
        <include>**/Parallel*IT.class</include>
      </includes>
    </configuration>
  </plugin>
</plugins>

我得到了这个控制台输出

 Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:5.0.0:generateRunners (default-cli) on project at.wrkwks.portal-template-webtests: Invalid parameter. Invalid parameter.
[ERROR] The parameters 'glue' are missing or invalid

1 个答案:

答案 0 :(得分:0)

解决方案是为此使用另一个依赖项:-)

<dependency>
      <groupId>com.trivago.rta</groupId>
      <artifactId>cucable-plugin</artifactId>
      <version>${cucable-plugin.version}</version>
    </dependency>