当通过jenkins运行我的selenium测试时,没有创建surefire报告。
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /jenkins/workspace/tester/target/surefire- reports/html to /var/lib/jenkins/jobs/tester/builds/2013-06-27_12-59- 03/htmlreports/HTML_Report
ERROR: Specified HTML directory '/jenkins/workspace/tester/target/surefire-reports/html' does not exist.
Build step 'Publish HTML reports' changed build result to FAILURE你知道这是什么原因造成的吗?
更新:这是我的pom中指定surefire报告的区域
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<skip>false</skip>
<suiteXmlFiles>
<suiteXmlFile>
src/test/resources/testsuites/${suite}.xml
</suiteXmlFile>
</suiteXmlFiles>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value> org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,com.testing.qa.zz.framework.web.utilities.TestMethodListener,com.testing.qa.zz.framework.web.utilities.TestStatusListener,com.testing.qa.zz.framework.web.utilities.TestSuiteListener
</value>
</property>
</properties>
<systemPropertyVariables>
<org.uncommons.reportng.escape-output>false
</org.uncommons.reportng.escape-output>
</systemPropertyVariables>
</configuration>
</plugin>发布于 2013-09-19 17:18:18
您可以尝试使用最基本的POM用法来确保火灾吗?它应该开箱即用。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.5</version>
<configuration>
<outputName>Any fancy name</outputName>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>如果它起作用了。请指定用例
发布于 2016-02-20 02:19:22
在您的pom中包含报告插件
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.19.1</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>执行maven目标
test -Dmaven.test.failure.ignore=true sitehttps://stackoverflow.com/questions/17344673
复制相似问题