Acceptance Criteria in Gherkin Syntax
I'd like some help with writing Acceptance Criteria in Gherkin. I've read and looked at a lot of examples and the general consensus has been:
Given <condition>
When <trigger>
Then <result/outcome>
What is the correct way to interpret what a condition and trigger is? Which draft is correct?
Draft1
Given a batch process runs
When the invoice status = active
Then set Field1 = "In Progress"
Draft2
Given the invoice status = active
When the batch process runs
Then set Field1 = "In Progress"
Hi Michael,
You could have Scenario > Given > When > Then
The trigger depends on the situation - when an order is Invoiced should the batch run (Draft 2) or when a batch is run the order is invoiced (Draft 1).
The condition could be like - User is on the page to generate Invoice
Draft 2 is correct. Given is the Test data condition that is set up for testing. When is a execution step that you perform on the available test data.Then is the expected result out of the Test execution.