I know you can define in your xml which groups that you want to run, but I want to know whether it is possible to say run these methods if they are both member of groups A & B.
Let's say I have the following test cases;
@Test(groups={"A","B"})
public testA() {}
@Test(groups={"B","C"})
public testB(){}
and following configuration;
<test name="Test A|B">
<groups>
<run>
<include name="B" />
</run>
</groups>
<classes>
<class name="com.test.Test" />
</classes>
</test>
This will run both testA and testB since they are both members of group B. I want to run the test only if it is member of both groups A & B.
Is it possible to do such thing with TestNG?
Thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…