1.

What Are Steps In Cucumber?

Answer»

Steps in Gherkin's .feature files can be considered a method invocation. Before Cucumber can execute a step it MUST be TOLD, via a step definition, how that step should be performed.

Definitions are WRITTEN in Ruby and conventionally filed under features/step_definitions/*_steps.rb. Definitions start with the same keywords as their invocation (including Gherkin's full LANGUAGE support). Each definition takes two arguments.

Either a regular expression or string with $variables

A block containing ruby CODE to execute

Steps in Gherkin's .feature files can be considered a method invocation. Before Cucumber can execute a step it must be told, via a step definition, how that step should be performed.

Definitions are written in Ruby and conventionally filed under features/step_definitions/*_steps.rb. Definitions start with the same keywords as their invocation (including Gherkin's full language support). Each definition takes two arguments.

Either a regular expression or string with $variables

A block containing ruby code to execute



Discussion

No Comment Found