title: Scalatest in maven: JUnit results
body: <p>I have a continuous integration server set up in Microsoft Visual Studio Team Services. I am able to build my code and run my tests through <strong>scalatest</strong>.</p>
  
  <p>However, I cannot figure out how to output the results in a JUnit format. I have seen many results for people using SBT, but none who are using <strong>Maven</strong>.</p>
  
  <p>Under configuration, is the 'junitxml' tag supposed to generate the correct file? This would mean it's a Microsoft problem then.</p>
  
  <p>My scalatest plugin currently look like:</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.scalatest&lt;/groupId&gt;
              &lt;artifactId&gt;scalatest-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven.plugin.scalatest.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;reportsDirectory&gt;${project.build.directory}/scalatest-reports&lt;/reportsDirectory&gt;
                  &lt;junitxml&gt;jUnitResults&lt;/junitxml&gt;
                  &lt;filereports&gt;SparkTestSuite.txt&lt;/filereports&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;test&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;test&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p><strong>Update 1:</strong></p>
  
  <blockquote>
    <p>Invalid results file. Make sure the result format of the file 'C:/a/1/s/common/target/scalatest-reports/jUnitResults/TEST-org.scalatest.tools.DiscoverySuite-2d5739be-0653-4b9d-a8ed-41b6d0f82e48.xml' matches 'JUnit' test results format.</p>
  </blockquote>