在我的最新提交中,似乎我已经以某种方式破坏了运行Cucumber测试的能力。我试图回退无济于事。谁能看到明显的东西?这是一个具有2个模块和一个父pom的项目。生成运行正常,没有错误,但运行了0个测试。我很茫然。
我附上了IntelliJ的屏幕截图(原谅原始的绘画工作来隐藏“秘密”):
我正在使用以下目标:
mvn verify -Dcucumber.options="src/test/resources/features/myCool.feature"
.. so我可以生成黄瓜报告。我的父pom包含以下构建阶段:
<build>
<plugins>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<includes>**/RunTest.java</includes>
<testFailureIgnore>true</testFailureIgnore>
<properties>
<property>
<name>suitepoolthreadsize</name>
<value>10</value>
</property>
<property>
<name>parallel</name>
<value>methods</value>
</property>
<property>
<name>threadCount</name>
<value>10</value>
</property>
<property>
<name>dataproviderthreadcount</name>
<value>30</value>
</property>
</properties>
</configuration>
</plugin>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>3.9.0</version>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectName>cucumber-jvm-example</projectName>
<outputDirectory>${project.build.directory}/site/cucumber-reports</outputDirectory>
<cucumberOutput>${project.build.directory}/cucumber.json</cucumberOutput>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
编辑:我注意到一个警告:
[WARNING] C:\company-automation\blah-supplier-tests\target\cucumber.json does not exist.
答案 0 :(得分:0)
功能文件的名称错误-doh!