Skip to content

Commit

Permalink
Updating instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
algogrit committed Jul 19, 2019
1 parent d44d0da commit f313402
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions code-samples/05-bdd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,37 @@

## For existing tdd-kata

### Create appropriate dir structure within `tdd-kata`

```bash
mkdir -p src/test/java/com/algogrit/java src/test/resources/com/algogrit/java
```

### Edit pom.xml and add the following under existing `dependencies` & `properties` appropriately

```xml
<properties>
<cucumber.version>4.2.6</cucumber.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
```

### Create the following files

> $ cat src/test/java/com/algogrit/java/RunCucumberTest.java
Expand Down Expand Up @@ -39,27 +66,9 @@ public class Stepdefs {
}
```

### Edit pom.xml and add the following `dependencies` & `properties`

```xml
<properties>
<cucumber.version>4.2.6</cucumber.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
### Create your first feature in `calculator.feature`

<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
```bash
touch src/test/resources/com/algogrit/java/calculator.feature
mvn clean test
```

0 comments on commit f313402

Please sign in to comment.