Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When running mvn serenity:aggregate , the overal build status is updated as FAILURE when atleast 1 test case is failed in 3.6.12 version #3090

Closed
sudheer1437 opened this issue Mar 17, 2023 · 6 comments

Comments

@sudheer1437
Copy link

When running mvn serenity:aggregate , the overal build fails when atleast 1 test case is failed in 3.6.12 version.
In the previous versions, the build status is never updated as failed when running mvn serenity:aggregate when there failed tests.

Please note, the reports are generated perfectly. Its just the build status is updated as FAILURE

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:00 min [INFO] Finished at: 2023-03-17T18:16:56-05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:3.6.12:aggregate (default-cli) on project fi360: A failure occurred in the Serenity tests -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:3.6.12:aggregate (default-cli) on project fi360: A failure occurred in the Serenity tests at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) 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) Caused by: org.apache.maven.plugin.MojoFailureException: A failure occurred in the Serenity tests at net.serenitybdd.maven.plugins.SerenityAggregatorMojo.execute (SerenityAggregatorMojo.java:210) 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) [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@wakaleo
Copy link
Member

wakaleo commented Mar 18, 2023

If there are test failures, when would you normally expect the build to fail?

@sudheer1437
Copy link
Author

If there are test failures, when would you normally expect the build to fail?

mvn serenity:aggregate should NOT update BUILD status as FAILURE because tests failed. that does not make any sense right?
As such serenity:aggregate did work successfully. and generated the reports.

Correct me if am thinking in wrong direction.

@sudheer1437
Copy link
Author

If there are test failures, when would you normally expect the build to fail?

I just checked, till net.serenity-bdd.maven.plugins version 3.5.0, the build status is set to SUCCESS even though there failed tests.
But from version 3.5.1, its changed to set build status to FAILURE when there are atleast one test failed.

before we make changes to our jenkins pipeline, we would like to know its intended to work this way.

@wakaleo
Copy link
Member

wakaleo commented Mar 20, 2023

Fixed in 3.6.15

@wakaleo wakaleo closed this as completed Mar 20, 2023
@sudheer1437
Copy link
Author

sudheer1437 commented Mar 20, 2023

Fixed in 3.6.15

Thank you @wakaleo you are the best

I just tested. the issue is fixed in 3.6.15 version. thank you once again.

@msamarba
Copy link

Does this also count for the version 3.6.7 ?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants