## 1. Project Overview & Quickstart (cucumber/step_definitions)

# step_definitions

Open-source repository cucumber/step_definitions

### Repository Details
- **Repository:** [cucumber/step_definitions](https://github.com/cucumber/step_definitions)
- **Primary Language:** Code

*Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.*

## 2. Official Technical Reference & Guides (cucumber/docs)

## File: README.md

[](https://vshymanskyy.github.io/StandWithUkraine)

# Cucumber Documentation

🚨 This repository is archived. the Cucumber documentation is now at https://github.com/cucumber/website. 🚨

## Contributing Content

For small edits, the recommended way to contribute is via GitHub.
Each page in the documentation will have an **Edit** link for this purpose.

## Working locally

For bigger modifications, the recommended workflow is to edit the documentation
locally on your machine, and seeing the results in a web browser.

This involves getting the source code and building the documentation yourself.

# Get the source code

    git clone https://github.com/cucumber/docs
    cd docs

### View the site

The website is built with several tools that are distributed as a Docker image.

Install [Docker](https://docs.docker.com/install/) if you don't already have
it on your machine.

Build and serve the website:

    ./docker_shell.sh

Open a browser:

    http://localhost:1313

Changes to the contents will be automatically updated in the browser.

Try editing one of the pages under `content` and see for yourself!

### Build the site and check links

When you are done editing, build the site and check links:

    ./docker_shell.sh make clean
    ./docker_shell.sh make
    ./docker_shell.sh make htmlproofer

By default, external links are only checked in CI (because it takes a while).
To check external links locally:

    CI=true ./docker_shell.sh make htmlproofer

Links that are broken should be removed or replaced, even if they are only
temporarily broken. The reason for this is that broken links negatively affect
search engine rankings.

### Modify theme

See the [theme README](themes/cucumber-hugo/README.md)

## Architecture

The site is built with [Hugo](https://gohugo.io), a fast static site generator.

We have a custom-built theme for the site in `themes/cucumber-hugo`. This theme
is based on [Bulma](https://bulma.io/) - a lightweight CSS framework.

The online site is rebuild automatically whenever the git repository receives
new commits, either via a `git push`, or by modifying contents in the CMS.

The [Netlify CMS](https://www.netlifycms.org/) saves contents straight to GitHub
using the GitHub API.

## Continuous Deployment

GitHub will notify Netlify for every `git push` thanks to a [webhook](https://github.com/cucumber/docs.cucumber.io/settings/hooks).

Netlify will then build the site and
[deploy](https://app.netlify.com/sites/cucumber/deploys) it if the build is successful.

The build will check for broken links and other problems. Internal and external links are checked by [HTMLProofer](https://github.com/gjtorikian/html-proofer).
Occasionally, the build will fail due to external links being unavailable or giving a timeout. When that happens, please check if these external links are available and if so, 'Retry build' on Netlify.

You can discuss the documentation in the [Community Discord](https://cucumber.io/community#discord).

---

## File: content/_todo/step-reuse.md

---
source: https://github.com/cucumber/cucumber/wiki/Step-Definitions/
source: https://github.com/cucumber/cucumber/wiki/Hooks/
source: https://github.com/cucumber/cucumber/wiki/Tags/
title: Cucumber Reference
---

# Reusable step definitions

TODO: Describe how to use output parameters to make step definitions reusable

# Reusable helper methods

TODO: Describe how to extract helper methods that can be used from steps

---

## File: content/docs/tools/_index.md

---
title: Tools
subtitle: Simplify your work with Cucumber power tools
weight: 1180
menu: main
iconClass: far fa-tools
---

---

## File: content/docs/tools/general.md

---
title: Tools
subtitle: "Editors, IDEs and build tools"
weight: 1000
---

Using Cucumber in your project is more manageable with the right tools.

# Editors

Most popular text editors support Gherkin syntax highlighting.

Some IDEs also have advanced support for Cucumber, such as running Cucumber
from within the IDE, displaying results, navigating between Gherkin steps and
step definitions and so on.

## Atom

[Atom](https://github.com/atom/atom) is a text editor for macOS, Windows or Linux.

It offers several [packages](https://atom.io/packages/search?q=cucumber) you can use with Cucumber.

## TextMate

[TextMate](https://macromates.com/) is a text editor for macOS.
See the [`Cucumber.tmbundle`](https://github.com/cucumber/cucumber-tmbundle) documentation.

## Visual Studio Code
[Visual Studio Code](https://code.visualstudio.com/) is a code editor for Windows, Linux, or macOS.

You can use it with a [Cucumber (Gherkin) plugin](https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete).

## Nova

[Nova](https://nova.app) is a text editor for macOS.

See the [Cucumber extension](https://extensions.panic.com/extensions/com.rpowell/com.rpowell.Cucumber/) for Gherkin language support.

# IDEs

* [Java IDEs](/docs/tools/java#ides)
* [Ruby IDEs](/docs/tools/ruby#ides)
* [CukeTest](http://cuketest.com) is a Gherkin editor and Cucumber.js development tool.
* [testjam.io](https://testjam.io) is an online IDE for running and sharing Cucumber.js snippets.

# Build Tools
You can run Cucumber using build tools, rather than from the command line.

* [Java build tools](/docs/tools/java#build-tools)
* [Ruby build tools](/docs/tools/ruby#build-tools)

---

## File: content/docs/tools/java.md

---
title: Java Tools
weight: 1100
---

This page describes tools commonly used with Java.

# IDEs

## IntelliJ IDEA

- [IntelliJ IDEA](https://www.jetbrains.com/idea/) has the [IntelliJ IDEA Cucumber for Java plugin](https://plugins.jetbrains.com/plugin/7212-cucumber-for-java)

You can find more information on using Cucumber with IntelliJ IDEA in the [IntelliJ IDEA Cucumber help pages](https://www.jetbrains.com/idea/help/cucumber.html)

## Eclipse

- [Eclipse](https://www.eclipse.org/) has the [Cucumber Eclipse plugin](https://cucumber.github.io/cucumber-eclipse/)

# Build tools
The most widely used build tools for Java are [Maven](#maven) and [Gradle](#gradle).

## Maven

To run Cucumber with [Maven](https://maven.apache.org/), make sure that:

- Maven is installed
- The environment variable `MAVEN_HOME` is correctly configured
- The IDE is configured with the latest Maven installation

Clone the [cucumber-java-skeleton](https://github.com/cucumber/cucumber-java-skeleton) to get started.

## Gradle

To run Cucumber with [Gradle](https://gradle.org/), make sure that:

- Gradle is installed
- The environment variable `GRADLE_HOME` is correctly configured
- The IDE is configured with the latest Gradle installation

Clone the [cucumber-java-skeleton](https://github.com/cucumber/cucumber-java-skeleton) to get started.

---

## File: content/docs/tools/javascript.md

---
title: JavaScript Tools
weight: 1200
---

This page describes tools commonly used with JavaScript.

# Build tools
The most widely used build tools for JavaScript are [npm](#npm) and [Yarn](#yarn).

## npm
To use Cucumber with [npm](https://www.npmjs.com/), make sure that:

- npm is installed

Cucumber.js is available as an npm module.

Add `cucumber` as a development dependency:

```shell
# NPM
npm install --save-dev @cucumber/cucumber
```

## Yarn

To run Cucumber with [Yarn](https://yarnpkg.com/en/), make sure that:

- Yarn is installed

Add `cucumber` as a development dependency:

```shell
# Yarn
yarn add --dev @cucumber/cucumber
```

---

## File: content/docs/tools/related-tools.md

---
title: Related tools
subtitle: Third-party tools
weight: 1400
---

People have written tools on top of Cucumber. These are the known third-party tools that work together with Cucumber:


| Tool                                                                                                            | Description                                                                                                                                                                                                                                                                                  |
|:----------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Aruba](https://github.com/cucumber/aruba)                                                                      | Generic Step Definitions for command-line programs                                                                                                                                                                                                                                           |
| [AssertThat BDD & Test Management in Jira](https://marketplace.atlassian.com/apps/1219033/assertthat-bdd-test-management-in-jira?hosting=cloud&tab=overview)  | Combines feature/scenario management as well as built in test automation reporting in Jira. Website [AssertThat](https://www.assertthat.com/)   |
| [Backyard](https://github.com/senny/backyard)                                                                   | Name the models in your Cucumbers with ease                                                                                                                                                                                                                                                  |
| [BDD Generator](https://davertmik.github.io/bdd-generator/) | Generates random BDD scenarios in Gherkin format for testing purposes. By [@DavertMik](https://github.com/DavertMik) |
| [Bermuda](https://github.com/jfirebaugh/bermuda)                                                                | Capybara Step library for jQuery UI widgets                                                                                                                                                                                                                                                  |
| [Capybara](https://github.com/jnicklas/capybara)                                                                | Webrat alternative which aims to support all browser simulators                                                                                                                                                                                                                              |
| [Clearance](https://github.com/thoughtbot/clearance/wiki/cucumber-features)                                     | Rails Authentication System with Cucumber Feature generator                                                                                                                                                                                                                                  |
| [Cluecumber](https://github.com/trivago/cluecumber-report-plugin)                                               | Maven plugin for clear and concise Cucumber reporting.                                                                                                                                                                                                                                  |
| [Courgette](https://github.com/jnicklas/courgette)                                                              | Browse your cucumber features from within your Rails app with Courgette, a Rails engine.                                                                                                                                                                                                     |
| [cql](https://github.com/enkessler/cql)                                                                         | A query language for Cucumber features                                                                                                                |
| [crb](https://github.com/maiha/crb/wiki)                                                                        | An irb console for Cucumber world. (crb = cucumber + irb)                                                                                                                                                                                                                                    |
| [Cucable](https://github.com/trivago/cucable-plugin)                                                            | Maven plugin that simplifies running Cucumber Scenarios in parallel.                                                                                                                                                                                                                                  |
| [Cucapp](https://github.com/cappuccino/cucapp)                                                                  | Cucumber integration with Cappuccino.                                                                                                                                                                                                                                                        |
| [Cucover](https://github.com/mattwynne/cucover)                                                                 | Coverage-aware lazy / selective Cucumber Feature runnner                                                                                                                                                                                                                                     |
| [Cucumber-cpp](https://github.com/cucumber/cucumber-cpp)                                                        | Cucumber for C                                                                                                                                                                                                                                                                               |
| [Cucumber.el](https://github.com/michaelklishin/cucumber.el)                                                    | [Emacs](https://www.gnu.org/software/emacs/) mode for editing Cucumber plain text stories.                                                                                                                                                                                                    |
| [Cucumber Factory](https://github.com/makandra/cucumber_factory/tree/master)                                    | Create Rails model records without writing Step Definitions.                                                                                                                                                                                                                                 |
| [Cucumber Forge](https://github.com/cerner/cucumber-forge-desktop)                                              | Generate static Cucumber reports using the Electron app or build your own integration with the [NPM library](https://github.com/cerner/cucumber-forge-report-generator).                                                                                                                                                                                    |
| [Cucumber Growler](https://github.com/paolodona/cucumber_growler)                                               | [Growl](http://growl.info/) notifications for Cucumber.                                                                                                                                                                                                                                      |
| [Cucumber Nagios](https://auxesis.github.io/cucumber-nagios)                                                     | Web site monitoring with Cucumber and [Nagios](https://www.nagios.org/)                                                                                                                                                                                                                       |
| [Cucumber REST Gherkin library for Spring](https://github.com/Ragin-LundF/bbd-cucumber-gherkin-lib)             | Library with predefined Gherkin sentences for testing REST APIs with Spring |
| [cucumber-runner](https://plugins.gradle.org/plugin/se.thinkcode.cucumber-runner)                               | A Gradle Cucumber-JVM runner, it may simplify running Cucumber steps in parallel                                                                                                                                                                                                             |
| [cucumber-rust](https://github.com/bbqsrc/cucumber-rust) | An implementation of the Cucumber testing framework for Rust. Fully native, no external test runners or dependencies. |
| [Cucumber Scaffold](https://github.com/andyw8/cucumber_scaffold)                                                | Scaffolding gem for Cucumber Features                                                                                                                                                                                                                                                        |
| [CucumberTFS](https://github.com/mscottford/cucumbertfs)                                                        | Converts Team Foundation Server (TFS) Scenarios into Cucumber Scenarios in a single Feature file.                                                                                                                                                                                            |
| [Cucumber TM Bundle](https://github.com/bmabey/cucumber-tmbundle/tree/master)                                   | Feature syntax highlighting and other useful commands for [TextMate](https://macromates.com/.)                                                                                                                                                                                                |
| [Clucumber](https://github.com/antifuchs/clucumber)                                                             | Support for writing Cucumber Step Definitions in Common LISP, testing Common LISP code.                                                                                                                                                                                                      |
| [cuke_cataloger](https://github.com/enkessler/cuke_cataloger)                                                   | Add unique identifiers to every test case in your suite                                                                                     |
| [cuke_commander](https://github.com/enkessler/cuke_commander)                                            | Dynamically generate Cucumber command lines                                                                                                           |
| [cuke_linter](https://github.com/enkessler/cuke_linter)                                                         | Linting tool for '.feature' files                                                                                                                 |
| [cuke_modeler](https://github.com/enkessler/cuke_modeler)                                                       | Abstraction layer that sits on top of `gherkin` as a stable base upon which to build other tooling                                                 |
| [cuke_slicer](https://github.com/enkessler/cuke_slicer)                                                  | Breaks a Cucumber suite into the most granularly executable pieces for better parallelization                                                      |
| [Cuke4AS3](https://github.com/flashquartermaster/Cuke4AS3)                                                      | Actionscript                                                                                                                                                                                                                                                                                 |
| [Cuke4Nuke](https://github.com/richardlawrence/Cuke4Nuke)                                                       | Support for writing Cucumber Step Definitions in .NET.                                                                                                                                                                                                                                       |
| [Cuke4Lua](https://github.com/dgfitch/Cuke4Lua)                                                                 | Wire protocol implementation for [Lua](https://www.lua.org/)                                                                                                                                                                                                                                  |
| [Cuke4PHP](https://github.com/olbrich/cuke4php)                                                                 | Support for writing Cucumber Step Definitions in PHP, testing PHP code.                                                                                                                                                                                                                      |
| [Cuke4Vs](https://github.com/henritersteeg/cuke4vs)                                                             | Syntax highlighting, intellisense and other editing support for Feature files in Visual Studio 2008.                                                                                                                                                                                         
| [Cukedoctor](https://github.com/rmpestano/cukedoctor)                                                           | Enables [Asciidoc](https://asciidoctor.org/docs/what-is-asciidoc/) markup on Cucumber features for creating readable living documentation.
| [Cuki](https://github.com/andyw8/cuki)                                                                          | Pull Cucumber Features from a Confluence wiki into Feature files                                                                                                                                                                                                                             |
| [Culerity](https://github.com/langalex/culerity/tree/master)                                                    | Integrates Cucumber and Celerity to test Javascript in webapps.                                                                                                                                                                                                                              |
| [daml-cucumber](https://github.com/obsidiansystems/daml-cucumber/tree/main)                                                    | Native cucumber testing for daml smart contracts.                                                                                                                                                                                                                                         |
| [DatabaseCleaner](https://github.com/bmabey/database_cleaner/tree/master)                                       | Different strategies for keeping your DB clean to ensure a clean state. Has Cucumber support out of the box.                                                                                                                                                                                 |
| [Eclipse plugin](https://github.com/cucumber/cucumber-eclipse)                                                  | Eclipse plugin for Cucumber                                                                                                                                                                                                                                                                  |
| [ecucumber](https://github.com/jabberbees/ecucumber)                                                                      | An open source port of Cucumber for Erlang                                                                                                                                                                                                    |
| [Ecukes](https://github.com/ecukes/ecukes)                                                                      | Emacs package that makes it possible to write Cucumber like tests for your Emacs packages                                                                                                                                                                                                    |
| [egherkin](https://github.com/jabberbees/egherkin)                                                                      | An Erlang library for parsing Gherkin documents                                                                                                                                                                                                    |
| [EmailSpec](https://github.com/bmabey/email-spec)                                                               | Collection of [RSpec](https://rspec.info) matchers and Cucumber Steps for testing email in a Rails app                                                                                                                                                                                        |
| [fbrp](https://github.com/diabolo/fbrp/tree/master)                                                             | Sample Rails app of Cucumber showing how to use with restful-authentication.                                                                                                                                                                                                                 |
| [features2](https://www.npmjs.com/package/features2)                                                   | features2 is a simple script that creates HTML and PDF based documentation from Cucumber features. Note that the documentation is generated from the source Cucumber feature files, and NOT from the test results (there are plenty of other tools that can do that).                                                                                          |   
| [cucumber-json-2-pdf](https://www.npmjs.com/package/cucumber-json-2-pdf)                               | This project aims to generate PDF reports based on cucumber json reports                                                                                    |   
| [Features2Cards](https://github.com/brynary/features2cards)                                                     | Create PDFs from Cucumber Features and Scenarios for printing.                                                                                           | 
| [Frank](https://www.testingwithfrank.com/)                                                                       | Test iPhone/iPad applications using Cucumber                                                                                                                                                                                                                                                 |
| [Gizmo](https://github.com/icaruswings/gizmo)                                                                   | A page model testing framework                                                                                                               |
| [Gherkin Editor for Windows](https://www.microsoft.com/en-us/p/gherkin-editor/9pnskl00xc40)                     | Desktop app that has Excel-style editing for tables                                                                                                                                                                                                                          |
| [Gherkin.mode for Coda2](https://github.com/takaxi/gherkin.mode/)                                               | Plugin for Coda2 that highlights syntax keywords of `.feature` file                                                                                                                                                                                                                          |
| [Gherkin lint](https://github.com/vsiakka/gherkin-lint)                                                         | Uses Gherkin to parse feature files and runs linting against the default rules, and the optional rules you specified in your .gherkin-lintrc file. |
| [Gherkingen](https://github.com/hedhyw/gherkingen) | Behaviour Driven Development (BDD) tests generator for Golang. |
| [Ghokin](https://github.com/antham/ghokin)                                                                      | Format and apply transformation on gherkin files                                                                                            |
| [Gocure](https://gitlab.com/rodrigoodhin/gocure)                                               | Gocure is a library that offers the possibility to generate beautiful html reports and it is also possible to embed any file in your Cucumber json reports. This can be done importing in a go project, executing a binary, calling a REST API or in a frontend using our docker container.                                                                                                                                                                                                                              |
| [Groundwork](https://github.com/hectoregm/groundwork/tree/master)                                               | Rails Template using Authlogic that comes with Cucumber Features                                                                                                                                                                                                                             |
| [Guard::Cucumber](https://github.com/guard/guard-cucumber)                                                      | Guard::Cucumber automatically runs your Features (much like autotest)                                                                                                                                                                                                                        |
| [Gutkumber](https://github.com/danlucraft/gutkumber)                                                            | Integration testing for [Ruby-GNOME2](https://ruby-gnome2.osdn.jp/.)                                                                                                                                                                                                                   |
| [Gwen](https://github.com/gwen-interpreter/gwen-web/)                                                           | A Gherkin interpreter for web automation ([Selenium](https://selenium.dev/) wrapper)                                                                                                                                                                                                                                       |
| [jEdit Cucumber Mode on github](https://github.com/graza/jEditCucumberMode)                                     | jEdit mode to add multi-lingual syntax highlighting for `.feature` files                                                                                                                                                                                                                     |
| [Jeweler](https://github.com/technicalpickles/jeweler)                                                          | Craft the perfect RubyGem - with built-in Cucumber support                                                                                                                                                                                                                                   |
| [JSON_spec](https://github.com/collectiveidea/json_spec)                                                        | RSpec matchers and Cucumber `Then` Steps for validating JSON format data, especially useful for RESTful API Scenarios.                                                                                                                                                                       |
| [Melomel](https://github.com/benbjohnson/melomel)                                                               | ActionScript, Flex and Air support for Cucumber                                                                                                                                                                                                                                              |
| [NetBeans IDE (B)](https://github.com/QuBiT/cucumber-netbeans-plugin)                                           | Syntax highlighting                                                                                                                                                                                                                                                                          |
| [NewGem](https://github.com/drnic/newgem)                                                                       | Use `newgem -i cucumber` to generate a bunch of helpful Scenario Steps for gem development                                                                                                                                                                                                   |
| [OCCukes](https://github.com/royratcliffe/OCCukes)                                                              | Objective-C wire protocol implementation. Can be used for testing native iOS and Mac apps.                                                                                                                                                                                                   |
| [Online Gherkin Formatter and Validator](https://www.assertthat.com/gherkin_editor#erlang-dark)  | Free online Gherkin editor, formatter and syntax validator. Website [AssertThat](https://www.assertthat.com/)   |
| [Pickle](https://github.com/ianwhite/pickle/tree/master)                                                        | Model creation/reference in Cucumber - optionally leveraging your factories/blueprints                                                                                                                                                                                                  |
| [Pickler](https://github.com/tpope/pickler/tree/master)                                                         | Synchronize user stories in [Pivotal Tracker](https://www.pivotaltracker.com/) with Cucumber Features.                                                                                                                                                                                        |
| [Pickles Docs](https://www.picklesdoc.com/)                                                                      | Takes your specification (written in Gherkin, with Markdown descriptions) and turns them into an always up-to-date documentation of the current state of your software - in a variety of formats (HTML SPA, Static HTML, JSON, Word .docx, Excel)                                  |
| [Pitest-Cucumber-Plugin](https://github.com/alexvictoor/pitest-cucumber-plugin)                                 | Cucumber integration for mutation testing tool PIT                                                                                                      |
| [Rcumber](https://github.com/christophermoura/rcumber)                                                          | RCumber is a Rails plugin that gives your customers a web interface where they can view, edit and run Cucumber tests directly on your Rails project. No update since 2008                                                                                                                    |
| [Relish](https://relishapp.com)                                                                                  | Relish allows you to browse, search, and share your Cucumber Features on the web as living documentation. Supports public and private projects.                                                                                                                                              |
| [RSpec](https://rspec.info)                                                                                      | Use RSpec's `Object.should` and `Object.should_not` to compare values in your Step Definitions                                                                                                                                                                                               |
| [rSquery](https://github.com/caifara/rsquery)                                                                   | Using jQuery matchers and more in Selenium. Aims to reduce the difficulties involved in writing Selenium tests in Cucumber environments for webapps that use jQuery.                                                                                                                         |
| [JetBrains RubyMine](https://blog.jetbrains.com/ruby/tag/cucumber/)                                             | Syntax highlighting and Test Runner UI                                                                                                                                                                                                                                                       |
| [Schmorgurken](https://github.com/schmorgurken/schmorgurken)                                                    | Native Clojure Gherkin implementation (mostly compatible with Cucumber) that integrates with clojure-test                                                                                                                                                                                    |
| [selenium-webdriver](https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings)                                 | Developer-focused browser automation tool for IE, Firefox, Chrome                                                                                                                                                                                                                            |
| [SpecFlow Online Gherkin Editor](https://specflow.org/gherkin-editor/)                                          | Simple Gherkin editor that enables you to quickly write, download and share feature files and scenarios – without any hassle, no content tracking                                                                                                                                     |
| [Swinger](https://github.com/demetriusnunes/swinger/tree/master)                                                | Write acceptance tests for Java/Swing Desktop apps using Cucumber!                                                                                                                                                                                                                           |
| [Testjour](https://github.com/brynary/testjour)                                                                 | Distributed test running (for Cucumber first).                                                                                                                                                                                                                                               |
| [theGardener](https://kelkoogroup.github.io/theGardener/)                                                        | A web application to retrieve features from a large number of projects, to organize them and generate proper documentation based on those BDD features.                                                                                                                                                                                                                             |
| [Tidy Gherkin](https://chrome.google.com/webstore/detail/tidy-gherkin/nobemmencanophcnicjhfhnjiimegjeo?hl=en-GB)                                                        | Google Chrome browser extension, that helps in step definition generation, Gherkin step and table formatting.                                                                                                                                                                                                                            |
| [unobtainium-cucumber](https://github.com/jfinkhaeuser/unobtainium-cucumber)                                    | Integrate Cucumber with configuration driven Selenium or Appium drivers.                                                                                                                                                                                                                     |
| [VCR](https://github.com/vcr/vcr)                                                                               | Record and replay HTTP responses for fast, deterministic, accurate tests. Cucumber integration provided through the use of Tags.                                                                                                                                                      |
| [Vim-Cucumber](https://github.com/tpope/vim-cucumber/tree/master)                                               | Feature syntax highlighting for [Vim](https://www.vim.org/.)                                                                                                                                                                                                                                  |
| [Webrat](https://github.com/brynary/webrat/wiki)                                                                | Interact with a web application from Ruby. Works with Rails, and other web frameworks.                                                                                                                     |
| [Webrat TM Bundle](https://github.com/bmabey/webrat-tmbundle/tree/master)                                       | Collection of TextMate snippets for the webrat API.                                                                                                                                                                                                                                          |
| [Watir](http://watir.com/)                                                                                      | An open source Ruby library for automating tests. Watir interacts with a browser the same way people do: clicking links, filling out forms and validating text.                                                                                                                              |
| [WatirCraft](https://github.com/bret/watircraft/wiki)                                                           | Web testing framework with Cucumber integration that builds on Watir.                                                                                                                                                                                                                        |
| [watircuke](https://github.com/richdownie/watircuke/tree/master)                                                | Cucumber and H30 (watir, safariwatir, firewatir)                                                                                                                                                                                                                                             |
| [YARD-Cucumber](https://github.com/burtlo/yard-cucumber)                                                        | Feature documentation integration with [YARD](https://yardoc.org/)                                                                                                                                                                                                                            |

---

## File: content/docs/tools/ruby.md

---
title: Ruby Tools
weight: 1300
---

This page describes tools for a Ruby or Ruby on Rails environment.

# IDEs


## RubyMine
[RubyMine](https://www.jetbrains.com/help/ruby/meet-rubymine.html) is a Ruby and Rails IDE.

# Build tools

Cucumber can be run in several ways.
Be aware that `rake cucumber`, `cucumber features`, and `autotest` with `ENV AUTOFEATURE=true` do not necessarily produce
the same results given the same features and step definitions.

## Rake

Running `rake cucumber` from the command line provides the simplest method to run Cucumber tests.

Using Rake requires a `Rakefile` with a `features` task definition. For example:

```ruby
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'

Cucumber::Rake::Task.new(:features) do |t|
  t.cucumber_opts = "--format pretty" # Any valid command line option can go here.
end
```

This will run all the Features with the pretty formatter.

Note, how we use the `cucumber_opts` accessor to define our arguments passed to Cucumber.

If you are using [Ruby on Rails](#ruby-on-rails), this task is defined for you already.

Now you can run Cucumber with Rake:

```shell
rake features
```

The rake script provided with Cucumber performs much of the background magic required to get the test database and requisite
libraries properly loaded.
In fact, an important habit to acquire is to run Cucumber as a `rake` task immediately after performing a migration.
This ensures that the test database schema is kept in sync with the development database schema.
You can achieve the same effect by running `rake db:test:prepare` before your first Cucumber run following a migration
but developing the habit of running `rake cucumber` or `rake cucumber:wip` is probably the better course.

The Cucumber Rake task recognises the `@wip` Tag, so `rake cucumber:wip` will run only those scenarios tagged with **@wip**.

For example, given a feature file containing:

```
Feature: .  .  .

  Scenario: A

  @wip
  Scenario: B

  Scenario: C
```

Then running the command `rake cucumber:wip` will run the Steps contained inside Scenario B only,
while running `rake cucumber:ok` will run the Steps within all Scenarios other than B.

### Using Profiles in Rake Tasks

For complex Feature runs that are tested often, it is nice to save the command line arguments as [Cucumber profiles](/docs/cucumber/configuration#profiles).

Once you have some profiles defined, you can use them in your Rake tasks, like so:

```ruby
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'

namespace :features do
  Cucumber::Rake::Task.new(:non_js) do |t|
    t.profile = "webrat"
  end

  Cucumber::Rake::Task.new(:selenium) do |t|
    t.profile = "selenium"
  end
end
```

### Guarding Your production machines From Cucumber

Since Rake tasks are used on development and productions systems, it is generally a good idea to place a guard around your Cucumber task so your productions boxes don't need to install Cucumber.

Below is an example of how to do this. This example is the Rake task that Cucumber generates for Rails projects, but the same idea applies to any project using Cucumber and Rake:

```ruby
require 'rubygems'

begin
  require 'cucumber'
  require 'cucumber/rake/task'

  Cucumber::Rake::Task.new(:features) do |t|
    t.cucumber_opts = "--format pretty"
  end

  task features: 'db:test:prepare'
rescue LoadError
  desc 'Cucumber rake task not available'
  task :features do
    abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
  end
end
```

## Ruby on Rails

### cucumber-rails

[cucumber-rails](https://github.com/cucumber/cucumber-rails) is a RubyGem which
brings Ruby on Rails Generators for Cucumber with special support for Capybara
and DatabaseCleaner.

#### Installing

The `cucumber:install` generator sets up Cucumber in your Rails project. It
generates the necessary files in the `features/` directory. After
running this generator you will also get a new rake task called `cucumber`.

For more details, see `rails generate cucumber:install --help`.

#### Usage

By default, `cucumber-rails` runs `DatabaseCleaner.start` and
`DatabaseCleaner.clean` before and after your Cucumber scenarios. This default
behavior can be disabled. See the
[cucumber-rails README](https://github.com/cucumber/cucumber-rails) for details.

#### Resources

To learn more of the tools being integrated and assisted by `cucumber-rails`,
see the READMEs of
[DatabaseCleaner](https://github.com/DatabaseCleaner/database_cleaner) and
[Capybara](https://github.com/teamcapybara/capybara).

---

## File: content/docs/terms/_index.md

---
title: Terminology
menu: main
collapseChildren: true
iconClass: far fa-book
---

There's loads of new terminology and jargon to learn as you learn about Cucumber and BDD. Here you'll find definitions of the common terms.