Ruby With Cucumber
Ruby is a dynamic interpreted object oriented language in which each and every thing is considered as an object which can be overwritten. It is one of the easiest languages to read and write.
What are the advantages of Ruby?
- It is easy to understand
- It is an object-oriented language
- It has powerful class of library
- It is having massive online support
What is cucumber?
Cucumber is a tool based on Behaviour Driven Development framework which is used to write the acceptance tests for web application. It is written in Ruby.
How to install Ruby with Cucumber?
The step by step process to install how cucumber works with Ruby:
- Install Ruby
Goto Ruby Installer download page
Download the version best suited for the operating system.
Run the download exe and during the installation process check the option “Add Ruby” as shown
- Download and extract Dev kit
Go to Ruby Installer download page. Download the Devkit version which is best suited for the operating system( 32 or 64 bit)
Extract the Devkit at C:\Ruby\devkit folder
Open the command prompt. Inside the Ruby Devkit run the command
C:\Ruby\devkit> ruby dk.rb init
C:\Ruby\devkit> ruby dk.rb install
- Install cucumber and other Ruby gem
To install cucumber first thing to be done is update the current gem setup
C:\Users\Admin> gem update –system
Installing the gems which need for cucumber web application testing.
C:\Users\Admin> gem install –no-ri –no-rdoc rspec
C:\Users\Admin> gem install –no-ri –no-rdoc win32console
C:\Users\Admin> gem install –no-ri –no-rdoc watir-webdriver
C:\Users\Admin> gem install –no-ri –no-rdoc cucumber
- Install IDE-KOMODO
Download the free trial installer. Double click on the downloaded exe
Follow the installation steps and finish and open IDE.
Install watir by typing “gem install watir” in the command prompt and the run the command.
Install rspec type the following code “gem install rspec” and run the command.