Cucumber:使用 Maven 插件执行 Cucumber 测试时不显示结果统计信息

问题描述

我正在使用 testNG 软断言类在黄瓜中进行断言。 我使用了以下 testNG 依赖项。

<dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.0.0</version>
        </dependency> 

但是当我使用 maven 运行时,它显示我运行了 0 个测试,通过了,失败了。 但我的黄瓜报告显示正常。

Tests run: 0,Failures: 0,Errors: 0,Skipped: 0,Time elapsed: 82.084 s - in Contentmanagementsystem01IT
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0,Skipped: 0

我正在使用以下 maven-surefire 插件

<plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0-M5</version>
                        
                        <!-- <version>2.19</version> -->
                        <configuration>
                            <additionalClasspathelements>
                                <additionalClasspathelement>resources</additionalClasspathelement>
                            </additionalClasspathelements>
                            <forkCount>${surefire.fork.count}</forkCount>
                            <reuseForks>false</reuseForks>
                            <includes>
                                <include>**/*IT.class</include>
                            </includes>
                            <testFailureIgnore>false</testFailureIgnore>
                            
                        </configuration>
                    </plugin>

谁能帮我解决这个问题。谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)