Skip to content

Commit

Permalink
fix invocation of JUnit(4) tests
Browse files Browse the repository at this point in the history
By default `scalatest-maven-plugin` [1] does not discover
JUnit tests. Each JUnit test must be added to a comma
separated list within plugin configuration `jUnitClasses`:

```
<plugin>
  <groupId>org.scalatest</groupId>
  <artifactId>scalatest-maven-plugin</artifactId>
  <version>1.0</version>
  <configuration>
    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
    <junitxml>.</junitxml>
    <filereports>TestSuiteReport.txt</filereports>
    <!-- Comma separated list of JUnit test class names to execute -->
    <jUnitClasses>samples.AppTest</jUnitClasses>
  </configuration>
  <executions>
  ...
  </executions>
</plugin>
```

[1] https://github.com/scalatest/scalatest-maven-plugin
  • Loading branch information
agebhar1 committed Apr 25, 2016
1 parent e962f23 commit add7068
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/resources/archetype-resources/pom.xml
Expand Up @@ -98,6 +98,8 @@
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<junitxml>.</junitxml>
<filereports>TestSuiteReport.txt</filereports>
<!-- Comma separated list of JUnit test class names to execute -->
<jUnitClasses>samples.AppTest</jUnitClasses>
</configuration>
<executions>
<execution>
Expand Down

0 comments on commit add7068

Please sign in to comment.