Complete Eclipse Setup for Cucumber

Previously, in my Cucumber with the Selenium series, we have seen different types of files and keywords necessary for being the part of cucumber framework. You can find the link here. Moving forward, in this blog we will see Complete Eclipse Setup for Cucumber and convert the same thing into code.

Step wise guide to setup cucumber framework

Step 1 :
Let’s start creating a maven project in Eclipse Setup e for Cucumber say CucumberDemo. Make sure to give the correct group Id and artifact Id. So, this will create a new project with a pom.xml file.

Step 2 :
Open pom.xml file and you will be able to see dependencies section.
In the <dependencies> section, add the following dependencies

In cucumber we have so many jar files to write multiple assertions and runner classes. So we need compatible version of following cucumber dependencies :

  • cucumber-java

Step 3 :
Download the chromeDriver.exe supported by your latest version of your chrome browser.

Step 4 :
Make three different packages under src/main/java. Let’s name as per conventions and so the project will look like this.

So you are done with a template setup for cucumber framework project. In my upcoming blogs, you will be seeing a sample feature file, step definition file and test runner file.

References :
https://www.udemy.com/course/automate-tests-using-selenium-webdriver-with-java-cucumber/learn/lecture/7950332?start=90#notes
http://www.automationtestinghub.com/cucumber-eclipse-project/

Knoldus-blog-footer-image
Knoldus-blog-footer-image

Group of smart Engineers with a Product mindset who partner with your business to drive competitive advantage | www.knoldus.com