title: TestNG: Is running classes in parallel thread safe?
body: <p>When i run my test classes in parallel, the number of failed tests are higher than if i run the test classes serialized.  I log a lot to the console for debugging purposes, but it is almost useless when running in parallel as everything logged is jumbled/out of order.</p>
  
  <p>Before i try and fix the logging issue so i can debug better, i was wondering, if I set <code>parallel="classes"</code>, does it guarantee thread safety?  I assume if I set <code>parallel="tests"</code> two methods could try to access the same object in scope, leading to thread safety issues.</p>
  
  <p>ie:</p>
  
  <pre><code>&lt;suite name="test" parallel="classes" thread-count="3"&gt;
  </code></pre>