【问题标题】:Allure TeamCity plugin showing empty reportAllure TeamCity 插件显示空报告
【发布时间】:2015-06-04 13:08:28
【问题描述】:

Teamcity 在机器“А”上运行。 代理在机器“B”上运行。在同一台机器(“B”)上,maven 正在触发 selenium web 测试。 还有魅力报告以及“mvn clean test site jetty:run”工作正常。

我已经安装了 allure teamcity 插件。添加了引诱报告的路径。 但是每次测试完成后我打开诱惑报告都是空的。

提前感谢您的任何帮助和支持!

**Allure 截图:**automated-testing.info//uploads/default/1693/2d09b275384e6800.PNG

团队城市截图:http://automated-testing.info//uploads/default/1691/37400f7a5cbe8d2f.PNG

团队城市截图: http://automated-testing.info//uploads/default/1692/eb9e8664d8222407.PNG

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <allure.version>1.4.14</allure.version>
    <aspectj.version>1.7.4</aspectj.version>
</properties>

<dependencies>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.45.0</version>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>2.45.0</version>
    </dependency>

    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-junit-adaptor</artifactId>
        <version>${allure.version}</version>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.18</version>
            <configuration>
                <testFailureIgnore>true</testFailureIgnore>
                <argLine>
                    -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                </argLine>
                <properties>
                    <property>
                        <name>listener</name>
                        <value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
                    </property>
                </properties>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
            </dependencies>
        </plugin>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <configuration>
                <webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
            </configuration>
        </plugin>
    </plugins>
</build>

<reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <allureresultsdirectory>${project.build.directory}/allure-results</allureresultsdirectory>
            </configuration>
        </plugin>
    </plugins>

[13:13:31][INFO] ------------------------------------------------------------------------
[13:13:31][INFO] BUILD SUCCESS
[13:13:31][INFO] ------------------------------------------------------------------------
[13:13:31][INFO] Total time: 2:10.375s
[13:13:31][INFO] Finished at: Thu Jun 04 15:13:30 EEST 2015
[13:13:31][INFO] Final Memory: 38M/364M
[13:13:31][INFO] ------------------------------------------------------------------------
[13:13:31]Process exited with code 0
[13:13:31]Publishing artifacts
[13:13:31]Collecting files to publish: [D:\BuildAgent\temp\buildTmp\.tc-maven-bi\maven-build-info.xml.gz => .teamcity]
[13:13:31]Publishing using [ArtifactsCachePublisher]
[13:13:32]Publishing using [WebPublisher]
[13:13:32]Waiting for 2 service processes to complete
[13:13:32]Allure report generation (8s)
[13:13:32]analyse results pattern [D:\BuildAgent\work\792b367268134f82\automation\target\allure-results]
[13:13:32]analyse results directories []
[13:13:32]prepare allure report directory [D:\BuildAgent\temp\agentTmp\allure]
[13:13:32]prepare report generator with version: 1.4.14
[13:13:32]process tests results to directory [D:\BuildAgent\temp\agentTmp\allure]
[13:13:40]unpack report face to directory [D:\BuildAgent\temp\agentTmp\allure]
[13:13:41]Publishing artifacts (2s)
[13:13:42]Surefire report watcher
[13:13:42]1 report found for paths:
[13:13:42]D:\BuildAgent\work\792b367268134f82\automation\target\surefire-reports\TEST-*.xml
[13:13:42]Successfully parsed
[13:13:44]Publishing internal artifacts
[13:13:45]Sending using ArtifactsCachePublisher
[13:13:45]Sending using WebPublisher
[13:13:46]Build finished

【问题讨论】:

    标签: maven teamcity allure


    【解决方案1】:
    [13:13:32]analyse results pattern [D:\BuildAgent\work\792b367268134f82\automation\target\allure-results
    [13:13:32]analyse results directories []
    

    您的结果模式不正确,这就是 Allure 无法找到测试运行期间生成的 XML 文件的目录的原因。请尝试默认指定的**/allure-results

    【讨论】:

      【解决方案2】:
      1. 结果目录 [**/allure-results] 在我的设置中没有问题
      2. 在构建过程中出现“Caused by: java.lang.OutOfMemoryError: PermGen space”错误,之后我在 TeamCity 代理中增加了 PermGen 内存

      现在一切正常!谢谢

      【讨论】:

        猜你喜欢
        • 2022-01-23
        • 1970-01-01
        • 2021-12-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-07-21
        相关资源
        最近更新 更多