-
Notifications
You must be signed in to change notification settings - Fork 21
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
Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:2.0.40:aggregate (serenity-reports) #68
Comments
What do the feature files look like? |
Hi @wakaleo, |
I can't reproduce this. Can you provide a sample project that reproduces the issue? |
Hi @wakaleo, |
Which versions of Java exactly? It could also be a maven repository issue. Are you building with Gradle or Maven? |
Ok, I was able to reproduce it executing tests via command prompt. java version is Other configuration: What I've noticed, that during this execution the same test is actually executed twice. If the execution is started from Idea (via test class execution), everything is fine. |
I suspect a Maven or JDK issue, but I would need a sample project to be sure |
I'm sorry I'm new to maven (I used gradle previously), probably I'm doing something wrong on mvn verify?
System property is used for configuration... @wakaleo thanks a lot. I will provide it tomorrow morning. I'm unable to connect my laptop to network out of the office. |
Hi @wakaleo , I've uploaded a draft project to https://github.com/TagiraNara/serenity-test Also today I investigated it a little bit:
|
I'm currently experiencing the same issue when running a feature file with a single scenario outline with 3 tagged examples. Roughly it looks like this:
Cucumber options are passed to run only one of the tags (production) and that same tag is also passed to the serenity-maven-plugin. The issue triggers in the code below (net.thucydides.core.model.DataTable), which looks rather sketchy from an outside perspective. testSteps is a list with one entry: Example #1 with the data from the production example. Now in the lambda you go list.subList(startIndex: 1, toIndex: 2) on the testSteps list with a single entry, which of course fails on an IndexOutOfBoundsException.
I'm happy to add my own sample code, to help reproduce this issue, however since the person above me already did so, I assume it would be overkill. |
Could you dig into the code and propose a Pull Request? |
I'm having the exact same problem
Always getting this error whenever more than 3 tags are used on the same feature file. To update this dependency did not help |
@gizdolok, if you use comma separation of tags, you can try using "and" instead in test class where you glue features to steps (like in my previous comment) - for me it's working ok now... Have you tried it? |
Hello, I have an issue on my draft project (one cucumber feature file so far, two scenario outlines, tagged. Test class is configured so that only one test is executed).
While on my pc (windows) everything works fine, my colleague, who cloned the project faces the problem. The test is passed, but the attempt to aggregate the reports causes failure. Full stack trace:
[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 39.742 s [INFO] Finished at: 2019-02-28T18:11:27+02:00 [INFO] Final Memory: 51M/541M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:2.0.40:aggregate (serenity-reports) on project test-engine: Execution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:2.0.40:aggregate failed: toIndex = 2 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:2.0.40:aggregate (serenity-reports) on project test-engine: Execution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:2.0.40:aggregate failed: toIndex = 2 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:2.0.40:aggregate failed: toIndex = 2 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more Caused by: java.lang.IndexOutOfBoundsException: toIndex = 2 at java.util.ArrayList.subListRangeCheck(ArrayList.java:1012) at java.util.ArrayList.subList(ArrayList.java:1004) at net.thucydides.core.model.DataTable.lambda$filterStepsWithTagsFrom$3(DataTable.java:246) at java.util.ArrayList.forEach(ArrayList.java:1257) at net.thucydides.core.model.DataTable.filterStepsWithTagsFrom(DataTable.java:243) at net.thucydides.core.model.TestOutcome.withDataRowsfilteredbyTagsFrom(TestOutcome.java:2509) at net.thucydides.core.model.TestOutcome.withDataRowsfilteredbyTag(TestOutcome.java:2496) at net.thucydides.core.reports.TestOutcomes.lambda$matchingOutcomes$33(TestOutcomes.java:592) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at net.thucydides.core.reports.TestOutcomes.matchingOutcomes(TestOutcomes.java:593) at net.thucydides.core.reports.TestOutcomes.withTag(TestOutcomes.java:562) at net.thucydides.core.reports.html.HtmlAggregateStoryReporter.nestedTagReports(HtmlAggregateStoryReporter.java:219) at net.thucydides.core.reports.html.HtmlAggregateStoryReporter.generateReportsForTestResultsIn(HtmlAggregateStoryReporter.java:181) at net.thucydides.core.reports.html.HtmlAggregateStoryReporter.generateReportsForTestResultsFrom(HtmlAggregateStoryReporter.java:134) at net.serenitybdd.maven.plugins.SerenityAggregatorMojo.generateHtmlStoryReports(SerenityAggregatorMojo.java:243) at net.serenitybdd.maven.plugins.SerenityAggregatorMojo.execute(SerenityAggregatorMojo.java:186) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) ... 21 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [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/PluginExecutionException
pom.xml:
Feature file:
The test class uses the following cucumber option:
Currently only one feature file is in feature/auth-server folder. And only one class is in authServer.stepDefinitions package.
Only one test is executed as a result - successful authorization via client1.
The text was updated successfully, but these errors were encountered: