Here is a roadmap of components that need to be installed to make Cucumber work

Install Ruby and DevKit Install Cucumber Install IDE RubyMine Install watir-webdriver First Cucumber Script

Install Ruby and DevKit

Step1) Got to https://rubyinstaller.org/downloads/

Step 2) Open the downloaded file.

Accept license Click on Next button

Step 3) In next screen.

Select your Installation Directory Select all Options Click Install

Step 4) In the following screen, Click on Next

Step 5) Wait for installation to complete.

Step 6) Click Finish

Step 7) Once installation is complete, Lets Run Ruby!

Step 8) You will see Ruby Command prompt similar to Windows cmd.

Install Cucumber

Step 1) Type in Ruby cmd “gem install cucumber”. This command will download and install Cucumber at command line itself

After few seconds cucumber installation procedure has been start

Step 2) To verify cucumber is installed successfully or not just type “cucumber –version”

Install IDE RubyMine

Step 1)

Step 2)

Step 3)

Step 4)

Step 5)

Step 6)

Step 7)

Step 8)

Step 9)

Step 10)

Step 11)

Step 12)

Install watir-webdriver

Step 1) Click on “Start Command Prompt With ruby” and install command “gem install watir-webdriver”

Step 2) watir-webdriver install successfully

First Cucumber Script

Step 1) Open RubyMine Editor via windows start menu

You will See Rubymine Dashboard as below

Step 2) Create a new project in Rubymine editor

Step 3) create a file directory

Step 4) create and Save File in “yourfolder/features/” with name “yourfilename.feature”

Step 5) To execute our scenario, save the following commands in the Feature File

Code: Step 6) Now lets Run our First feature file.! Click on “Start Command Prompt With ruby”

It will look like this!

Step 7) Lets create step definition file for our Feature File! Create a new folder in Rubymine editor

Step 8) Save File As below in “yourfolder/features/step_definititons” with name test_step.rb

Step 9) Write the following code into the step file

Code : Step 10) Now, again run our feature file:

The result is