Cucumber-jvm java HelloWorld Example OutOfBoundsException Error

I need help running java cucumber 'hello world example found in this package: cucumber.examples.java.helloworld.HelloStepdefs

Interestingly, did I miss something in my setup?

I get the following error:

Feature: Hello World Time elapsed: 0 sec <<< ERROR! java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at gherkin.formatter.PrettyFormatter.indentedLocation(PrettyFormatter.java:142) at gherkin.formatter.PrettyFormatter.printStep(PrettyFormatter.java:255) at gherkin.formatter.PrettyFormatter.match(PrettyFormatter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at cucumber.runtime.Utils$1.call(Utils.java:44) at cucumber.runtime.Timeout.timeout(Timeout.java:12) at cucumber.runtime.Utils.invoke(Utils.java:40) at cucumber.runtime.RuntimeOptions$2.invoke(RuntimeOptions.java:138) at $Proxy11.match(Unknown Source) at cucumber.runtime.junit.JUnitReporter.match(JUnitReporter.java:61) at cucumber.runtime.Runtime.runStep(Runtime.java:250) at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:49) at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:43) at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:36) at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:83) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:77) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:37) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at cucumber.api.junit.Cucumber.run(Cucumber.java:82) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:113) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) 
+4
source share
2 answers

Even I ran into the same problem with 1.1.3 :( just saw this https://groups.google.com/forum/?fromgroups=#!topic/cukes/rCVf28oK1SI , it seems this is a regression problem. I changed the version in pom and built the files before 1.1.2, and now it works fine.

+6
source

this error occurs only for me when the formatter is configured, deletes it, and all tests run correctly.

So remove the formatting ... and version 1.1.3 works, but will you lose all the output ?!

+1
source

All Articles