2013-06-27 159 views
1

當通過jenkins運行我的硒測試時,surefire報告沒有被創建。Maven surefire報告Jenkins

[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,我指定神火報告

<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> 
+0

你能提供你的pom.xml的配置和一些前後更多的日誌行(如果相關的)? – noahlz

+0

當我添加它時,請參閱上面的內容 – jrock2004

回答

0

你可以嘗試用最基礎的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> 

如果它工作。請指定使用情況

0

包括報告插件在你的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 site