Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.4
-
Component/s: TestNG support
-
Labels:None
-
Environment:Hide<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.2</version>
</plugin>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.2</version>
<classifier>jdk15</classifier>
<scope>test</scope>
</dependency>
Show<plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.2</version> </plugin> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.2</version> <classifier>jdk15</classifier> <scope>test</scope> </dependency>
-
Complexity:Intermediate
-
Number of attachments :
Description
I have project with dependency to testng and surefire plugin as in Environment.
I run tests and get exception:
org.apache.maven.surefire.booter.SurefireExecutionException: org.testng.xml.XmlSuite.setParallel(Z)V; nested exception i
s java.lang.NoSuchMethodError: org.testng.xml.XmlSuite.setParallel(Z)V
java.lang.NoSuchMethodError: org.testng.xml.XmlSuite.setParallel(Z)V
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:135)
at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747)
Please, correct surefire to be compatible with new testng.
Reproduced here with TestNG 5.1+ and the 2.8-SNAPSHOT version of surefire.