Creating a Ruby Cucumber Project

Creating a Ruby Cucumber Project

This is our first blog post on Ruby Cucumber automation testing and as a test automation services company, we would like to share basic and advanced techniques of automation testing with software testing & quality assurance communities.

In this article, we will show you how to create a feature file and implementation code using RubyMine. Before following up the below steps, make sure you have already configured RubyMine

Step1-Create Empty Ruby Project

File->New Project



Step2-Create Gem file

Select project directory, right click and click New->File

Create Gem file with the following Gem details as shown below.

Note: These Gem details will be published in our next article.



Step3-Directory Structure

Create sub folders as shown below

—>features

————->Project1

——————->feature

——————->pages

——————->step_definitions

————->Support




Step4-Create Shared Driver

Create SharedDriver.rb inside Support folder with the following code.




Step5-Create Feature file

Create sample.feature file inside feature folder with the below steps




Step6-Create Step Definitions

Create Step Definitions with pending steps




Step7-Create Page Object




Step8-Call Page Methods in Step Definitions




Step9-Create cucumber.yml file

Create cucumber.yml file inside project directory as shown below




Step10-Run the feature file



Once execution is done, open the report file

You will see the report as shown below



In the subsequent articles, we will share more topics and advanced techniques. Stay tuned!

Leave a Reply

Your email address will not be published. Required fields are marked *