{"id":13515,"date":"2017-03-02T00:00:00","date_gmt":"2017-03-02T06:00:00","guid":{"rendered":"https:\/\/centricconsulting.com\/post\/cucumber-introduction-to-gherkin-scripting_sqat-columbus\/"},"modified":"2021-12-15T00:13:50","modified_gmt":"2021-12-15T05:13:50","slug":"cucumber-introduction-to-gherkin-scripting_sqat-columbus","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/cucumber-introduction-to-gherkin-scripting_sqat-columbus\/","title":{"rendered":"An Introduction to Gherkin Scripting"},"content":{"rendered":"
Blog four of a series<\/a>.<\/em><\/p>\n In the 2000s, Dan North created a software development process call Behavior-Driven Development (BDD). In his quest to \u201c<\/a>find a simple and elegant way in Ruby to describe behavior at the application level,<\/a>\u201d<\/a> Dan North created RBehave<\/span>: a story-level BDD framework for Ruby.<\/p>\n It was in this framework that the Gherkin scripting format was born.<\/p>\n At a basic level, Gherkin Scripts connect the human concept of cause and effect to the software concept of input\/process\/output. The input is the Given step(s); the process is the When step(s); the output is the Then step(s).<\/p>\n All scripts, regardless of where they are written or for what system they are written to test, should follow this same format. Or at least have each of these three parts.<\/p>\n The purpose of Given steps is to put the system in a known state before the user (or external system) starts interacting with the system (in the When steps). Some people call the Given steps \u201cPreconditions to the Action.\u201d It is also a common place for data setup.<\/p>\n Since no functionality should be changing in the Given step, you should rarely have an error in the Given steps. Some Examples:<\/p>\n <\/a><\/p>\n With the system now in the state we need it to be, we can execute the change. The purpose of the When steps are to describe the key action the user performs.<\/p>\n These are the MONEY<\/em> steps. Or, in other words: the steps that the business is paying you to analyze, build and test. Some examples:<\/p>\nGiven<\/h2>\n
When<\/h2>\n