Cucumber Essential Training (2019)

Cucumber Essential Training (2019)

2h 44mIntermediate2019-06-20

Authors

Shashi Shekhar

Shashi Shekhar

Enterprise Architect

Course details

Cucumber is a tool for behavior-driven development (BDD), which allows you to write assertions in plain language that are then testable by code. By making written requirements actually testable, it provides a common language between business and engineering professionals. In this course, learn how to use Cucumber to implement agile practices like BDD, test-driven development (TDD), and acceptance test-driven development (ATDD). Instructor Shashi Shekhar goes over the basics of BDD, TDD, and ATDD, and then dives into the Cucumber workflow. He also shows how to map user stories to features, add hooks, generate reports, and apply techniques to make BDD maintainable.

Learning objectives
How Cucumber can be used for BDD, TDD, and ATDD
Installing and configuring Cucumber
Mapping user stories to features
Adding hooks
Generating reports
Adding a data table
Adding Selenium dependencies
Applying techniques to make BDD maintainable

Skills covered

CucumberSeleniumAgile Software DevelopmentSoftware TestingDevOpsEssential TrainingOpen SourceSoftware Development

Concepts

Introduction

  • A common language for business and developers
  • What you should know
  • Setup - JDK
  • Setup - Eclipse
  • Setup - Cucumber Eclipse plugin and Maven
  • Create a Maven project

Behavior-Driven Development

  • Basic concepts - BDD
  • Basic concepts - TDD and ATDD
  • The big picture

Cucumber Workflow

  • User story session - The problem domain
  • User story session - Concrete examples
  • Feature file
  • Step definitions - Generate code
  • Step definitions - First domain object
  • Step definitions - Next scenario step
  • Step definitions - Testing scenario
  • Running a test - Create a test runner
  • Running a test - Maven test

Regular Expressions Match

  • Regular expressions basics
  • Update price attribute
  • Update item name attribute
  • Use old Cucumber version
  • More Cucumber expressions

Additional Cucumber Concepts

  • Cucumber tags - Add a tag
  • Cucumber tags - Multiple tags
  • Cucumber tags - Maven test with tags
  • Background - Add background
  • Background - Duplicate item
  • Background - Execution flow
  • Cucumber hooks - Adding hooks
  • Cucumber hooks - Tagged hooks
  • Cucumber reports - Generate reports
  • Use monochrome and dryRun parameters

Data Table and Scenario Outline

  • Data table - Adding a data table
  • Data table - Read list of strings
  • Data table - List of list of strings
  • Data table - List of maps
  • Data table - Wrapping up
  • Scenario outline - Add scenario outline
  • Scenario outline - Adding examples table
  • Scenario outline - Implement code
  • Scenario outline - Running test

Cucumber Advance Features

  • Web browser automation
  • Add Selenium dependencies
  • Invoke a page - Extract values
  • Invoke a page - Read results
  • Invoke a page - Running test
  • Best practices

Miscellaneous

  • Continuous integration and BDD
  • SpecFlow - Installation
  • SpecFlow - Running tests

Conclusion

  • Next steps
80,000 Toman