Saturday, 23 November 2013

Sample Spring TTD BDD :: Revisiting

Planning to revisit my old blog.

Going to explain Step by Step

> mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DartifactId=Geethsangam

I am going to use eclipse

>  mvn eclipse:eclipse

You can change the pom.xml

<packaging>jar</packaging> to <packaging>pom</packaging>

This is going to be the parent pom for us

You can create the mvn module from the command prompt or from eclipse

From terminal

>cd Geethsangam

> mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DartifactId=geethsangam-core

From Eclipse 

File > New > Maven > Maven module 


Right click on the project 

Maven > New Maven Module Project

Adding cucumber-jvm to projects

Add these 2 dependencies in the pom.xml



Create Folders for cucumber BDD test

> cd Geethsangam

> mkdir cucumber

> cd cucumber

> mkdir features

 encies in the pom.xml

In the cucumber folder create test acceptance folder.

> mkdir test

Then Add the following class

import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;

@Cucumber.Options(format = {"pretty""html:target/cucumber-html-report""json-pretty:target/cucumber-json-report.json"}, tags = "~@wip")
public class RunCukesTest {