Cucumber Feature - Duplicates
Hi,
I am just understanding the concepts of Cucumber and this question is bothering me.
Let us say - we have 10 members in a group associated with automating various scenarios for same module/application.
Member 1 writes
Feature
Scenario: login with valid credentials
Given Launch the chrome browser
When browser opens the URL "XYZ.com"
And User enter login credentials Email as "admin@xyz.com" and Password as "admin"
And Click on Login
Then page title should be "Your store. Login"
And Close Browser
Member 2 writes feature
Scenario: successful login with vali credentials
Given user launches the chrome browser
When browser opens the URL "xyz.com"
And User enter login credentials Email as "admin@xyz.com" and Password as "admin"
And Click on Login
Then Page title should be "Welcome Admin"
When user clicks New Customer button
Then page title should be "New customer created"
And Close Browser
- My questions are
1 - Notice the similarity between Member 1 and Member 2 - There is slight grammatical differences - how do we avoid this when we have large scale automation in 100s or 200s of features. ARe the tester required to go through existing step definition before writing a feature file? - 2- There is slight addition to second member scenario - how can we maintain a library so that its easy to refer and write only what is newly required.