title: Set the delay time for each <test> in TestNG
body: <p><strong>First as info</strong>: I put each <code>@Test</code> in a different class (so of course each class only has 1 <code>@Test</code> annotation).</p>
  <p>Actually my goal is to want to rerun the same class with different parameter, but I want to run another class first beforehand.</p>
  <p>I've tried to find many references that <strong>TestNG</strong> doesn't allow repeat of a class or a <code>@Test</code> method annotation in one <code>&lt;test&gt;</code>. The repeat provided is an <code>invocationCount</code> function, I see about <code>invocationCount</code>, but I can't achieve my goal with <code>invocationCount</code> because this function repeats a <code>@Test</code> at the same time and then I can run another <code>@Test</code>.</p>
  <pre><code>public class SimpleTest1 {
      @Test
      @Parameters({&quot;acc&quot;})
      public void historyTransfer(String acc) {
          System.out.println(new SimpleDateFormat(&quot;dd-MM-yyyy HH:mm:ss&quot;).format(Calendar.getInstance().getTime()));
      }
  }
  </code></pre>
  <pre><code>public class SimpleTest2 {
      @Test
      @Parameters({&quot;senderAcc&quot;, &quot;beneficiaryAcc&quot;, &quot;amount&quot;})
      public void tranfer(String senderAcc, String beneficiaryAcc, String amount) {
          System.out.println(new SimpleDateFormat(&quot;dd-MM-yyyy HH:mm:ss&quot;).format(Calendar.getInstance().getTime()));
      }
  }
  </code></pre>
  <p>I imagine to run like bellow configuration:</p>
  <pre><code>&lt;suite name=&quot;Suite&quot;&gt;
      &lt;test name=&quot;My Test&quot; &gt;
          &lt;classes&gt;
              &lt;class name=&quot;com.SimpleTest1&quot;&gt;
                  &lt;parameter name=&quot;acc&quot; value=&quot;11111&quot;&gt;&lt;/parameter&gt;
              &lt;/class&gt;
              &lt;class name=&quot;com.SimpleTest2&quot;&gt;
                  &lt;parameter name=&quot;senderAcc&quot; value=&quot;11111&quot;&gt;&lt;/parameter&gt;
                  &lt;parameter name=&quot;beneficiaryAcc&quot; value=&quot;22222&quot;&gt;&lt;/parameter&gt;
                  &lt;parameter name=&quot;amount&quot; value=&quot;100&quot;&gt;&lt;/parameter&gt;
              &lt;/class&gt;
              &lt;class name=&quot;com.SimpleTest1&quot;&gt;
                  &lt;parameter name=&quot;acc&quot; value=&quot;22222&quot;&gt;&lt;/parameter&gt;
              &lt;/class&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
  &lt;/suite&gt;
  </code></pre>
  <p>But the above configuration didn't go as planned because the second <code>SimpleTest1</code> was not executed.</p>
  <p>Then I tried running it in a separate <code>&lt;test&gt;</code> like bellow and success, but I'm facing new issue about delay time each <code>&lt;test&gt;</code>.</p>
  <p>Run multiple <code>&lt;test&gt;</code> serially (not parallel) as follows:</p>
  <pre><code>&lt;suite name=&quot;Suite&quot;&gt;
      &lt;test name=&quot;My Test1&quot; &gt;
          &lt;classes&gt;
              &lt;class name=&quot;com.SimpleTest1&quot;&gt;
                  &lt;parameter name=&quot;acc&quot; value=&quot;11111&quot;&gt;&lt;/parameter&gt;
              &lt;/class&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
      &lt;test name=&quot;My Test2&quot; &gt;
          &lt;classes&gt;
              &lt;class name=&quot;com.SimpleTest2&quot;&gt;
                  &lt;parameter name=&quot;senderAcc&quot; value=&quot;11111&quot;&gt;&lt;/parameter&gt;
                  &lt;parameter name=&quot;beneficiaryAcc&quot; value=&quot;22222&quot;&gt;&lt;/parameter&gt;
                  &lt;parameter name=&quot;amount&quot; value=&quot;100&quot;&gt;&lt;/parameter&gt;
              &lt;/class&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
      &lt;test name=&quot;My Test3&quot; &gt;
          &lt;classes&gt;
              &lt;class name=&quot;com.SimpleTest1&quot;&gt;
                  &lt;parameter name=&quot;acc&quot; value=&quot;22222&quot;&gt;&lt;/parameter&gt;
              &lt;/class&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
  &lt;/suite&gt;
  </code></pre>
  <p>TestNG Maven dependency:</p>
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.testng&lt;/groupId&gt;
      &lt;artifactId&gt;testng&lt;/artifactId&gt;
      &lt;version&gt;7.0.0&lt;/version&gt;
      &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>Surefire:</p>
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.22.2&lt;/version&gt;
      &lt;configuration&gt;
          &lt;suiteXmlFiles&gt;
              &lt;suiteXmlFile&gt;testng.xml&lt;/suiteXmlFile&gt;
          &lt;/suiteXmlFiles&gt;
        &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  <p><strong>IDE :</strong> Eclipse (Version: 2018-09 (4.9.0))</p>
  <p><strong>OS :</strong> macOS Mojave (Version 10.14.6)</p>
  <p><strong>Output</strong>:</p>
  <pre><code>[RemoteTestNG] detected TestNG version 7.0.0
  22-12-2020 21:59:32
  22-12-2020 21:59:47
  22-12-2020 21:59:57
  
  ===============================================
  Suite
  Total tests run: 3, Passes: 3, Failures: 0, Skips: 0
  ===============================================
  </code></pre>
  <p>But after the first <code>&lt;test&gt;</code> is finished, there is a delay of about 10 seconds before the next <code>&lt;test&gt;</code> runs, as well as the next test.</p>
  <p><strong>Note</strong>: I thought this was a problem with the IDE (I use Eclipse), but it wasn't. I've tried running it in 2 ways, via the IDE and the command line, and give me same result about this delay issue.</p>
  <p>Via command line using this command :</p>
  <pre><code>mvn clean test -Dsurefire.suiteXmlFiles=testng.xml
  </code></pre>
  <p>Is there any configuration to reduce the delay time above?</p>