allure-framework / allure-teamcity

Teamcity CI plugin allowing to generate Allure Report as build artifact
https://qameta.io/allure-report
Apache License 2.0
37 stars 29 forks source link

Allure TeamCity plugin showing empty report #24

Closed sergmal closed 9 years ago

sergmal commented 9 years ago

Teamcity running on machine "А". Agent running on machine "B". On the same machine ("B") maven is triggering selenium web tests. There are allure reports as well "mvn clean test site jetty:run" working fine.

I've installed allure teamcity plugin. Added path to allure reports. But allure report is empty each time i open it after test finished.

I have tried to put full path to results D:\BuildAgent\work\792b367268134f82\automation\target\allure-results Also this way: **\allure-results but nothing helps

Thanks for Any help & support in advance!

Allure screenshot:automated-testing.info//uploads/default/1693/2d09b275384e6800.PNG

Teamcity screenshot: http://automated-testing.info//uploads/default/1691/37400f7a5cbe8d2f.PNG

Teamcity screenshot: 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>
</reporting>

[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
sergmal commented 9 years ago

Now I'm getting AllureReportBuilderException, I checked memory and disk space- there is more than enough free space

[15:15:33]Allure report generation (7s) [15:15:33]analyse results pattern [*/allure-results] [15:15:33]analyse results directories [D:\BuildAgent\work\792b367268134f82\automation\target\allure-results] [15:15:33]prepare allure report directory [D:\BuildAgent\temp\agentTmp\allure] [15:15:33]prepare report generator with version: 1.4.14 [15:15:33]process tests results to directory [D:\BuildAgent\temp\agentTmp\allure] [15:15:40] ru.yandex.qatools.allure.report.AllureReportBuilderException: java.lang.reflect.InvocationTargetException at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:135) at ru.yandex.qatools.allure.teamcity.AgentBuildEventsProvider.runnerFinished(AgentBuildEventsProvider.java:79) at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:117) at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:67) at com.sun.proxy.$Proxy6.runnerFinished(Unknown Source) at jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FireRunnerFinishedFStage.doFinishStage(FireRunnerFinishedFStage.java:29) at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.runFinishStage(RunnerFinishStagesExecutor.java:32) at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.doBuildFinishStages(RunnerFinishStagesExecutor.java:23) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.safeCallFinishStages(RunnerContextExecutor.java:65) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:56) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24) at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:70) at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:50) at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:266) at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:51) at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:231) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at ru.yandex.qatools.allure.report.AllureReportBuilder.processResults(AllureReportBuilder.java:132) ... 28 more Caused by: java.lang.OutOfMemoryError: PermGen space [15:15:41]Surefire report watcher [15:15:41]1 report found for paths: [15:15:41]D:\BuildAgent\work\792b367268134f82\automation\target\surefire-reports\TEST-.xml [15:15:41]Successfully parsed [15:15:41]1 report [15:15:41]automation\target\surefire-reports\TEST-com.tst.automation.tender.test.NewTenderSaveWithoutErrorsTest.xml

sergmal commented 9 years ago

Guys. Results directory settings in TeamCity " **/allure-results " was correct for my setup. This memory exception resolved itself.

Probably I need to add heap settings in pom.xml (jvm memory increase), but for which plugin? allure? surefire?

sergmal commented 9 years ago

Increased PermGen memory in build agent! Everything works! Closing