Saturday, November 21, 2015

Cucumber SetUp in NetBeans

On our previous post we learn how to setup cucumber projects in Eclipse. Now we learn how to setup a NetBeans for cucumber.

Prerequisite:
Need to be installed Java SDK and NetBeans. We discussed here how to install Java SDK and Netbeans.

Step 1:

We need to download below jars :
a. cucumber-core-1.2.4.jar (This jar contains all the story terminology utilized from writing scenarios and implemented in the defining methods.)
b. cucumber-java-1.2.4.jar (This provides the Java runtime environment for all tests.)
c. cucumber-jvm-deps-1.0.5.jar (This module provides the Java parser for cucumber)
d. gherkin-2.12.2.jar   (gherkin is the language cucumber’s feature stories are written in, and this module contains parsing instructions for the features)
e. cucumber-junit-1.2.4.jar (This jar required for customized JUnit framework with cucumber.)
f. cucumber-html-0.2.3.jar (This provides a nice output in html format upon test completion.)

We can download this jars from  maven repository

and from sonatype repository.


now add all the jars in our projects.After adding all the jar project looks like below.

Step 2 :

Now we need to install cucumber plugin for Netbeans.

So open this url and click on download button. We found one .nbm file downloaded in our preferred download location.



Step 3:

Now we need to install this in Netbeans.
a. Click on Tools-> Plugins option.

b. Click on "Downloaded" tab from Plugins window and again click on "Add Plugins" button to select downloaded Netbeans Cucumber plugin file.

c. On next window shows  check box select this check box.

d. Accept term and condition.

e. Restart the Netbeans IDE.

After successful installation of Cucumber plugin .feature file in projects should be shown like below.




Cucumber file option should be available in NetBeans when we try to add any file in our project.



1 comment:

  1. Is there any way to get the Cetriolo Cucumber plugin to run test definitions written in java? I've just started working with Cucumber testing and love it, but can't seem to get it working from NetBeans. Only Intellij seems to have this working out of the box with its Cucumber plugin. Thanks!

    ReplyDelete