1. 使用6.10,和6.14.3版本testng,出现多条warn信息
.................
<dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.10</version> <scope>test</scope> </dependency>
2. 使用RELEASE版本testng(也就是最新版本7.0.0-beta1),出现报错
java.lang.NoSuchMethodError: org.testng.IDEARemoteTestNG.addListener(Lorg/testng/ISuiteListener;)V
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
<dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>RLEASE</version> <scope>test</scope> </dependency>
解决办法:
使用6.9.9版本testng,可以解决上述两个问题
<dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.9.9</version> <scope>test</scope> </dependency>
问题原因:未知。如有知道的,欢迎大家分享问题原因,解决疑惑。
原文地址:https://www.cnblogs.com/kevinsteve/p/10163227.html
时间: 2024-10-05 04:45:01