allure-framework / allure-maven

Maven plugin generating Allure report from test results
Apache License 2.0
94 stars 55 forks source link

Intermittent report generation error #255

Closed kressnick25 closed 1 year ago

kressnick25 commented 1 year ago

Describe the bug Intermittently the allure report generation will fail without any useful error - exit value 143. This occurs regardless if all tests passed or not

Expected behavior The report generates without error

Log Note some content has been censored

[INFO] --- allure-maven:2.11.2:report (default-cli) @ [REPO_NAME] ---
[INFO] Allure installation directory /apps/jenkins/workspace/[WORKSPACE_FOLDER]/.allure
[INFO] Try to finding out allure 2.18.1
[INFO] Generate Allure report (report) with version 2.18.1
[INFO] Generate Allure report to /apps/jenkins/workspace/[WORKSPACE_FOLDER]/target/site/allure-maven-plugin
[INFO] Found results directory /apps/jenkins/workspace/[WORKSPACE_FOLDER]/target/allure-results
[INFO] Can't find information about categories
[INFO] Generate report to /apps/jenkins/workspace/[WORKSPACE_FOLDER]/target/site/allure-maven-plugin
[ERROR] Generation error
org.apache.commons.exec.ExecuteException: Process exited with an error: 143 (Exit value: 143)
    at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
    at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:153)
    at io.qameta.allure.maven.AllureCommandline.execute (AllureCommandline.java:131)
    at io.qameta.allure.maven.AllureCommandline.generateReport (AllureCommandline.java:92)
    at io.qameta.allure.maven.AllureGenerateMojo.generateReport (AllureGenerateMojo.java:254)
    at io.qameta.allure.maven.AllureGenerateMojo.executeReport (AllureGenerateMojo.java:164)
    at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:251)
    at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:144)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Desktop (please complete the following information):

baev commented 1 year ago

Exit Code 143 means that the process received a SIGTERM signal from the operating system, which asks the process to gracefully terminate, and the container succeeded in gracefully terminating.

There is nothing we can do in Allure to handle such situations. I can only recommend you to check memory available for process and size of your Allure results directory.

Allure Report loads most of the data into RAM during report generation, so it may cause some memory issues in case of huge reports ( >10k of tests ). If so, consider switching to Allure TestOps -- our paid offering, it is designed to process much higher amounts of tests results.