[ 
https://jira.codehaus.org/browse/SUREFIRE-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Babcock updated SUREFIRE-1078:
------------------------------------

    Description: 
Surefire fails with a ClassCastException when trying to run in forked mode with 
TestNG test suites defined via XML files. The issue occurs in ForkStarter when 
the code is processing the collection of tests returned by TestNGXmlTestSuite. 
The ForkStarter code assumes that the providers all return collections of 
Class<?> objects, but TestNGXmlTestSuite returns a collection of File objects.

The ForkStarter code attempts to transfer the collection of File objects from 
the TestNG XML provider to a collection of type List<Class<?>>, which is the 
cause of the ClassCastException.

I've attached a set of revisions that address this issue.

This appears to be a new incarnation of 
http://jira.codehaus.org/browse/SUREFIRE-463

  was:
Surefire fails with a ClassCastException when trying to run in forked mode with 
TestNG test suites defined via XML files. The issue occurs in ForkStarter when 
the code is processing the collection of tests returned by TestNGXmlTestSuite. 
The ForkStarter code assumes that the providers all return collections of 
Class<?> objects, but TestNGXmlTestSuite returns a collection of File objects.

The ForkStarter code attempts to transfer the collection of File objects from 
the TestNG XML provider to a collection of type List<Class<?>>, which is the 
cause of the ClassCastException.

I've attached a set of revisions that address this issue.


> Failure running forked mode with TestNG test suites defined via XML files
> -------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1078
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-1078
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: TestNG support
>    Affects Versions: 2.17
>         Environment: Windows/Macintosh
>            Reporter: Scott Babcock
>         Attachments: maven-surefire-diffs.txt
>
>
> Surefire fails with a ClassCastException when trying to run in forked mode 
> with TestNG test suites defined via XML files. The issue occurs in 
> ForkStarter when the code is processing the collection of tests returned by 
> TestNGXmlTestSuite. The ForkStarter code assumes that the providers all 
> return collections of Class<?> objects, but TestNGXmlTestSuite returns a 
> collection of File objects.
> The ForkStarter code attempts to transfer the collection of File objects from 
> the TestNG XML provider to a collection of type List<Class<?>>, which is the 
> cause of the ClassCastException.
> I've attached a set of revisions that address this issue.
> This appears to be a new incarnation of 
> http://jira.codehaus.org/browse/SUREFIRE-463



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to