There appears to be an issue with running Scenario Outlines using the
pretty format feature. The test passes if I use the
progress switch. Here is what I'm seeing when I run my test
Scenario Outline: This is an example of a scenario outline # /hello.feature:22
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
at java.util.regex.Matcher.reset(Matcher.java:291)
at java.util.regex.Matcher.<init>(Matcher.java:211)
at java.util.regex.Pattern.matcher(Pattern.java:888)
at gherkin.formatter.PrettyFormatter.indent(PrettyFormatter.java:363)
at gherkin.formatter.PrettyFormatter.printDescription(PrettyFormatter.java:355)
at gherkin.formatter.PrettyFormatter.printStatement(PrettyFormatter.java:111)
at gherkin.formatter.PrettyFormatter.match(PrettyFormatter.java:149)
at cucumber.runtime.World.runStep(World.java:76)
at cucumber.runtime.model.CucumberScenario.runStep(CucumberScenario.java:68)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:46)
at cucumber.runtime.model.CucumberScenarioOutline.run(CucumberScenarioOutline.java:38)
at cucumber.runtime.Runtime.run(Runtime.java:101)
at cucumber.runtime.Runtime.run(Runtime.java:93)
at cucumber.cli.Main.run(Main.java:77)
at cucumber.cli.Main.main(Main.java:63)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
I've setup my pom file to look like
<executions>
<!-- Generate .cucumber/meta.json -->
<execution>
<phase>test</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<classpathScope>test</classpathScope>
<mainClass>cucumber.cli.Main</mainClass>
<arguments>
<argument>--format</argument>
<argument>pretty</argument>
<argument>--glue</argument>
<argument>org.stag.hello</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
</executions>
And, here is the scenario
Scenario Outline: This is an example of a scenario outline
Given this is a scenario outline
When we concatenate <string_1> with <string_2>
Then the combined string is <string_3>
Examples:
|string_1 | string_2 | string_3 |
| hello | world | hello world |