First, do not get confused with this Cucumber Eclipse Plugin as it is not the main cucumber plugin for running the test as BDD. Even this is not a mandatory plugin but it is quite handy. At the start when you write the feature file for the cucumber test, the code for the feature file looks like this:
Note: None of the keyword in feature file is highlighted, all the text is plain.
Cucumber Eclipse Plugin helps eclipse to understand the basic Gherkin syntax and it works like a syntax highlighter. It highlights all the main syntax in the feature file which makes it more readable and clear. It also enables the run of the feature file independently, without the help of JUnit. We will talk about it later, but as of now please go ahead and install this plugin.
Install Cucumber Eclipse Plugin
It is easy to install Cucumber Eclipse Plugin, as it comes as a plugin for Eclipse IDE. Prerequisite for installing this plugin is your Internet connection should be up & running during installation of this plugin and Eclipse IDE should be installed in your computer. Please see Download and Install Eclipse to setup Eclipse to you system.
Steps to follow:
- Launch the Eclipse IDE and from Help menu, click “Install New Software”.
- You will see a dialog window, click “Add” button.
Type name as you wish, let's take “Cucumber” and type “http://cucumber.github.com/cucumber-eclipse/update-site” as location. Click OK.
You come back to the previous window but this time you must see Cucumber Eclipse Plugin option in the available software list. Just Check the box and press “Next” button.
Note: If running behind a proxy server and you get a ‘HTTP Proxy Authentication Required’ error you may need to contact a system administrator to set up your proxy server settings.
- Click on Next.
- Click “I accept the terms of the license agreement” then click Finish.
- Let it install, it will take few seconds to complete.
- You may or may not encounter a Security warning, if in case you do just click OK.
- You are all done now, just click Yes.