[
https://issues.apache.org/jira/browse/SUREFIRE-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17064411#comment-17064411
]
Lutz Neugebauer edited comment on SUREFIRE-1762 at 3/22/20, 8:42 PM:
---------------------------------------------------------------------
Hello [~tibordigana],
please find a possible solution at
[https://github.com/apache/maven-surefire/pull/276] .
There are still addListener methods, but the one that takes a ITestListener has
been removed. The patch uses the same approach as addListener a few lines above
at [line
305|https://github.com/apache/maven-surefire/blob/8ae235f8f9099f6f07f7fc23d3c0e971448a7192/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java#L305].
Thank you
was (Author: lne3):
Hello [~tibordigana],
please find a possible solution at
[https://github.com/apache/maven-surefire/pull/276] .
There are still addListener methods, but the one that takes a ITestListener has
been removed. The patch uses the same approach a addListener a few lines above
at [line
305|https://github.com/apache/maven-surefire/blob/8ae235f8f9099f6f07f7fc23d3c0e971448a7192/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java#L305].
Thank you
> skipAfterFailureCount>0 with testng 7.1.0 resulting in
> java.lang.NoSuchMethodError:
> org.testng.TestNG.addListener(Lorg/testng/ITestListener;)V
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-1762
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1762
> Project: Maven Surefire
> Issue Type: Bug
> Components: TestNG support
> Affects Versions: 3.0.0-M4
> Reporter: Lutz Neugebauer
> Priority: Major
> Attachments: pom.xml, testng.xml
>
>
> When using maven-surefire-plugin with configuration
> {code:java}
> <configuration>
> <suiteXmlFiles>
> <suiteXmlFile>testng.xml</suiteXmlFile>
> </suiteXmlFiles>
> <skipAfterFailureCount>1</skipAfterFailureCount>
> </configuration>
> {code}
> this results in
> {code:java}
> java.lang.NoSuchMethodError:
> org.testng.TestNG.addListener(Lorg/testng/ITestListener;)V
> at
> org.apache.maven.surefire.testng.TestNGExecutor.postConfigure(TestNGExecutor.java:312)
> at
> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:280)
> at
> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
> at
> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
> at
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
> at
> org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
> at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)
> {code}
> For reproducing use the attached [^pom.xml] and [^testng.xml] and execute
> {code:java}
> mvn -B -e clean test
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)