Cucumber installation could be tiresome but its relatively easy.
Here is a roadmap of components that need to be installed to make Cucumber work
PART A) Install Ruby:
Step 1) Got to http://rubyinstaller.org/downloads/
Select a package as per your OS Version
If you have 32bit version OS than click on Ruby2.0.0-p451 or have a 64bit OS then click on Ruby2.0.0-p451(x64)
Once download is complete, start the installation. Select Your Preferred language For Installation
Step 2) Accept license and click on next
Step 3) Select your Installation Directory & Select all Options
Step 4) Wait for installation to complete.
Step 5) Once installation is complete After install ruby Lets Run Ruby!
Step 6) You will see Ruby Command prompt same as windows cmd.
Part B Install Ruby Development Kit
Step 1) Download Development kit here . Development kit should be same version as that of Ruby you downloaded.
Step 2) The development kit is in .7zip format file and when you execute it ask for extract file. Just choose any directory you want extract and extract it
Step 3) Now in extracted folder you see dk.rb file. it is development kit installation file, we need it when we install development kit in ruby.
Step 4) Go back to Ruby cmd prompt. And locate development kit directory in cmd which you extracted for development kit.
Step 5) Now type command "ruby (your development kit path) dk.rb init" to initialize process of development kit as shown in image.
Step 6) Next, we have to install development kit. Type command in cmd "ruby (your development kit path)dk.rb install" for installation.
Step 7) Devkit installation completed:
PART C) 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"
PART D) Install IDE
To write Cucumber Test Scripts, you need IDE
There are two popular GUI based script editor for Windows which can be used for Cucumber - .
1. Ruby mine: You can download from http://www.jetbrains.com/ruby/download/
2. Komodo edit 1.8 You can download from http://www.activestate.com/komodo-ide/downloads
Step 1) Open Downloaded Setup file and Click On next
Step 2) Accept license agreement
Step 3) Select directory for installation and click on next
Step 4) Click on next to install
Step 5) Installation process starts
Step 6) Komodo install successfully
PART E) Installation For AnsiCon:
In command prompt
- A "Pass" Cucumber Test Case is shown in Green
- A "Fail" Cucumber test case is shown in Red
To show colorized text in cmd prompt you have to install Ansicon tool. You can download
Step 1) Download Ansicon here
Step 2) Select a folder as per your windows OS versions
Step - 3) Execute file ansicon
AnsiCon installed successfully
PART F) Installation Watir
Watir is used for Web Automation in Cucumber
To install Watir , in ruby cmd type "gem install watir"
PART G) rspec Installation
It is used to run additional libraries of cucumber for test run.
To install rspec, in ruby cmd type "gem install rspec"
PART H) colorize Installation
It helps to colorize error syntax
To install colorize, in ruby cmd type "gem install colorize"
Finally you are done and all set J