Just started with gherkins and I need to write gherkins scenarios for my Rest API.
There is a scenario where user inputs customer Id and order Id and the rest service links order Id with customer Id based on some checks. It then returns the complete details of order.
The gherkins scenario that I quoted is as follows :
Scenario: Associate an order to customer
When User provides order to attach to customer
Then User should get the associated order details
Now if the Customer or order id is invalid, the rest call will respond with the corresponding error message.
Should I use GIVEN to ensure the customer and order Id exist?
GIVEN : Customer exit with Id "abc" AND Order exit with Id "bcd"
Is there any significance of GIVEN here ? What is the best way to write this example scenario ?
Aucun commentaire:
Enregistrer un commentaire