gpt4 book ai didi

maven - 测试卡在 Configuring TestNG with : TestNG652Configurator

转载 作者:行者123 更新时间:2023-12-01 12:46:59 25 4
gpt4 key购买 nike

我的项目中有一些 TestNG 测试与 jUnit 测试一起运行。每个人都和平共处,一切都按预期运行,直到有一天,事情从一直工作改为有时工作。

当运行mvn clean install 测试时达到

Configuring TestNG with: TestNG652Configurator

然后卡住了。此后似乎什么也没有发生。

当运行 mvn -X clean install 时,测试到达完全相同的点而没有问题(顶部没有错误)并且拒绝进一步移动。

我正在使用

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

    </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
</dependency>

请问这里发生了什么?

最佳答案

我从未见过 Surefire(运行测试的插件)从 JUnit 和 TestNG 开箱即用地运行测试,尽管它应该这样做。

您可以通过强制提供程序来强制 surefire 运行 JUnit 和 TestNG,如说明 here .例如,以下将强制 TestNG 和 JUnit 4.7

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.13</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.13</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>2.13</version>
</dependency>
</dependencies>
</plugin>

另一件可能影响结果的事情是,如果你配置了 TestNG 来运行一些测试组.

关于maven - 测试卡在 Configuring TestNG with : TestNG652Configurator,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14984093/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com