TestQA1
2 years agoFrequent Contributor
Duplicate gherkin statements
Hi All,
In my BDD tests, I need perform same actions in different place, the problem is that each scenario should only have Given before When and Then.
For example.
Given close the file
Now if I need to close the file after Then... I need to create a duplicate statement with Then close the file, which doesn't make sense and create duplicate code
Is there any way we can link 'close the file' to both Given and Then so it gets linked to the same code.
Thank you!
This is not a great example, but gives you a rough idea of what you can do without duplicating BDD statements