java - How can I make repeated use of a same feature described in cucumber feature file -
iam checking profile adding page, once user added profile has approved user. first have login user(a) , add profile after have log in user(b) approve added profile.
how can use same login details added in feature file logging in second user.
feature file snippet given below,
given enter '<username>' , '<password>' when clicking submit button system should log application , prompt msg as<msg> examples: |username|password| |test |test@1 |
the login credentials second user is
|username|password| |test |test@1 |
how can use details first user login second user. please issue.
i not confident whether understand question or not? per understanding want use same login details 2 different cases.
your test scenario:
- login usera
- add profile
- login userb
- approve profile
feature file should be:
background: login when clicking submit button system should log application , prompt msg as<msg> examples: |username|password| |test |test@1 |
scenario: add profile when click on 'add profile' button , fill details submit profile details
scenario: approve profile given navigate approve profile page click on approve button
please update me if helps
Comments
Post a Comment