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
2 is the winner.
version 2, any day!
John Ferguson Smart nice example, simplicity and intent rules!
version 2
Version 2
Since the country had been parameterized, there are still Japan in the text. It makes confusing. Ver 1 is better regarding business communication.
2
Daniel Enrique Hegui Castro
Software QA Team Lead - BİTES - Defence & Aerospace Technologies
3yversion 2 is more sustainable