On previous post we learn what is BDD and TDD and we also know the name of different type of BDD tools, Cucumber is one of those.
Here we learn how to configure cucumber in eclipse.
Prerequisite:
Need to be installed Java SDK and also downloaded the Eclipse. This configuration details describe here.
Now we download all the required jars for Cucumber setup.
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 jar from maven repository
now add all the jars in our projects.After adding all the jar project looks like below.
Step 2:
We need to add cucumber plugin in eclipse. There are so many plugin available for cucumber in eclipse.
We can add
a. Cucumber JVM Eclipse Plugin
OR
b. CucumberPeople
Lets starts with one by one we can install Cucumber JVM Eclipse Plugin in two different way
a. Cucumber JVM Eclipse Plugin Installation
i. Click on Help -> Install New Software
ii. Click on Add button and put name as Cucumber and location as http://cucumber.github.com/cucumber-eclipse/update-site. Click ok button.
iii. Select all from List and click next button.
iv. Accept License and agreement.
v. Accept security warning.
vi. Restart the eclipse.
Another way to install Cucumber JVM Eclipse Plugin is :
i. Open https://marketplace.eclipse.org/content/cucumber-jvm-eclipse-plugin
ii. Drag the Install button to Eclipse editor.
b. CucumberPeople Eclipse plugin installation
Now we can install CucumberPeople if we are not interested to install the previous plugin.
We need to follow this steps to install this plugin.
i. From the Help menu, select Install New Software... to open an Install pop-up window.
ii. In the Name: field type Cucumber People and in Location: text box type the URL https://alterhu.github.io/CucumberPeople/ then hit the Enter key.
iii. In the populated table below, check the box next to the name of the plug-in, and click the Next button.
iv. Click the Next button to go to the license page.
v. Choose the option to accept the terms of the license agreement, and click the Finish button.
After successful installation of Cucumber plugin .feature file in projects should be shown like below.
Intenseness should be available when writing feature file.
Here we learn how to configure cucumber in eclipse.
Prerequisite:
Need to be installed Java SDK and also downloaded the Eclipse. This configuration details describe here.
Now we download all the required jars for Cucumber setup.
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 jar 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:
We need to add cucumber plugin in eclipse. There are so many plugin available for cucumber in eclipse.
We can add
a. Cucumber JVM Eclipse Plugin
OR
b. CucumberPeople
Lets starts with one by one we can install Cucumber JVM Eclipse Plugin in two different way
a. Cucumber JVM Eclipse Plugin Installation
i. Click on Help -> Install New Software
ii. Click on Add button and put name as Cucumber and location as http://cucumber.github.com/cucumber-eclipse/update-site. Click ok button.
iii. Select all from List and click next button.
iv. Accept License and agreement.
v. Accept security warning.
vi. Restart the eclipse.
Another way to install Cucumber JVM Eclipse Plugin is :
i. Open https://marketplace.eclipse.org/content/cucumber-jvm-eclipse-plugin
ii. Drag the Install button to Eclipse editor.
b. CucumberPeople Eclipse plugin installation
Now we can install CucumberPeople if we are not interested to install the previous plugin.
We need to follow this steps to install this plugin.
i. From the Help menu, select Install New Software... to open an Install pop-up window.
ii. In the Name: field type Cucumber People and in Location: text box type the URL https://alterhu.github.io/CucumberPeople/ then hit the Enter key.
iii. In the populated table below, check the box next to the name of the plug-in, and click the Next button.
iv. Click the Next button to go to the license page.
v. Choose the option to accept the terms of the license agreement, and click the Finish button.
After successful installation of Cucumber plugin .feature file in projects should be shown like below.
Intenseness should be available when writing feature file.
it is uuseful
ReplyDelete