BDD with Cucumber and Selenium Web Driver
About the Course
This comprehensive course covers all the essential principles to get you up and running in Behaviour-Driven Development of Cucumber and WebDriver Tests
Designed for beginners of BDD and Cucumber, it takes the new-comer through all the basic techniques of writing Feature Files in Gherkin, to writing the associated Step Definitions and code in Cucumber & WebDriver to executing from the command line.
Throughout the course practical examples are demonstrated, and the delegates get to practice what they have learned in each chapter against a Web training application.
Who is it for?
The introductory course that takes you from beginner through to writing effective Feature Files and then Automating them using WebDriver
Recommended for anyone new to BDD and Cucumber
- Must have attended the 3 day Selenium WebDriver course or have equivalent knowledge
- A basic understanding of writing Selenium WebDriver Scripts
- Some programming experience would be advantageous - The course is based on using WebDriver with Java & Junit, but does not teach you Java as you can use a variety of programming languages with WebDriver and Cucumber.
- Understand the required installs and libraries to use Cucumber
- Understand how to structure your automated Cucumber project
- Gain a full understanding of how to write good Gherkin and Step Definitions
- Understand how refactor and re-use common Methods for Steps
- By the end of the course you should have a thorough understanding of how to develop well-written Feature Files and Scenarios, how to manage Step Definitions and write associated Methods, how to organise the Cucumber project and how to integrate into the POM framework
Syllabus - Key points
Introduction to BDD
A background to BDD and its benefits. The process of BDD. An overview of the tools available, terminology.
Introduction to Gherkin
Feature Files, introduction to the Gherkin language, basic syntax
Using the Background fixture, Parameters, Doc Strings, Examples and Data Tables, using Tags to organise execution, commenting
Installation of the Cucumber Framework
Cucumber Eclipse plugin, installing the Cucumber, Gherkin and other dependent libraries. Creating a project structure, creating a Feature, formatting and execution of Feature Files
Step Definitions & Code Binding
Creating our Test Classes, Using prototype step definitions, fixing errors for executing feature files, creating step definition Methods, expanding Methods with Parameters
Deconstructing Step Definitions and Regular Expressions
Step Definition syntax, using Regular Expressions
Extending the code
In-line Step Table Iterating, using multiple annotations for one Method, re-using Methods for more than one Scenario
Running the Cucumber Tests
Using Cucumber, creating a junit Runner Class, Using Tags, Results & Reporting
Integrating Cucumber into the POM
Using Cucumber & WebDriver under the Page Object Model. Using Base Classes & Inheritance, Command line execution
WebDriver (Java Bindings)