我有一个测试,我从命令行
运行mvn clean site
我看到测试成功完成。
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running smoketest.DummyTest
Configuring TestNG with: TestNG652Configurator
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.311 sec - in smoketest.DummyTest
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
然而,surefire-report.html显示全部为零。 0测试,0跳过等。我可能在意外打破了一些事情,因为它曾经在上周工作。这是我在pom.xml中的构建和报告部分:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
</properties>
<includes>
<include>smoketest/DummyTest.java</include>
</includes>
<reportsDirectory>target/site/</reportsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.0</version>
<configuration>
<dependencyLocationEnabled>false</dependencyLocationEnabled>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
</plugin>
</plugins>
</reporting>