首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maven surefire report Jenkins

Maven surefire report Jenkins
EN

Stack Overflow用户
提问于 2013-06-27 21:35:22
回答 2查看 6K关注 0票数 2

当通过jenkins运行我的selenium测试时,没有创建surefire报告。

代码语言:javascript
复制
[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报告的区域

代码语言:javascript
复制
<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>
EN

回答 2

Stack Overflow用户

发布于 2013-09-19 17:18:18

您可以尝试使用最基本的POM用法来确保火灾吗?它应该开箱即用。

代码语言:javascript
复制
 <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
EN

Stack Overflow用户

发布于 2016-02-20 02:19:22

在您的pom中包含报告插件

代码语言:javascript
复制
<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目标

代码语言:javascript
复制
test -Dmaven.test.failure.ignore=true site
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17344673

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档