Installation of cucumber

Setting up Cucumber is very simple. You will need to install below tools.
  • Java JDK
  • Java IDE – IntelliJ IDEA or Eclipse
  • Cucumber library
  • Build tools like Maven or gradle
  • IntelliJ IDEA Plugins – Gherkin and cucumber for Java
Create a simple Maven or gradle project and add below dependency.
 
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
<scope>test</scope>
</dependency>

For writing the test steps using lambda expression in Java 8, you will have to add below dependency.
 
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java8</artifactId>
<version>1.2.4</version>
<scope>test</scope>
</dependency>

You also need below JUnit dependencies to integrate Cucumber with JUnit.
 
<dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>info.cukes</groupId>
      <artifactId>cucumber-junit</artifactId>
      <version>1.2.4</version>
      <scope>test</scope>
    </dependency> 

Web development and Automation testing

solutions delivered!!