Cucumber with Selenium -Ruby

Cucumber is a tool for running automated acceptance tests written in a behavior driven development (BDD) style. Cucumber is written in the Ruby programming language. Cucumber works with Ruby, Java, .NET, Flex or web applications written in any language. It has been translated to over 40 spoken languages.
Pre-requisites:  Ruby, cucumber, Selenium driver, Capybara, Ruby Gems.
A Feature file describes the behavior and expected outcomes. Cucumber uses these files to validate some system functionality against its specifications. Feature files are plain-text files.
Create a folder ‘support’ and create a ruby file into created folder and keep the automated business scenario’s method in that file.
After that we need to create step definition file, in that file we can define the definition of each statement, which were described in Feature file.  And call the scenario method in the step definition file.
Run below command to execute the cucumber script:
bundle exec cucumber -f junit –out Report -r features/support/ -r features/step_definitions     

Please feel free to post queries or share your views related to above.
Rohit Singh

Get A Free Quote