[TestNG] [WARN] Ignoring duplicate listener : org.testng.IDEATestNGRemoteListenerEx

Posted kevinsteve

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[TestNG] [WARN] Ignoring duplicate listener : org.testng.IDEATestNGRemoteListenerEx相关的知识,希望对你有一定的参考价值。

1. 使用6.10,和6.14.3版本testng,出现多条warn信息

[TestNG] [WARN] Ignoring duplicate listener : org.testng.IDEATestNGRemoteListenerEx

[TestNG] [WARN] Ignoring duplicate listener : org.testng.IDEATestNGRemoteListenerEx

[TestNG] [WARN] Ignoring duplicate listener : org.testng.IDEATestNGRemoteListenerEx

.................

<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>

 

问题原因:未知。如有知道的,欢迎大家分享问题原因,解决疑惑。








以上是关于[TestNG] [WARN] Ignoring duplicate listener : org.testng.IDEATestNGRemoteListenerEx的主要内容,如果未能解决你的问题,请参考以下文章

Ignoring exception while trying to get leader nimbus info from rosense1. will retry with a different

mariadb报Ignoring query to other database解决方法

Spring webSecurity.ignoring() 不会忽略自定义过滤器

为啥尽管 web.ignoring().antMatchers() 仍然在此端点上调用我的过滤器? [复制]

C# Regex ignoring non-capturing group

python scrapy 报错 DEBUG: Ignoring response 403