---Advertisement---

How to Download and Install Cucumber on Windows [Step-by-Step Guide] Best 2025

By Manisha

Updated On:

---Advertisement---
How to Download and Install Cucumber

Meta Description:

How to Download and Install Cucumber: Learn how to install Cucumber on Windows with this complete guide. Includes installation of Ruby, DevKit, RubyMine IDE, watir-webdriver, and how to run your first Cucumber feature file and step definitions.


How to Download and Install Cucumber: Installing Cucumber on a Windows machine can seem complex, but it’s fairly straightforward if you follow the right steps. This guide provides a complete roadmap — from installing Ruby and DevKit to running your first Cucumber test script in RubyMine IDE.


How to Download and Install Cucumber: Before you begin, ensure you have the following:

  • A Windows operating system (Windows 10 or later recommended)
  • Internet connection to download packages
  • Admin privileges on your PC

How to Download and Install Cucumber: Cucumber requires Ruby as its base language.

  1. Visit the official Ruby downloads page:
  2. Download the recommended Ruby+DevKit version for Windows.
  3. Run the downloaded .exe file.
  4. Accept the license and click Next.
  5. Choose your installation directory and select all options.
  6. Click Install and wait for it to complete.
  7. Click Finish once the setup is done.
  8. Launch the Ruby Command Prompt (a command-line interface for Ruby).

  1. Open Ruby Command Prompt.

Type the following command:

bash

gem install cucumber

  1. Wait for the Cucumber gem to download and install.

To verify the installation, type:

bash

cucumber –version

  1.  This should display the installed version of Cucumber.

How to Download and Install Cucumber: RubyMine is an advanced IDE by JetBrains for Ruby development.

  1. Download RubyMine from
  2. Run the installer and follow these steps:
    • Click Next
    • Choose the install location
    • Configure installation options
    • Choose Start Menu folder
    • Click Install
    • Click Finish
  3. On the first launch:
    • Select Do not import settings
    • Click Evaluate for free
    • Accept the license agreement
    • Click Skip All and Set Defaults
    • RubyMine will now launch
  4. Create a new Ruby project via File > New Project

How to Download and Install Cucumber: watir-webdriver allows browser automation using Ruby.

In Ruby Command Prompt, type:

bash

gem install watir-webdriver

  1. Wait until the installation is complete.

Project Setup

  1. Open RubyMine IDE
  2. Create a new project (e.g., CucumberTest)

Inside the project folder, create a subfolder:

nginx

features

Inside features, create a new file:


yourfilename.feature

Sample Feature File

Add the following content to your .feature file:

gherkin

Feature: Sample Login

Scenario: Successful Login

  Given I launch the browser

  When I open the login page

  Then I should see the homepage


How to Download and Install Cucumber: Inside the features folder, create a subfolder:

nginx

step_definitions

  1. Create a new Ruby file named test_step.rb
  2. Add the following step definition code:

ruby

Given(‘I launch the browser’) do

  puts ‘Browser launched’

end

When(‘I open the login page’) do

  puts ‘Login page opened’

end

Then(‘I should see the homepage’) do

  puts ‘Homepage displayed’

end


  1. Open Ruby Command Prompt

Navigate to your project directory:

bash

cd path\to\your\project

Run the feature file using:

bash

cucumber

You will see the scenario steps executed with the messages from the puts statements.


If everything is installed correctly, Cucumber will execute your feature file and display step-by-step results. This confirms that your environment is set up and ready for Cucumber-based BDD test automation.


ComponentPurpose
Ruby & DevKitBase programming environment
CucumberBDD test framework
RubyMine IDECode editor and test runner
watir-webdriverWeb browser automation library

Cucumber Framework

jetbrains.com/ruby

Leave a Comment

Index