2

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

[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>
4

2 回答 2

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>

如果它正在工作。请指定用例

于 2013-09-19T09:18:17.677 回答
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
于 2016-02-19T18:19:21.793 回答