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

Surefire doesn't work if testng is in the classpath and a suitexml isn't being used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0 (2.2 plugin)
    • None
    • None
    • None

    Description

      Bascially, not tests will be run. I was able to fix this in the latest surefire code, by changing this code in TestNGDirectoryTestSuite.java:

      try

      { Class junitClass = Class.forName( "junit.framework.Test" ); xmlTest.setJUnit( testSet.getTestClass().isAssignableFrom( junitClass ) ); }

      catch ( ClassNotFoundException e )
      {
      }

      to this code:

      if ( !TestNGClassFinder.isTestNGClass( testSet.getTestClass(), annotationFinder ) )

      { xmlTest.setJUnit( true ); }

      Attachments

        1. patch.txt
          1 kB
          Jason Chaffee

        Issue Links

          Activity

            People

              brett Brett Porter
              jchaffee Jason Chaffee
              Votes:
              10 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: