title: How to run TestNG test nodes in sequence but all inside classes in parallel for different browser capabilities?
body: <p>I want to run my automation suite (implemented using Selenium Webdriver (Java) + TestNG + Maven) in parallel against multiple browser capabilities. I can run it in parallel for different capabilities using below sample testng.xml</p>
  
  <pre><code>&lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite thread-count="5" name="Functional Test Suite" parallel="tests"&gt;
      &lt;test name="Windows-FF-37.0" preserve-order="true" &gt;
          &lt;parameter name="browser" value="Firefox"/&gt;
          &lt;parameter name="version" value="37.0"/&gt;
          &lt;parameter name="os" value="Windows"/&gt;
          &lt;parameter name="os_version" value="8.1"/&gt;
          &lt;parameter name="device" value=""/&gt;
          &lt;classes&gt;
              &lt;class name="uat.mycompany.tests.FirstTest"/&gt;
              &lt;class name="uat.mycompany.tests.SecondTest"/&gt;
              &lt;class name="uat.mycompany.tests.ThirdTest"/&gt;
              &lt;class name="uat.mycompany.tests.FourthTest"/&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
      &lt;test name="MAC-Yosemite-Chrome-36.0" preserve-order="true"&gt;
          &lt;parameter name="browser" value="Chrome"/&gt;
          &lt;parameter name="version" value="36.0"/&gt;
          &lt;parameter name="os" value="OS X"/&gt;
          &lt;parameter name="os_version" value="Yosemite"/&gt;
          &lt;parameter name="device" value=""/&gt;
          &lt;classes&gt;
              &lt;class name="uat.mycompany.tests.FirstTest"/&gt;
              &lt;class name="uat.mycompany.tests.SecondTest"/&gt;
              &lt;class name="uat.mycompany.tests.ThirdTest"/&gt;
              &lt;class name="uat.mycompany.tests.FourthTest"/&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
  &lt;/suite&gt;
  </code></pre>
  
  <p>But when I run this testng.xml, it starts with 'FirstTest' on both VMs; one with Chrome+Mac &amp; another with Forefox+Windows configuration. I DO NOT want this, because the data modified by one script fails another script.</p>
  
  <p>My requirement is to run all classes from one  node in parallel and  nodes in sequence.
  As a work around, I can always put classes name in different order in different test nodes, but since I am having hundreds of test classes, it is not feasible solution.</p>
  
  <p>Also, eventually I want to set up these parameters through some properties file so that I can manage the run environments easily.</p>