2016年7月30日星期六

解决mvn test没有运行Scala Test

http://stackoverflow.com/questions/13036561/trying-to-get-scalatest-working-there-are-no-tests-to-run-when-doing-mvn-tes

在pom的plugin中增加:
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.7</version>
  <configuration>
    <skipTests>true</skipTests>
  </configuration>
</plugin>
<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>WDF TestSuite.txt</filereports>
  </configuration>
  <executions>
    <execution>
      <id>test</id>
      <goals>
        <goal>test</goal>
      </goals>
    </execution>
  </executions>
</plugin>
参考http://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin

没有评论:

发表评论