TESTNG Groups
TESTNG Groups
Here it will execute test which are part of groupname1 excluding the tests which
are also part of groupname2
<groups>
<run>
<include name="groupname1"/> <===to include test from this groupname1
<exclude name="groupname2"/> <===to exclude test from groupname2
</run>
</groups>
We can also define group of groups in xml inside <group> tag and use it in run
to run group of tests
<groups>
<define name="dailybuild"> <====Metagroup
<include name="smoke"/>
<include name="sanity"/>
</define>
<define name="weeklybuild">
<include name="smoke"/>
<include name="sanity"/>
<include name="functional"/>
<include name="regression"/>
</define>
<run>
<include name="dailybuild"/>
</run>
</groups>