John Ferguson Smart’s Post

View profile for John Ferguson Smart, graphic

I Help Manual Testers Become World-Class Test Automation Engineers. Agile Test Automation and BDD Expert | International Speaker And Author | Coach, Trainer and Mentor

GHERKIN WARS! WHICH SCENARIO WINS? Which one reads better, and why? Which one conveys the business intent more accurately? One of the most important rule when writing scenarios is to prefer declarative business rules over imperative test-script style sequences of steps. I see a lot of teams writing scenarios like the first one.. It is essentially a test script, written in Gherkin. That style is bad Gherkin; you should avoid it. It leads to test suites that are hard to read, hard to maintain, and that fail to do what Gherkin was designed to do: act as a way of expressing requirements in an executable form that the whole team can understand and collaborate on. The second scenario is similar to the first in many ways. But it reads totally differently. It focuses on capturing the business rules and intent, and not so much on how the user interacts with the application (plenty of time for that in the step definitions). And more importantly, it's written in business-speak, not tester-speak. So if you have scenarios like the first one, take some time to refactor them into a cleaner declarative style. You can thank me later. Read more on this topic in the Agile Test Automation Playbook - you can grab it here: https://bit.ly/35zlCN8 #agiletesting #testautomation #bdd

  • No alternative text description for this image
Arif ÇAKIR

Software QA Team Lead - BİTES - Defence & Aerospace Technologies

3y

version 2 is more sustainable

Like
Reply
Onur Baskirt

Software Engineering Lead at Emirates

3y

2 is the winner.

Like
Reply
Pattabiraman Venkatesan

Lead Product Software Engineer at Wolters Kluwer ELM Solutions

3y
Abhi Nandan

Making Continuous Delivery a reality | Lead Engineer at Emirates | ISTQB TTA | Ex-Agoda, PwC, Infosys | Automation Consultant | Blogger

3y

version 2, any day!

Nisaar Jagroep, MSc, BA

Agile & Conscious Leadership

3y

John Ferguson Smart nice example, simplicity and intent rules!

Diksha Patidar

Test Automation Engineer at Admiral

3y

version 2

Kritika Jain

Test Specialist @ LTIMindtree | Ex-IBM | Ex-TCS

3y

Version 2

Like
Reply
Trong Bui

QA Architect, QA Manager, Automation Testing, Digital Healthcare, Digital Banking

3y

Since the country had been parameterized, there are still Japan in the text. It makes confusing. Ver 1 is better regarding business communication.

Like
Reply
Cleber da Cunha

DS - GenAI Adoption Lead | Senior Agile Transformation Coach

3y

2

Like
Reply
Viviana Chévez Román

Senior DevOps Engineer at Cargill

3y

Daniel Enrique Hegui Castro

See more comments

To view or add a comment, sign in

Explore topics