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 :
- Download and Install JAVA
- Download and Install IntelliJ
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 Project
Step 3: In the next screen,
- Select Gradle
- IntelliJ automatically adds Project SDK (JDK)
- JAVA (Default option)
- Click Next
Step 4: Enter ArtifactId and Click Next
Note: ArtifactId is basically our Project Name
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
Step 6: Click Finish
Step 7: New Project has been created successfully
If you don’t see the “src” folder like above, please follow the below steps,
Click IntelliJ -> Preferences on the top menu bar in Mac
Type “Gradle” in search bar and in the right-side panel -> Select “Create directories for empty content roots automatically” 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
Step 2: In the next screen,
- Select Plugin
- Click Browse Repositories
Step 3: In the next screen,
- Type Cucumber in the search bar
- Select Cucumber for JAVA plugin
- Click Install
Step 4: Click Yes in the dependency prompt
Note: Gherkin Plugin provides support for Gherkin Language
Step 5: Restart IntelliJ so that our changes are implemented
Cucumber Plugin for JAVA has been installed successfully!!
Suggested Readings:
Top 30 Cucumber Interview Questions & Answers
Steps to automate two-factor authentication (2FA) using selenium
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.