Writing Cucumber Features

Cucumber features

In Cucumber, we write tests as a series of steps using a minimal language called Gherkin. An individual Cucumber test is called a Scenario, and a group of them is called a Feature.

Integration testing with Cucumber

Let’s take the Capybara integration test from the last section and convert it to Cucumber. Cucumber feature files go in the features directory and typically end in .feature. Here is features_add_task.feature:

Get hands-on with 1200+ tech skills courses.