title: gradle test task execution order of tests
body: <p>When I run my testng tests using command line and with tests defined in a testng.xml file, they run in the order they are specified in the testng.xml</p>
  
  <pre><code>&lt;suite name="WorkDepot Tests"&gt;
          &lt;test name="Submit work-result test"&gt;
            &lt;classes&gt;
                  &lt;class name="workdepot.test.SubmitWorkTest"/&gt;
                  &lt;class name="workdepot.test.WorkResultTest"/&gt;
                  &lt;class name="workdepot.test.SubmitWorkTest"/&gt;
                  &lt;class name="workdepot.test.WorkErrorTest"/&gt;
                  &lt;class name="workdepot.test.SubmitWorkTest"/&gt;
                  &lt;class name="workdepot.test.MultipleHasTest"/&gt;
                  &lt;class name="workdepot.test.WorkResultTest"/&gt;
                  &lt;class name="workdepot.test.CallbackTest"/&gt;
                  &lt;class name="workdepot.test.NegCallBackTest"/&gt;
                  &lt;class name="workdepot.test.NegSubmitWork"/&gt;
                  &lt;class name="workdepot.test.NegGetWork"/&gt;
                  &lt;class name="workdepot.test.NegHasWork"/&gt;
                  &lt;class name="workdepot.test.NegSubmitResult"/&gt;
                  &lt;class name="workdepot.test.NegSubmitError"/&gt;
                  &lt;class name="workdepot.test.NegReadResult"/&gt;
                  &lt;class name="workdepot.test.NegMultipleHas"/&gt;
            &lt;/classes&gt;
          &lt;/test&gt;
  &lt;/suite&gt;
  </code></pre>
  
  <p>Now I want to run those using the gradle <code>Test</code> task type and I use <code>include</code> pattern for the same. But the order of execution is now changed (arbitrary). </p>
  
  <pre><code>task integTest(type: Test){
      useTestNG()
      testClassDir = file("build/classes/integTest")
  
      include "workdepot/test/SubmitWorkTest*"
      include "workdepot/test/WorkResultTest*"
      include "workdepot/test/SubmitWorkTest*"
      include "workdepot/test/WorkErrorTest*"
      include "workdepot/test/SubmitWorkTest*"
      include "workdepot/test/MultipleHasTest*"
      include "workdepot/test/WorkResultTest*"
      include "workdepot/test/CallbackTest*"
      include "workdepot/test/NegCallBackTest*"
      include "workdepot/test/NegSubmitWork*"
      include "workdepot/test/NegGetWork*"
      include "workdepot/test/NegHasWork*"
      include "workdepot/test/NegSubmitResult*"
      include "workdepot/test/NegSubmitError*"
      include "workdepot/test/NegReadResult*"
      include "workdepot/test/NegMultipleHas*"
  
  }
  </code></pre>
  
  <p>How can I ensure the tests are run in the order as in the testng.xml without changing the test code (i.e., adding dependencies between tests)</p>