title: On TestNG using new JVM thread/instance for each test
body: <p>I'm running tests on a legacy system that has many static objects and uses several singletons... i'm not able to detect them all, so this leads to errors when running my test suite.</p>
  
  <p>I'm using eclipse, testng and Mockito. To run the test we we use eclipse run configurations and/or gradle build.</p>
  
  <p>Issue: </p>
  
  <ul>
  <li>when i run my tests as single test (Run as -> TestNG test) it's working properly (it's ok, its' working)</li>
  <li>when i use my suite.xml file the tests fail because some singletons/static variables still are mocked/have the wrong content/are wrong initialized</li>
  </ul>
  
  <p><strong>how can i create a new JVM for each test?</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite name="Suite"&gt;
      &lt;test name="Test p1t1"&gt;
          &lt;classes&gt;
              &lt;class name="package1.Test1"/&gt; &lt;!-- test ok --&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
      &lt;test name="Test p1t2"&gt;
          &lt;classes&gt;
              &lt;class name="package1.Test2"/&gt; &lt;!-- will fail now --&gt;
          &lt;/classes&gt;
      &lt;/test&gt;             
  &lt;/suite&gt; 
  </code></pre>
  
  <p>when i swap my execution order the problem occurs on the other side:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite name="Suite"&gt;
      &lt;test name="Test p1t2"&gt;
          &lt;classes&gt;
              &lt;class name="package1.Test2"/&gt; &lt;!-- test now ok --&gt;
          &lt;/classes&gt;
      &lt;/test&gt;
      &lt;test name="Test p1t1"&gt;
          &lt;classes&gt;
              &lt;class name="package1.Test1"/&gt; &lt;!-- will fail now instead --&gt;
          &lt;/classes&gt;
      &lt;/test&gt;             
  &lt;/suite&gt; 
  </code></pre>