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:

  1. login usera
  2. add profile
  3. login userb
  4. 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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -