I know that you can define in your xml which groups you want to run, but I want to know if these methods can be run if they are both members of groups A and B.
Let's say I have the following test cases:
@Test(groups={"A","B"})
public testA() {}
@Test(groups={"B","C"})
public testB(){}
and the following configuration;
<test name="Test A|B">
<groups>
<run>
<include name="B" />
</run>
</groups>
<classes>
<class name="com.test.Test" />
</classes>
</test>
This will work both testA and testB, since both of them are members of group B. I want to run the test only if it is a member of both groups A and B.
Can this be done with TestNG?
Thanks in advance
Jail source
share