-
Notifications
You must be signed in to change notification settings - Fork 1
Home
#Cucumber Workshop For a brief introduction of BDD & Cucumber, take a look here. The gist: This is a workshop about the tool Cucumber - we will talk about BDD, but it is far from the focus.
Clone the workshop code at https://github.com/snorrees/cucumber-game. Feel free to skim the readme for additional instructions.
Build the maven project once - navigate to <project-root>
and run:
mvn clean install
It is assumed that you have an IDE or equivalent editor for working with Java-code. IntelliJ has especially good Cucumber support.
If we somehow are offline, all dependencies are on a usb-stick. Build using:
mvn clean install -Dmaven.repo.local="../maven_repo"
The workshop consists of 4 tasks. The workspace for each task is in the src/test
directory of each module. We will add and change files in the java-source and resource directories:
<task-module>/src/test/java/task
<task-module>/src/test/resources/task
All tasks have a corresponding <task>-solution
module, which contains a running example of how the workspace might look when the task is completed. Feel free to poke around for inspiration if you are stuck, but don't hesitate to ask for help either!
-
Task 1: A Cucumber feature
- Introduction to Cucumber - the Hello World example
-
Task 2: An unknown domain
- We take a look at some existing specification, and try to expand upon it.
-
Task 3: Refactoring using dependency injection
- A look at how we can improve the structure and maintainability of our Cucumber code
-
Task 4: Data tables and custom types
- A look at how we can utilize the power Cucumber data tables for parameterizing tests and verifying results.
Feel free to progress at your own pace - every task will be explained during the workshop.