JBehave devs:

We have the following example story (acutally changing the story
in the spring-security example to be parameterized).
This is a parameterized scenario - that also include an Examples
Table parameter on the Given step.

The problem is that the ExamplesTable values are including the
"<" and ">" delimiters.  This is due to how JBehave
expects the Examples: header values to be - for variables to be
replaced in steps - one does NOT include the <> - but
for values to be replaced in ExamplesTables - one does include
the <>.  You can see this in the trader stories -
parameterized_table.story and any of the other parameterized
scenario stories.

Tried creating duplicate columns - username and <username> and
password and <password> (and renaming those
used in the table to get the <> around them) - that is not
working however as the replacement of username takes
precedence over <username> and I get "<testDisabled>" and
"<dpassword>" as values in the ExamplesTable still.

I then tried renaming the tables values with "_t" added to the
end (<username_t> and <password_t>) but that doesn't
work as the ExamplesTable now comes in with values
"<testDisabled_t>" and "<dpassword_t>".  Also tried with the
"t_" as a prefix and that did the same.

Eventually had to rename them so that I had "username" and
"<user>" and "password" and "<pwd>".  That worked.
But again with duplicate columns of data.

There seems to be bugs related to how NamedParameters get
replaced into the ExamplesTable.
Thoughts?  Can I not use scenario parameters on BOTH a table and
steps?

Brian

---

Scenario: Test all the user flag combinations

Given the users for Microsoft:
|username|passwordCleartext|enabled|expired|forcePasswordChange|
|<username>|<password>|<enabled>|<expired>|<forcePasswordChange>|
When user <username> authenticates on <orgName> site with
password <password>
Then user should not be authenticated
And authentication failure is <failure>
Examples:
|orgName|username|password|enabled|expired|forcePasswordChange|fa
ilure|
|Microsoft|testDisabled|dpassword|false|false|false|Disabled|
|Microsoft|testExpired|epassword|true|true|false|AccountExpired|
|Microsoft|testDisabledAndExpired|depassword|false|true|false|Dis
abled|
|Microsoft|testFPCDisabled|fdpassword|false|false|true|Disabled|
|Microsoft|testFPCExpired|fepassword|true|true|true|AccountExpire
d|
|Microsoft|testFPCDisabledAndExpired|fdepassword|false|true|true|
Disabled|

---

Reply via email to