cucumber - Is it possible to write two different set of Examples in scenario outline -
the requirement create 3 users , create template/file add these 3 users
can achieve in single scenario outline?
scenario outline: create users , load template given create user <username> , password <password> , description <description> example: | username | password | description | | user1 | pwd1 | user1creation | | user2 | pwd2 | user2creation | | user3 | pwd3 | user3creation | when user create template ??????
can suggest how write template creation step , pass usernames parameters?
scenario can written this:
scenario outline: create users , load template given have following users: | username | password | description | | <username1> | <password1> | <description1> | | <username2> | <password2> | <description2> | | <username3> | <password3> | <description3> | when create template users: | username | | <username1> | | <username2> | | <username3> | users should added template examples: | username1 | password1 | description1 | username2 | password2 | description2 | username3 | password3 | description3 | | user1 | pwd1 | user1creation | user2 | pwd2 | user2creation | user3 | pwd3 | user3creation |
or alternative without using scenario outline:
scenario: create users , load template given have following users: | username | password | description | | user1 | pwd1 | user1creation | | user2 | pwd2 | user2creation | | user3 | pwd3 | user3creation | when create template users: | username | | user1 | | user2 | | user3 | users should added template
in both cases in given step users should defined, created in step definition , put shared map, on when step can extraced , added template.
Comments
Post a Comment