BDD with cucumber-Java-Part 1

Step 1:Installation
  • Eclipse > help > Install new software
  • Click add and add details as
  • Cucumber and in the url field enter " http://cucumber.github.com/cucumber-eclipse/update-site "
  • keep clicking next and accept.The installation shall continue.
Step 2: Creating project and downloading jars
For this we shall create a Maven project
  • cmd > Go to your workspace directory >
  •  mvn archetype:generate -DgroupId=myCucumber -DartifactId=BDD  -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false ,this will create a maven project .
  • Integrate project with eclipse with cmd to the BDD directory > mvn eclipse:eclipse
  • Eclipse >import > Import existing maven project .
  • In pom.xml add these dependencies
<dependencies>
           <dependency>
               <groupId>com.sun</groupId>
               <artifactId>tools</artifactId>
               <version>1.6</version>
               <scope>system</scope>
               <systemPath>C:\Program Files\Java\jdk1.8.0_144\lib\tools.jar</systemPath>
         </dependency>
          <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-core</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-jvm</artifactId>
            <version>1.2.5</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.cobertura</groupId>
            <artifactId>cobertura</artifactId>
            <version>2.1.1</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-jvm-deps</artifactId>
            <version>1.0.5</version>
        </dependency>
        <dependency>
            <groupId>net.masterthought</groupId>
            <artifactId>cucumber-reporting</artifactId>
            <version>3.11.0</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>gherkin</artifactId>
            <version>2.12.2</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>2.0.2-beta</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <version>3.6.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>23.0</version>
        </dependency>
  </dependencies>


Ctrl+S

Continued here

Comments

  1. very informative blog and useful article thank you for sharing with us , keep posting Ruby on Rails Online Course Hyderabad

    ReplyDelete

Post a Comment

Popular Posts