BDD with Cucumber JavaScript and Selenium WebDriver

Essential BDD automation skills for software testers

This course is designed for testers and automation engineers who want to implement BDD using JavaScript. You will work with Cucumber-JS and Selenium WebDriver to build automated tests that support maintainable automation frameworks. Also, learn how to structure BDD scenarios, organise step definitions and integrate automated tests into your software development projects. These skills can help you contribute more effectively to test automation frameworks and collaborative development practices. 

Learning objectives
  • Install and configure the Cucumber framework within a JavaScript test project 
  • Structure a Cucumber automation project for maintainability 
  • Write Gherkin feature files that define clear and readable BDD scenarios 
  • Create step definitions and methods that bind scenarios to automation code 
  • Refactor and reuse step definition methods across test scenarios 
  • Organise and maintain Cucumber projects using consistent structures 
  • Integrate Cucumber with Selenium WebDriver using the Page Object Model 

Key facts

Certification

This is a skills and knowledge-based course with no formal accreditation. 

Who it's for

This course is suitable for testers and automation professionals who want to learn behaviour-driven development using Cucumber-JS and Selenium WebDriver JavaScript. 

Prerequisites

You should have a basic understanding of writing Selenium WebDriver JavaScript tests or have attended a WebDriver JS course. Some programming experience would be beneficial. 

Exam information

There is no exam for this course. 

Optional extras

There are no optional extras for this course. 

Pre-course

There is no pre-course work for this course.  

Course syllabus

Dive into the detail of the course by looking at the syllabus below. 

  • Introduction to BDD
    • A background to BDD and its benefits
    • The process of BDD
    • An overview of the tools available
    • Terminology
  • 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
    • Installing Cucumber with npm
    • Creating a project structure
    • Creating a feature
    • Running feature files
  • Step definitions and code binding
    • Using prototype step definitions
    • Creating step definition methods
    • Expanding methods with parameters
    • Step definition syntax
    • Using regular expressions
  • Running the Cucumber tests
    • Using Cucumber command line interface
    • CLI parameters
    • Results and reporting
    • HTML reports
  • Hooks
    • Using hooks in Cucumber-JS (BeforeAll, Before, After, AfterAll)
    • Cucumber timeouts
  • The Cucumber world object
    • Attaching items to world
    • Creating your own custom world constructor
  • Tables and scenario outlines
    • In-line step table iterating
    • Scenario outline data handling
  • Integrating Cucumber into the POM
    • Using Cucumber & WebDriver under the Page Object Model
    • Using helpers
  • VS Code tips
    • Cucumber icon packs
    • Setting up Go to Definitions shortcut
    • Debugging scripts

FAQs

This course introduces behaviour-driven development using Cucumber-JS and Selenium WebDriver JavaScript. It focuses on practical automation techniques, including writing Gherkin feature files, creating step definitions, and integrating automated tests into structured frameworks to support maintainable and effective automated testing practices. 

What is behaviour-driven development?

Behaviour-driven development (BDD) is a testing approach that describes system behaviour using structured scenarios written in natural language. These scenarios act as both documentation and automated tests, helping teams understand and verify application behaviour.  

How long does this training take to complete?

The course length differs depending on your chosen study option. For classroom learners the training will take place over three full days. For those who opt for live virtual classroom it will be five half days. 

Do I need programming experience?

Some programming experience is helpful. The course assumes familiarity with Selenium WebDriver JavaScript and does not teach JavaScript programming itself.  

Is there an exam for this course?

No. This course does not include a certification exam.  

What will I be able to do after the course?

After completing the course, you should understand how to write Gherkin feature files, create step definitions and organise automated BDD tests using Cucumber-JS and Selenium WebDriver. 

"Great course, and really expertly taught. Looking forward to implementing things learnt in my role going forwards"

Vincent, TSG learner

"Great content and delivered with clarity and fun."

Colette, TSG learner
Why study with TSG?
25+ years' experience

Trusted by individuals, businesses and public sector organisations for over 25 years.

20,000+ learners trained

Join a network of learners focused on developing their software testing skills 

98% customer satisfaction

TSG trainers are frequently rated as ‘good’ or ‘excellent’ by our learners

Speak to our team
Guidance from experienced advisors

If you’re unsure which course aligns with your technical requirements or career direction, we’ll help you assess your options and choose with confidence.  

Build capability
Develop skills that support real delivery outcomes

From software testing to broader digital skills, we work with you to design learning that strengthens capability, improves performance, and supports long-term business goals.

Quote request

Please complete the form to ensure your quote is accurate and we will contact you soon.

Page {{ step }} of 2

Back Next