<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<systemPropertyVariables>
<cucumber.options>${cucumber.options}</cucumber.options>
<phantomjs.binary.path>src/test/resources/drivers/%s/phantomjs/%s/phantomjs%s</phantomjs.binary.path>
</systemPropertyVariables>
<includes>
<include>**/*UT.java</include>
<include>**/CucumberRunner.java</include>
</includes>
<argLine>-Dfile.encoding=UTF-8 ${surefireArgLine}</argLine>
</configuration>
</plugin>
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.637 sec - in com.company.my.package.YourStepsUT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.373 sec - in com.company.my.package.MyStepsUT
Tests run: 1739, Failures: 60, Errors: 4, Skipped: 237, Time elapsed: 2,066.116 sec <<< FAILURE! - in CucumberRunner
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in com.company.utils.MyContextUT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in com.company.utils.MyMessagesUT
Tests run: 1744, Failures: 60, Errors: 4, Skipped: 227
[ERROR] There are test failures.
每个计数器都是好的,但不是摘要
中所有计数器的总和我的问题是错误的测试次数
所以运行:5 + 8 + 1739 + 1 + 1 = 1754!= 1744
So Skipped:0 + 0 + 237 + 0 + 0 = 237!= 227
我有: 测试运行: 1744 ,失败:60,错误:4,跳过: 227
答案 0 :(得分:0)
问题出在cucumber-jvm中。已在2.x.x版本中修复