Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-716

Groups with TestNG do not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.7, 0.8
    • Fix Version/s: 0.9-rc-1

      Description

      Here's the build.gradle snippet

      test {
       useTestNG()
       options {
         includeGroups 'unit'
         jvmArgs << "-Dnet.sourceforge.cobertura.datafile=${cobSerFile}"
       }
      }
      

      Here's the resulting TestNG XML file:

      <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
      <suite thread-count="5" skipfailedinvocationCounts="false" verbose="1"
      name="Ant suite" junit="false" annotations="JDK"
      data-provider-thread-count="10">
       <test name="Ant test" junit="false">
         <groups>
           <run>
             <include name="[unit]"/>
           </run>
         </groups>
         <classes>
           <class name="com.wjbradley.common.BusinessDateTimeTest"/>
         </classes>
       </test>
      </suite>
      

      None of my tests are being run because I have no "[unit]" group, but I
      do have a "unit" group. When the testng.xml is build each entry in
      the list needs to be in it's own include (without the brackets). It
      looks like it may be doing this, but I'm not sure where the brackets
      are coming from.

        Attachments

          Activity

            People

            Assignee:
            hans_d Hans Dockter
            Reporter:
            lightguard Jason Porter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: