I have two feature files that have essentially the same steps in their respective steps definition groovy file.
Both feature files start something like this:
Feature: Open a savings account with VPS Scenario Outline: Verify the savings account order comes out in the receipt Given: Bank advisor logs in with <customernumber> When:... Feature: Open a savings account with a funds account Scenario Outline: Verify the funds account comes out in the receipt Given: Bank advisor logs in with <customernumber1> for a funds account When:...
I keep getting the error cucumber.runtime.AmbiguousStepDefinitionsException since the first instruction matches more than one step definition. How is that possible? Both “Given” statements are different enough so that cucumber should know which one to point at. Even the parameter is different.
I think this is how it’s supposed to work but this there a solution around this? To what extent do I have to make my given when then statements different enough so I won’t get the ambiguous error? What if I actually need the first steps to be similar? Is there anyway I can make a feature file point only at a specific steps definition file?
any feedback is much appreciated. Thanks!