Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1078

Failure running forked mode with TestNG test suites defined via XML files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.17
    • None
    • TestNG support
    • None
    • Windows/Macintosh

    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

      Attachments

        1. maven-surefire-diffs.txt
          3 kB
          Scott Babcock

        Issue Links

          Activity

            People

              agudian Andreas Gudian
              sbabcoc Scott Babcock
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: