Issue Details (XML | Word | Printable)

Key: SUREFIRE-59
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Damian Golda
Votes: 26
Watchers: 22
Operations

If you were logged in you would be able to see more operations.
Maven Surefire

Not compatible with TestNG 5.2: java.lang.NoSuchMethodError: org.testng.xml.XmlSuite.setParallel(Z)V

Created: 14/Dec/06 10:21 AM   Updated: 20/Nov/07 07:38 PM
Component/s: TestNG support
Affects Version/s: None
Fix Version/s: 2.4

Time Tracking:
Not Specified

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


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Dunwoody added a comment - 11/Jan/07 11:42 AM
Reproduced here with TestNG 5.1+ and the 2.8-SNAPSHOT version of surefire.

David Dunwoody added a comment - 11/Jan/07 11:43 AM
^^ Apologies, that should read TestNG 5.2+

Cyrill Ruettimann added a comment - 20/Mar/07 05:47 AM
Also applies to TestNG 5.5

Jesse Kuhnert added a comment - 13/Apr/07 08:40 PM
I'd resolve this if I had the right perms but the new 2.4-SNAPSHOT version of surefire is compatible up to version 5.5 of TestNG.

Eric Berry added a comment - 25/May/07 10:08 AM
Someone please fix this issue and release the new version!!!!!

Larry Hamel added a comment - 27/Jul/07 01:50 PM
I tried 2.4-SNAPSHOT and got

[INFO] Surefire report directory: c:\cvs\ilink\faqtory\target\surefire-reports
java.lang.IllegalArgumentException: Unknown parameter type: java.util.Properties

at org.apache.maven.surefire.booter.SurefireBooter.constructParamObjects
(SurefireBooter.java:782)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:836)

Can someone please make using testng 5.5 possible for mere mortals?

thanks,

larry


hanasaki added a comment - 02/Aug/07 03:50 PM
Rolled back to testng 5.0 in netbeans 6.x nightly builds and this appears to be a workaround. Escalate resolution please?


Dan Fabulich added a comment - 20/Nov/07 07:38 PM
TestNG 5.2 works in the latest 2.4-SNAPSHOT in trunk, but you'll probably prefer to use TestNG 5.7 with the 2.4-SNAPSHOT in trunk anyway.