现象:在maven打包构建的时候出现这个,导致构建单元测试失败,但是只是跑个testng是可以的
getKeyAll(com.exec.NewTest):org.testng.ITestNGMethod.getConstructorOrMethod()Lorg/testng/internal/ConstructorOrMethod;
解决:
更换testng的版本:
<dependency>
<groupId>testng</groupId>
<artifactId>testng</artifactId>
<version>5.12</version>
<scope>test</scope>
</dependency>
为
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
</dependency>
本文介绍了一个在使用Maven进行项目打包时遇到的TestNG错误,并提供了通过升级TestNG版本到6.8来解决该问题的具体步骤。
4517

被折叠的 条评论
为什么被折叠?



