title: Running tests in parallel with maven surefire plugin
body: <p>Recently got a new job, I'm working on a Maven and Micronaut project - I'm new to Micronaut, and if you're not familiar, its an alternative to Spring.</p>
  <p>Using this as a guide: <a href="https://www.baeldung.com/maven-junit-parallel-tests" rel="nofollow noreferrer">https://www.baeldung.com/maven-junit-parallel-tests</a></p>
  <p>I'm trying to get our integration tests to run in parallel, in an attempt to speed up our tests. I have added the required configuration to the pom.xml file. I have tweaked this lots, with different combinations of settings (including ones I found on other SO posts).</p>
  <p>But when I run the tests, with and without this added config, the time it takes to run them is exactly the same - 1 minute and 38 seconds. So I don't think its working. Although don't know what my expected output on the console should look like if it is working?</p>
  <p>In the tests, none of them are using @RunWith, its using the default, which should be okay.</p>
  <p>This is the pom. Can anyone advise please? Thanks.</p>
  <pre><code>&lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;integration&lt;/id&gt;
        &lt;build&gt;
          &lt;plugins&gt;
            &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                &lt;excludedGroups&gt;unit, performance&lt;/excludedGroups&gt;
                &lt;parallel&gt;classes&lt;/parallel&gt;
                &lt;threadCount&gt;10&lt;/threadCount&gt;
              &lt;/configuration&gt;
            &lt;/plugin&gt;
          &lt;/plugins&gt;
        &lt;/build&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
        &lt;id&gt;performance&lt;/id&gt;
        &lt;build&gt;
          &lt;plugins&gt;
            &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                &lt;excludedGroups&gt;unit, integration&lt;/excludedGroups&gt;
              &lt;/configuration&gt;
            &lt;/plugin&gt;
          &lt;/plugins&gt;
        &lt;/build&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
        &lt;id&gt;all&lt;/id&gt;
        &lt;build&gt;
          &lt;plugins&gt;
            &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                &lt;excludedGroups&gt;none&lt;/excludedGroups&gt;
              &lt;/configuration&gt;
            &lt;/plugin&gt;
          &lt;/plugins&gt;
        &lt;/build&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
  </code></pre>
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
        ...
        &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;${maven-surefire-plugin.version}&lt;/version&gt;
          &lt;configuration&gt;
            &lt;excludedGroups&gt;integration, performance&lt;/excludedGroups&gt;
            &lt;parallel&gt;classes&lt;/parallel&gt;
            &lt;threadCount&gt;10&lt;/threadCount&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        ...
      &lt;/plugins&gt;
    &lt;/build&gt;
  </code></pre>