Book description
Over 35 hands-on recipes to efficiently master the art of behaviour-driven development using Cucumber-JVM
In Detail
Today, behaviour-driven development (BDD) is gaining popularity around the world. Cucumber-JVM is one of the fastest growing tools and offers a cutting-edge platform for conceptualizing and implementing BDD. The variety of features available within Cucumber enhances the experience of implementing BDD for both business and development teams.
This book provides you with the skills you need to successfully create, customize, and configure the Cucumber framework. You will discover how to create Feature files, and Step Definitions, and enable various configurations, such as "Before" and "After" functions, with fun exercises. You'll round off your learning by creating automation frameworks to automate Web, REST, and Mobile apps.
What You Will Learn
- Explore the usage of the Gherkin Language to write meaningful and smart Feature files
- Understand Scenario, Steps, Backgrounds, Scenario Outlines, and Data Tables
- Discover the concepts of Glue Code and Step Definitions in detail
- Gain insights into the different types of Step Definitions, Regular Expressions, Doc Strings, Data Table transformations, and Capture Groups
- Master the advanced concepts of implementing Tags and Hooks
- Override default Cucumber options and settings along with different output report formats
- Run Jenkins and Cucumber from Terminal while running various Cucumber Scenarios in parallel
Publisher resources
Table of contents
-
Cucumber Cookbook
- Table of Contents
- Cucumber Cookbook
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
-
1. Writing Feature Files
- Introduction
- Writing your first Feature file with one Scenario
- Creating Scenarios with different Steps
- Creating a Scenario with the And and But keywords
- Writing a Feature file with multiple Scenarios
- Adding Backgrounds to Feature files
- Sending multiple arguments in Steps
- Using complex data types to store data
- Implementing Scenario Outlines
- Creating a Feature file in a language other than English
- Combining Scenarios, Backgrounds, and Scenario Outlines
-
2. Creating Step Definitions
- Introduction
- Creating your first Step Definitions file
- Identifying Duplicate and Ambiguous Step Definitions
- Using Regular Expressions to optimize Step Definitions
- Using Optional Capture and Noncapture Groups
- Transforming Data Tables to parse the test data
- Implementing data table diffs to compare tables
- Using Doc Strings to parse big data as one chunk
- Combining Doc Strings and Scenario Outlines
- Defining String transformations for better conversions
- 3. Enabling Fixtures
- 4. Configuring Cucumber
- 5. Running Cucumber
- 6. Building Cucumber Frameworks
- Index
Product information
- Title: Cucumber Cookbook
- Author(s):
- Release date: June 2015
- Publisher(s): Packt Publishing
- ISBN: 9781785286001
You might also like
book
Cucumber Recipes
You can test just about anything with Cucumber. We certainly have, and in Cucumber Recipes we'll …
book
The Cucumber for Java Book
Teams working on the JVM can now say goodbye forever to misunderstood requirements, tedious manual acceptance …
book
The Cucumber Book
Your customers want rock-solid, bug-free software that does exactly what they expect it to do. Yet …
video
Cucumber with the Java-Build Automation Framework with Minimal Code
Do you want to learn the lifesaver tool of the Quality Assurance (QA) industry in developing …