title: Runing test classes one by one using testng for webdriver
body: <p>I have written several test classes to test a web application using testng. Each and every test classes are independent.(I use Java,maven and selenium webdriver) </p>
  
  <p>I have defined my test classes and test groups in the testng.xml as below.</p>
  
  <pre><code>&lt;test name="generalTest"&gt;
          &lt;groups&gt;
              &lt;run&gt;
                  &lt;include name="login"  /&gt;
                  &lt;include name="signUp"  /&gt;
                  &lt;include name="profileCreation"  /&gt;
  
              &lt;/run&gt;
          &lt;/groups&gt;
  
          &lt;classes&gt;
              &lt;class name="my.test.Test_1_LoginTestCases"/&gt;
              &lt;class name="my.test.Test_2_SignUpTestCases"/&gt;
              &lt;class name="my.test.Test_3_CreatePeopleProfileTestCases"/&gt;
  
          &lt;/classes&gt;
      &lt;/test&gt;
  </code></pre>
  
  <p>and I run this command in the command line to run test classes.</p>
  
  <pre><code>mvn test -DsuiteXmlFile=/src/testng.xml -Dgroups=login,signUp,profileCreation
  </code></pre>
  
  <p>And I have used testng "priority" tag to define the order to run test cases inside test classes.</p>
  
  <p>But the problem is when i run testng.xml using above command, it runs all test classes same time(parallely).If there are 10 test classes then it opens 10 web browser instances same time and try to run every test classes same time.</p>
  
  <p>What I need is to run first test class and when it is completed then start running the second test class using the above maven command.</p>
  
  <p>can any one help me to do this? I really appreciate the help.</p>