cucumber/cucumber-jvm — Issue #75: Scenario outline doesn't work if Given is not in Background
Author: mmalmeida
Created: 2011-10-27 17:57:30+00:00
State: open

I'm not sure this is an issue with Scenario Outlines or just the way it's supposed to work.

I altered the basic_arithmetic feature a bit, see:
https://github.com/mmalmeida/cucumber-jvm/blob/master/examples/java-calculator/src/test/resources/basic_arithmetic.feature
and
https://github.com/mmalmeida/cucumber-jvm/blob/master/examples/java-calculator/src/test/java/cucumber/examples/java/calculator/RpnCalculatorStepdefs.java

Basically, I added a @Given with a List.
The problem is the test fails if the "Given" part of the feature is in Scenario outline (line 22 of the feature), failing with a cucumber.runtime.CucumberException: Arity mismatch. Parameters: [interface java.util.List]. Matched arguments: [] exception.

However, if you move the Given part of the feature to the background, it does work.

I found this while moving from background to the Scenario Outline because I want to update my feature with more scenarios that don't need that background.