Automation Testing · Cucumber

Install Cucumber Plugin for IntelliJ

Hello Everyone, in this post will learn about how to install Cucumber plugin for IntelliJ.

Cucumber plugin enables support with feature files and step definitions written in JAVA. The following coding assistance features are available:

  • Error and Syntax highlighting
  • Navigation in the source code
  • Code completion
  • Indentation
  • Search for usages
  • Commenting & Uncommenting lines

Pre-requisite : 

To install Cucumber plugin for JAVA, we need to create a project in IntelliJ.

Create New Project in IntelliJ

Step 1: Launch IntelliJ by double-clicking the application

Step 2: Click Create New ProjectNew Project

Step 3: In the next screen,

  1. Select Gradle
  2. IntelliJ automatically adds Project SDK (JDK)
  3. JAVA (Default option)
  4. Click Next

Project

Step 4: Enter ArtifactId and Click Next

Note: ArtifactId is basically our Project Name

ProjectName

Step 5: In the next screen,

  • Select auto-import (Option to resolve all changes made to Gradle project automatically)
  • Select Create separate module per source set (Default Option)
  • Use default gradle wrapper (Default option)
  • Click Next

AutoImport

Step 6: Click Finish

Step 7: New Project has been created successfully

IntelliJ Project

If you don’t see the “src” folder like above, please follow the below steps,

Click IntelliJ -> Preferences on the top menu bar in MacPreferences

Type “Gradle” in search bar and in the right-side panel -> Select “Create directories for empty content roots automatically” option

Gradle Option

After selecting the option, Click Apply and OK.

Hopefully, you should be able to see the “src” folder now!

Install Cucumber Plugin for JAVA

Step 1: Click IntelliJ -> Preferences on the top bar menu in Mac

Preferences

Step 2: In the next screen,

  1. Select Plugin
  2. Click Browse Repositories

Plugins

Step 3: In the next screen,

  1. Type Cucumber in the search bar
  2. Select Cucumber for JAVA plugin
  3. Click Install

Install Cucumber Plugin for IntelliJ

Step 4: Click Yes in the dependency prompt

Note: Gherkin Plugin provides support for Gherkin Language Gherkin

Step 5: Restart IntelliJ so that our changes are implemented

Cucumber Plugin for JAVA has been installed successfully!!

Suggested Reading: Top 30 Cucumber Interview Questions & Answers

Know anyone who would like to learn Cucumber for enhancing their skills?  Let them know by sharing this article on Facebook, Twitter, or Google Plus.

Leave a Reply

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