Why are JUnit tests run twice from within Eclipse?
<p>A similar question has already been asked <a href="https://stackoverflow.com/q/10931684/820657">here</a>. </p>

<p>One (unaccepted) <a href="https://stackoverflow.com/a/10931813/820657">answer</a> states:</p>

<blockquote>
  <p>the test class will always be started directly and then through the
  "link" in the suite. This is as expected.</p>
</blockquote>

<p>Can someone explain what this actually means and whether or not it is possible to prevent the tests running twice.</p>

<p>When I run the tests from the command line using <code>mvn test</code> they only run once.</p>

<p><strong>UPDATE</strong></p>

<p>I have a test suite defined as follows:</p>

<pre><code>@RunWith(Suite.class)
@SuiteClasses({ TestCase1.class, TestCase2.class })
public class MyTestSuite
{
}
</code></pre>