Skip to main content

Acceptance Criteria in Gherkin Syntax

Last post 07:58 am September 5, 2024 by Balaji Dhamodaran
2 replies
07:58 pm September 4, 2024

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"


05:08 am September 5, 2024

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


07:58 am September 5, 2024

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.


By posting on our forums you are agreeing to our Terms of Use.

Please note that the first and last name from your Scrum.org member profile will be displayed next to any topic or comment you post on the forums. For privacy concerns, we cannot allow you to post email addresses. All user-submitted content on our Forums may be subject to deletion if it is found to be in violation of our Terms of Use. Scrum.org does not endorse user-submitted content or the content of links to any third-party websites.

Terms of Use

Scrum.org may, at its discretion, remove any post that it deems unsuitable for these forums. Unsuitable post content includes, but is not limited to, Scrum.org Professional-level assessment questions and answers, profanity, insults, racism or sexually explicit content. Using our forum as a platform for the marketing and solicitation of products or services is also prohibited. Forum members who post content deemed unsuitable by Scrum.org may have their access revoked at any time, without warning. Scrum.org may, but is not obliged to, monitor submissions.