Cucumber Cookbook

Over 35 hands-on recipes to efficiently master the art of behaviour-driven development using Cucumber-JVM

Cucumber Cookbook

This ebook is included in a Mapt subscription
Shankar Garg

1 customer reviews
Over 35 hands-on recipes to efficiently master the art of behaviour-driven development using Cucumber-JVM
$0.00
$16.00
$39.99
$29.99p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785286001
Paperback162 pages

Book Description

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.

Table of Contents

Chapter 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
Chapter 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
Chapter 3: Enabling Fixtures
Introduction
Tagging
ANDing and ORing Tags
Adding Hooks to Cucumber code
Tagging the Hooks
ANDing and ORing tagged Hooks
Chapter 4: Configuring Cucumber
Introduction
Integrating Cucumber with JUnit
Overriding the Cucumber Options
Running Strict and Running Dry
Configuring the Cucumber Console output
Directing the Cucumber output to a file
Configuring the naming conventions
Chapter 5: Running Cucumber
Introduction
Integrating Cucumber with Maven
Running Cucumber from the Terminal
Overriding Options from the Terminal
Integrating Cucumber with Jenkins and GitHub
Running Cucumber test cases in parallel
Chapter 6: Building Cucumber Frameworks
Introduction
Building a Web Automation framework
Building a Mobile Automation framework
Building a REST Automation framework

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

Authors

Table of Contents

Chapter 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
Chapter 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
Chapter 3: Enabling Fixtures
Introduction
Tagging
ANDing and ORing Tags
Adding Hooks to Cucumber code
Tagging the Hooks
ANDing and ORing tagged Hooks
Chapter 4: Configuring Cucumber
Introduction
Integrating Cucumber with JUnit
Overriding the Cucumber Options
Running Strict and Running Dry
Configuring the Cucumber Console output
Directing the Cucumber output to a file
Configuring the naming conventions
Chapter 5: Running Cucumber
Introduction
Integrating Cucumber with Maven
Running Cucumber from the Terminal
Overriding Options from the Terminal
Integrating Cucumber with Jenkins and GitHub
Running Cucumber test cases in parallel
Chapter 6: Building Cucumber Frameworks
Introduction
Building a Web Automation framework
Building a Mobile Automation framework
Building a REST Automation framework

Book Details

ISBN 139781785286001
Paperback162 pages
Read More
From 1 reviews

Read More Reviews