Skip to content

Latest commit

 

History

History
86 lines (60 loc) · 3.84 KB

README.md

File metadata and controls

86 lines (60 loc) · 3.84 KB

BDD in Action: Advanced BDD Test Automation workshop

In this workshop we will be writing executable specifications using Cucumber, WebDriver and Serenity BDD. You wi

Prerequisite overview

For this workshop, you will need the tools mentioned below, as well as a reasonable understanding of Java programming. No knowledge of Cucumber is required.

Prerequisite details

Maven

The sample project will use Maven 3.6.0 (https://maven.apache.org) (any version higher than 3.3 should work.

Gradle

The project will also run with Gradle. You can use the Gradle Wrapper to make sure you are using the right version of Gradle (see below).

JDK

You will need a version of the Java JDK (8 or higher). The demo will be done using OpenJDK 12.

IntelliJ or Eclipse

You will also need a Java IDE. You can use IntelliJ or Eclipse. We recommend IntelliJ - you can download the Community edition from here: https://www.jetbrains.com/idea/download.

For IntelliJ, make sure the Cucumber for Java plugin is installed and enabled. For Eclipse, you will need the Cucumber for Eclipse Plugin

Chrome

We will be running tests in Chrome, so make sure you have the latest version of Chrome installed (Version 74.0.3729.169 or higher)

Getting started

Clone or download the starter project from https://github.com/serenity-bdd/serenity-cucumber4-starter

git clone https://github.com/serenity-dojo/bdd-test-automation-workshop

Run the initial tests to make sure everything works:

mvn clean verify

Or if you prefer to use Gradle:

./gradlew clean test

Now load the project into your IDE.

Running the TodoMVC application locally

We will be writing tests for the TodoMVC application. You can run your tests either against the publicly available site, or by running the application locally. If you want to run the application locally, install NodeJS on your machine and then install the http-server package, e.g.

$ npm install http-server -g

Then, to run the demo application, run the following from the project root directory:

$ http-server todomvc

Running the tests

You can run the test suite by running the CucumberTestSuite class in your IDE, or by running mvn verify from the command line.

The tutorial exercises

Now that you have a running environment, you can try out the tutorial exercises.

You can find the sample solutions in the solutions branch

Want to learn more?

For more information about Serenity BDD, you can read the Serenity BDD Book, the official online Serenity documentation source. Other sources include: