I am experiencing the following problem. I have set up a grid with 2 nodes, in order to run tests in parallel.My suite.xml file has two groups, one for each node:
<suite name="testSuites"  configfailurepolicy="continue"   thread-count="2" parallel="tests">
 test name="testSuite1" preserve-order="true">
 <classes>
    <class name="testA1" />
    <class name="testB1" />
    <class name="testC1" /> 
</classes>
 </test>
 <test name="testSuite2" preserve-order="true">
 <classes>
    <class name="testA2" />
    <class name="testB2" />
    <class name="testC2" /> 
</classes>
 </test>
Each class, for example testA1 has the following testNG configuration:
 @BeforeClass(alwaysRun = true)
    public void createInitialData()  {  
}
    @Test(alwaysRun = true, description = "bla bla")
    public void testStep_1() throws Exception{
    }
    @Test(alwaysRun = true, description = "bla bla ", dependsOnMethods ="testStep_1" )
    public void testStep_2() {
    }
Upon running I noticed that during the execution, the tests are executing in test step wise order, meaning:
testA1-testStep_1, testB1-testStep_1, testC1-testStep_1, testA1-testStep_2, testB1-testStep_2, testC1-testStep_2
whereas it should have been:
testA1-testStep_1, testA1-testStep_2, and then testB1-testStep_1, testB1-testStep_2, testC1-testStep_1, testC1-testStep_2
Any suggestions?