Scott Babcock created SUREFIRE-1078:
---------------------------------------
Summary: 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 message was sent by Atlassian JIRA
(v6.1.6#6162)