How to install Cucumber Eclipse Plugin - H Y R Tutorials

How to install Cucumber Eclipse Plugin

Share This
How to install Cucumber Eclipse Plugin

What is Cucumber plugin?

Cucumber plugin is an eclipse plugin which allows eclipse to understand the gherkin syntax.

Why do we need to install cucumber plugin?

When we are working with cucumber we will write the feature files.
These feature files uses gherkin language, which consists below keywords:
  • Feature
  • Scenario
  • Given
  • When
  • Then
  • And
  • Examples

So by default eclipse doesn't understand these keywords so it doesn't show any syntax highlighter.

Will understand with the real time scenario as below.
When we create a feature file in eclipse it looks something like below

How to install Cucumber Eclipse Plugin

here you can observe that eclipse is not highlighting any of the gherkin keywords, it is showing the entire feature file in plain text.

This is due to eclipse doesn't know what is actually present in its editor.

So it is our duty to install the external plugin to make eclipse understand that the text present in that feature file is of gherkin language.

For that purpose only cucumber has released the software in the form of plugin which is supported by eclipse.

How to install Cucumber plugin?

Open the eclipse software and from Help menu, click on 'Install New Software' as shown below.

How to install Cucumber Eclipse Plugin

It opens the below window.

How to install Cucumber Eclipse Plugin

Now enter the URL "http://cucumber.github.io/cucumber-eclipse/update-site/" in workwith text box and click on Enter button then it will show Cucumber Eclipse Plugin in the results, check "Cucumber Eclipse Plugin" checkbox as shown below..

How to install Cucumber Eclipse Plugin

Click on "Next" button, it shows the below window

How to install Cucumber Eclipse Plugin

Click on "Next" button, it shows the below window

How to install Cucumber Eclipse Plugin

Accept the license agreement and click on "Finish" button.

Now it will start installing the plugin, you can see the progress in progress tab as shown in below window.

How to install Cucumber Eclipse Plugin

As we are installing third party plugin it will show the "Security Warning" window.
Click on "Install anyway" button to proceed with installation. (if you decide to abort the installation then click on "Cancel" button).

How to install Cucumber Eclipse Plugin

Once the plugin is installed it will ask you to restart the eclipse to reflect these plugin changes in the eclipse IDE.

How to install Cucumber Eclipse Plugin

Click on "Restart Now" to see the changes.
After restarting the eclipse, you can see the feature file is highlighted based on the keywords.
This means now the eclipse is able to understand the language we written in feature file as gherkin language.

How to install Cucumber Eclipse Plugin

Note: Even with out installing this plugin your cucumber tests will run, this plugin will not effect any cucumber execution as it is just for the UI decoration of feature files.