baev / allure-cli-depricated

Allure Command Line Tool
Other
20 stars 7 forks source link

OutOfMemoryError while generate the report #37

Closed baev closed 9 years ago

baev commented 9 years ago
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.io.UnixFileSystem.resolve(UnixFileSystem.java:108)
    at java.io.File.<init>(File.java:341)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:479)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:521)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:521)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:521)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:521)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:521)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:521)
    at org.codehaus.plexus.util.DirectoryScanner.scandir(DirectoryScanner.java:521)
    at org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:346)
    at ru.yandex.qatools.allure.command.ReportGenerate.getPathsByGlobs(ReportGenerate.java:77)
    at ru.yandex.qatools.allure.command.ReportGenerate.getResultsDirectoryByPattern(ReportGenerate.java:68)
    at ru.yandex.qatools.allure.command.ReportGenerate.getResultsDirectories(ReportGenerate.java:57)
    at ru.yandex.qatools.allure.command.ReportGenerate.runUnsafe(ReportGenerate.java:36)
    at ru.yandex.qatools.allure.command.AllureCommand.run(AllureCommand.java:36)
    at ru.yandex.qatools.allure.AllureCLI.main(AllureCLI.java:32)

Using DummyReportGenerator report generated successfully

vania-pooh commented 9 years ago

@baev more details please.

baev commented 9 years ago

I have a folder with huge amount of results (10k files). java.lang.OutOfMemoryError occurs when I try to generate the report using allure generate my-results/ -o my-report/ -v 1.4.13. But if I use DummyReportGenerator report generated successfully. As you can see form stack trace - the problem is directory scanner which search results by ant pattern.

vania-pooh commented 9 years ago

Summon @eroshenkoam. @baev probably we could replace this by java.nio classes like java.nio.Files.walkFileTree().

PavelSusloparovNYT commented 9 years ago

Same thing for me. I have 5 suites, 750 tests each. Each test has 3 *.json file for each API call. 2-5 API calls per tests. ~4Gb data

How can i configure java memory for report generator? I use mvn site with pom.xml

mvn -DresultsPattern=//allure/source/integration-test/2015-06-11 -DoutputDirectory=/allure/report/integration-test -f /integration-test/pom-integration.xml -s /integration-test/settings.xml site

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>ru.yandex.qatools.allure</groupId>
    <artifactId>allure-testng</artifactId>
    <version>1.0-SNAPSHOT</version>
    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <outputDirectory>${outputDirectory}</outputDirectory>
                    <resultsPattern>${resultsPattern}</resultsPattern>
                    <reportVersion>1.4.1</reportVersion>
                    <failReportIfEmpty>false</failReportIfEmpty>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>
baev commented 9 years ago

The issue fixed in new command line tool. See http://wiki.qatools.ru/display/AL/Allure+CLI