Re: [jbehave-user] Parametrisation when calling same step with different values
wow, I'm sorry. It is quite obvious that.
Thanks to Mauro and Andreas.
On 23/07/2012 19:47, Mauro Talevi wrote:
> Use parametrisation by name delimiters:
>
> new MostUsefulConfiguration()
> .useParameterControls(new
> ParameterControls().useDelimiterNamedParameters(true))
>
> http://jbehave.org/reference/stable/parametrised-scenarios.html
>
> On 23/07/2012 18:26, Marius Brot wrote:
>> Hello,
>>
>> how do you handle Parametrisation of Stories when the same step should
>> be called multiple with different parameters?
>> I'm wondering the following example was not running like expected.
>>
>>
>> My Story file:
>> ----------------------------------------------------------------
>> Scenario: Some jobs with multiple users
>> Given a user called <user1>
>> Given a user called <user2>
>> ...
>>
>> Examples:
>> | user1 | user2 |
>> | mario | lena |
>>
>>
>> Console Output (when running the Story - like expacted):
>> ----------------------------------------------------------------
>> Example: {user1=mario, user2=lena}
>> Given a user called mario
>> Given a user called lena
>> ...
>>
>>
>> The implementation of the Steps looks like:
>> ----------------------------------------------------------------
>>
>> <at> Given("a user called $user")
>> public void aUser(String user) {
>> // ..
>> }
>>
>>
>> The Problem
>> ----------------------------------------------------------------
>> When debugging the method aUser will be called with parameter
>> values "<user1>" and "<user2>" insted of the user names.
>>
>> Why the console is showing my expected behavior but the code
>> itselfs don't do so?
>>
>> When changing one of the parameter names to "user" they will
>> work. But I need to specify different users.
>>
>> cheers
>> Marius
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email