[GRADLE-716] Groups with TestNG do not work Created: 23/Oct/09  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.7, 0.8
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Jason Porter Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 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.



 Comments   
Comment by Tom Eyckmans [ 25/Oct/09 ]

the elements of the include and exclude groups that are passes to the ant task needed to be separated with comma's (join(', ')) without brackets (default to string).

Generated at Wed Jun 30 11:37:01 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.