Does anyone know how to achieve this or they consider it a good idea. To have Gherkin's OR style syntax to reduce repetition, but maintaining human readability (hopefully). I think of cases where combinations of sentences expand with each combination of several OR statements. eg.
Scenario: TestCopy
Given Some text is selected
When The user presses Ctrl + C
OR the user right clicks and selects copy
OR the user selects Edit + Copy
Then the text is copied to the clipboard
This will run as 3 tests each with the same given, and then with one when from the OR set. I suppose this could be achieved using a template with a space holder for the When clause, but I think it is more readable and might allow OR to be used in this, as well as for creating nx m tests. With the outline, you will need the lines nx m.
- Is there a better way to do this
- Am I better off copying and pasting explicitly (I think the service might get messy).
- Do other frameworks support this (I think using FIT you can write a user table, but again this is overhead)
Thank.
source
share