I have a difficulty with writing Cucumber tests. The re-usability of the Cucumber sentences is not consistent - I would like to avoid code duplication when creating sentences and methods glued to the sentences.
Using the Cucumber's built in tool does not work as it slows Eclipse so badly. How to reuse code in an efficient way?
For ex. I have the following Cucumber test in one suite:
Scenario:
Given As a full right user
When I open the webpage
Then I see the edit button
And another one in another suite:
Scenario:
Given As a full right user
When I open the webpage
Then I can remove a user
Not two, but having hundreds of tests, how can I handle the methods and cucumber scenarios of duplication?
Duplication like I open the webpage
and I load the webpage
meaning the same, working in teams and because having hundreds of tests one may not notice that the method/sentence already exists.
When I open the webpage
Simply pass a parameter in the step, since the variable is the URL, soWhen I open the webpage "url"
and write your step to act on the passed url.