Sure, its similar to jarek's example but using threads
### Classes
@Test(groups={"zero"}, sequential=true)
public class ZeroTest{
@Test
public void zeroA(){
System.out.println("zeroA");
}
@Test
public void zeroB(){
System.out.println("zeroB");
}
}
@Test(groups={"first"}, dependsOnGroups={"zero"}, sequential=true)
public class FirstTest{
@Test
public void firstA(){
System.out.println("firstA");
}
@Test
public void firstB(){
System.out.println("firstB");
}
}
@Test(groups={"second"}, dependsOnGroups={"zero"}, sequential=true)
public class SecondTest{
@Test
public void secondA(){
System.out.println("secondA");
}
@Test
public void secondB(){
System.out.println("secondB");
}
}
### XML
<suite name="MySuite" verbose="0" parallel="methods" thread-count="3">
<test name="MyTest">
<packages>
<package name="jarek"></package>
</packages>
</test>
</suite>
### Output:
[Parser] Running:
Y:\example\testng-jarek.xml
zeroB
zeroA
### Observations:
In the HTML log the others methods appears as skipped
I'm using this approach because our suite is web oriented and is
divided in testClasses with several testMethods.
We prefer to restart some processes (e.g. the browser) per class
instead per method, in order to speed up the suite, that's why we use
the parallel=methods and sequential=true.
What happened to parallel=classes? was deprecated?
> ***Cédric
> *