We may earn an affiliate commission when you visit our partners.
Course image
Admas Kinfu

Learn how Cucumber BDD (Behavioral Driven Development/Test Driven Development) testing frameworks work. Learn how the pieces of Cucumber fall together and how frameworks are put together, as well as best practices of BDD. We will use the most popular and actively maintained Cucumber framework for Python BDD called 'Behave'. We will use PowerPoint presentation to convey the concepts on each topic and then write example code testing real scenarios with Selenium WebDriver as well as API testing.

Read more

Learn how Cucumber BDD (Behavioral Driven Development/Test Driven Development) testing frameworks work. Learn how the pieces of Cucumber fall together and how frameworks are put together, as well as best practices of BDD. We will use the most popular and actively maintained Cucumber framework for Python BDD called 'Behave'. We will use PowerPoint presentation to convey the concepts on each topic and then write example code testing real scenarios with Selenium WebDriver as well as API testing.

We will build an E-commerce site on our local machine and practice writing real test cases both for front end with Selenium WebDriver and for the backend with Python, with full access to MySQL database of our site.

Critical addition to your resume

If you are getting into the QA world or you are looking to advance your career, having BDD testing skill will accelerate your success. Python is one of the most popular languages to use in software testing, and knowing how to use it with BDD style testing will expand your pool of possibilities.

In addition to using Python for BDD testing you will also get tips and guidance on best practices.   

After completion of this course you will be able to go through interview as if you have BDD testing experience. You will also have a ready to go framework that you can continue to add test cases for practice and for your portfolio.

Content and Overview   

In this course we will be using PowerPoint presentation to explain the concepts and then go to code in an IDE (PyCharm) for each topic. Some topics, we will go directly to code and start writing and executing.   

We will install necessary packages for our framework. We will discuss the directory structure needed for our design, and then we will write and run test cases. 

We will run how the BDD tests are written, how the work together and how to understand and control the output. 

We will create an efficiently structured test framework and learn how to use Pythons logging module to produce readable reports.   

What am I going to get from this course?  

  • 49 + lectures of BDD core concepts, examples and practice exercises (continuously adding more examples) 

  • Plenty of test cases to use in your portfolio and to build bigger test suits on top of the course material

  • Enough material and examples to be able to create a project (BDD test framework) and maintain a GitHub repo 

  • Specific features of the most popular BDD framework for Python called Behave

  • Practice using Selenium WebDriver functions with Python

  • Practice testing of Front-end with Selenium WebDriver BDD and Python

  • Practice testing of Back-end with Python

Enroll now

What's inside

Learning objectives

  • You will be able to create cucumber bdd testing framework using python, behave, selenium webdriver, ....
  • You will be able to read and write cucumber bdd style tests in python
  • You will be able to work on cucumber bdd framework supporting both frontend with bdd selenium and backend with pure bdd python
  • You will create full e-commerce site on your computer and practice test automation
  • Sql crash course (mysql). you will learn how to work with mysql database
  • You will learn tips and tricks of finding elements, debugging issues, shortcuts with ide, test methodologies, setup py file
  • You will be able to use virtual environment and try different versions of python libraries

Syllabus

Introduction
Introduction of the course. I will talk about what this course is about, whom it is for and what you expect to get out of it.
About The Provided Course Code
Read more

In this video I will go over the sections of the course and give a quick overview of each.

Sections introduce what BDD style is, what the Gherkin scripting language is and what ‘Behave’ framework is.

This section I will demo on how to install PyCharm. Which is an IDE for Python. You are free to use any IDE or text editor you prefer. If you already have an editor you like to use, then you can skip this section. Some options other than PyCharm are Notepad++ and Sublime.

We see how to enable PyCharm to use a virtual environment for our project. It will have access to installed libraries like Selenium and Behave.

We will look at a basic directory structure. How to set up our files so that behave will be able to find the test sand run them. We will use PowerPoint slides and discuss the concept.

We will look at creating the structure of our test framework. We will create folders that we will be using for the rest of the course. We will add more folders as needed throughout the course but here we will start with the bare minimum.

In this lecture we will get introduced to Feature files. Feature files are one of the major components of BDD style. We will discuss what Feature files look like, what they contain and what they are used for.

In this lecture we will get introduced to Steps directory and step definitions. Step directory and step definition files are the second critical components of BDD style. We will discuss what the steps directory is, why we need it, and how it is related to Feature files

This section discusses how to run a single feature file. A feature file tests one feature of an application. There may be multiple feature files in a directory. Behave have option of running all or just one file.

This section demo running of single feature time at a time. We will use the command line tool and run feature files.

This section discusses on how to run all feature files in a directory or sub-directory. We have seen how we can run a single feature file and now we see how to run all feature files.

This section demos running of all feature files in a directory and subcategories. We will use the command line tool to demo.

Discussion and demo off outputting information from the test to stdout. Behave offers few options on how the output should be displayed and we will explore on how to do so in this section.

Section to discuss and demo the main keywords we have seen already and additional key works that are “But” and 'And'.

This section is discussion of how to pass values from the steps to the step definitions. The feature file will have hard coded values which then the value will be used in the Python logic. Example, quantity, name of web element, url, ….

This section demos passing values from the feature file to the Python logic.

This section is a discussion of how data can be shared between steps. It is important that data generated in one step should be available in the next step. Example, if user is created in first step then the login step should have access to the user information.

In this section I will demo sharing of data between steps using running examples.

This lecture introduces our section of practical examples. Practical examples are when we write real tests that are run against real websites .

In this lecture we will see how our project is set up. What our directory structure looks like and what are the bare minimum directories we need for the project

In this lecture we will write and run a test case using BDD for the python.org site.

In this lecture we continue to write and run a test case using BDD for the python.org site.

This lecture covers on how to create our custom config file and why. Config file is used to make maintenance of code a lot easier. Information used in several places can be stored as a config and modifying information will be done only at one location.

In this lecture we continue to write another test case for python.org, but this time we will use config file to get a better understanding of why using config files is very efficient.

We will discuss how to do setup and teardown of our environment using behave. Setup and teardown run before and after each feature, scenario, step or more to prepare information for the test and then to destroy or reset information after the test.

***** NOTE: SOURCE CODE FOR THIS SECTION ADDED TO THE FIRST VIDEO OF THE COURSE WITH EVERY THING ELSE. PLEASE RE-DOWNLOAD.

Just creating new project in PyCharm using the files we were using. Students do not need to do this part but should be aware that I have changed the project in the videos.

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Activities

Coming soon We're preparing activities for Cucumber BDD with Python Behave and Selenium WebDriver 2024. These are activities you can do either before, during, or after a course.

Career center

Learners who complete Cucumber BDD with Python Behave and Selenium WebDriver 2024 will develop knowledge and skills that may be useful to these careers:
BDD Automation Specialist
A BDD Automation Specialist is an expert in implementing and advocating for Behavioral Driven Development practices and tools within an organization, bridging the gap between business stakeholders and technical teams. This course is specifically designed for anyone aspiring to be a BDD Automation Specialist, providing deep dives into Cucumber BDD, Python Behave, and Gherkin scripting language. It offers practical experience in structuring feature files and step definitions, building comprehensive test frameworks for frontend with Selenium WebDriver and backend with Python, and generating various reports. Mastering these specific technologies and methodologies enables professionals to lead BDD adoption, mentor teams, and ensure robust, collaborative testing strategies.
Test Automation Engineer
The Test Automation Engineer is a critical role in modern software development, focusing on designing, developing, and maintaining automated test scripts and frameworks to ensure product quality and accelerate release cycles. This course provides comprehensive training directly applicable to a Test Automation Engineer, covering the creation of BDD testing frameworks using Python, Behave, and Selenium WebDriver. Learners gain practical experience with frontend and backend test automation, database interactions with MySQL, and efficient test reporting, equipping them to build robust, scalable automation solutions and troubleshoot complex testing issues. The ability to articulate BDD concepts and implement production-ready frameworks makes this course highly beneficial for aspiring professionals in this field.
Software Development Engineer in Test
A Software Development Engineer in Test combines the skills of a developer and a tester, deeply embedding quality throughout the software development lifecycle by writing code to test code. This course is exceptionally well-suited for a Software Development Engineer in Test, as it focuses on building complete BDD testing frameworks from the ground up using Python. By learning to implement BDD with Behave and Selenium WebDriver for both frontend and backend systems, including API and database testing with MySQL, learners develop strong programming and testing skills. The course's emphasis on framework design, debugging, and integrating with IDEs helps cultivate the engineering mindset essential for creating high-quality, maintainable test infrastructure.
Quality Assurance Engineer
A Quality Assurance Engineer plays a pivotal role in ensuring software products meet quality standards and user expectations, often encompassing both manual and automated testing efforts. This course greatly enhances the capabilities of a Quality Assurance Engineer by offering in-depth knowledge of Behavioral Driven Development and practical test automation. Learners gain hands-on experience with Python, Behave, and Selenium WebDriver, enabling them to automate complex test scenarios for both web interfaces and backend services. Understanding BDD principles, creating structured test frameworks, and working with databases like MySQL allows professionals to contribute significantly to product quality and streamline testing processes within any software development team.
Automation Consultant
An Automation Consultant advises organizations on implementing and optimizing automation strategies across various departments, often specializing in software testing and quality assurance processes. This course can be highly valuable for an Automation Consultant, by providing expert-level knowledge in designing and deploying BDD test automation frameworks using Python, Behave, and Selenium WebDriver. Professionals learn best practices for BDD, framework architecture, and various reporting mechanisms, enabling them to evaluate existing setups, recommend suitable tools, and guide teams through BDD adoption. The practical experience with both frontend and backend automation, including database interactions, supports consultants in developing tailored, effective automation solutions for diverse client needs.
Quality Assurance Analyst
A Quality Assurance Analyst is responsible for defining, performing, and analyzing tests to ensure software quality, often involving both manual and automated testing. This course may be useful for a Quality Assurance Analyst by providing essential skills in test automation and BDD. Learners will understand how to translate requirements into executable BDD scenarios using Gherkin, and gain hands-on experience with Python, Behave, and Selenium WebDriver to automate these tests. The ability to create, run, and interpret automated tests for both frontend and backend functionality, coupled with knowledge of database interaction, can greatly enhance an analyst's capacity to contribute to more efficient and thorough quality assurance processes.
Technical Trainer Software Testing
A Technical Trainer Software Testing creates and delivers educational content to equip others with the skills needed for quality assurance and test automation roles. This course may be useful for a Technical Trainer Software Testing, as it provides a robust curriculum and practical examples for teaching BDD. The course's structure, which includes PowerPoint presentations for concepts and hands-on coding demonstrations with Python, Behave, and Selenium WebDriver, mirrors effective training methodologies. Trainers can leverage the course material on BDD components, framework creation, troubleshooting, and different reporting options to develop engaging and comprehensive training programs that empower future test automation professionals.
User Acceptance Testing Lead
A User Acceptance Testing Lead manages the UAT phase, ensuring that new software features meet end-user requirements and business objectives. This course may be useful for a User Acceptance Testing Lead by providing a strong understanding of Behavioral Driven Development, which is inherently designed to bridge the gap between business and technical specifications. Learning Gherkin syntax helps a User Acceptance Testing Lead articulate user stories and acceptance criteria in a clear, unambiguous format that can be directly converted into automated tests. This knowledge facilitates better collaboration with development and QA teams, ensuring that testing aligns precisely with user expectations and promotes earlier detection of discrepancies.
Python Developer
A Python Developer builds and maintains software applications using the Python language, contributing to various parts of a system from web development to data processing. This course may be useful for a Python Developer by significantly enhancing their understanding and application of robust testing principles. While primarily focused on testing, the course provides extensive practical experience writing Python code for backend automation, API testing, and database interactions with MySQL. Developing BDD frameworks also improves Python development skills related to code structure, modularity, and debugging, allowing developers to write more testable and higher-quality production code, fostering a 'test-first' mindset in their development practices.
DevOps Engineer
A DevOps Engineer focuses on establishing and improving continuous integration, continuous delivery, and continuous deployment pipelines, automating workflows to accelerate software delivery. This course may be useful for a DevOps Engineer by providing critical knowledge in integrating automated testing into CI/CD. The course teaches how to build BDD testing frameworks with Python, Behave, and Selenium WebDriver, and how to run tests programmatically using runner scripts and generate reports in formats like Junit and JSON. This expertise enables a DevOps Engineer to design effective automation strategies, configure CI/CD pipelines to automatically execute tests, and ensure continuous quality feedback loops early in the development cycle.
Software Engineer
A Software Engineer designs, develops, and maintains software applications across various domains, requiring a strong foundation in programming and problem-solving. This course may be useful for a Software Engineer, as it deepens their understanding of software quality and testability. By learning to build comprehensive BDD testing frameworks with Python, Behave, and Selenium WebDriver, a Software Engineer can apply 'test driven' principles throughout their development process. This perspective fosters the creation of more robust, maintainable, and verifiable code, reducing bugs and improving overall system reliability. The course's focus on structured testing and debugging enhances a developer's ability to produce high-quality software.
Backend Developer
A Backend Developer focuses on server-side logic, databases, and application programming interfaces (APIs) that power the frontend of a website or application. This course may be useful for a Backend Developer by significantly enhancing their skills in robust backend testing and database interaction. The course provides practical experience with Python for backend BDD testing, including API testing and in-depth work with MySQL databases. Understanding how to create and manage test cases for server-side logic ensures the reliability and correctness of the backend systems they build. This knowledge contributes to developing more resilient and testable APIs and database operations.
Frontend Developer
A Frontend Developer specializes in building and implementing the user-facing part of websites and web applications, focusing on user experience and interface design. This course may be useful for a Frontend Developer by providing strong skills in automated frontend testing. Learning to use Selenium WebDriver with Python and BDD (Behave) allows a Frontend Developer to create comprehensive automated tests for web interfaces, ensuring functionality and responsiveness across different browsers and devices. The course's practical examples of testing an e-commerce site directly relate to real-world frontend development challenges, helping developers validate their UI implementations and enhance overall product quality.
Technical Product Manager
A Technical Product Manager defines product strategy, roadmap, and features, often acting as a bridge between business needs and technical execution. This course may be useful for a Technical Product Manager by providing a deep understanding of Behavioral Driven Development, which is a powerful tool for defining requirements. Learning Gherkin syntax and how BDD scenarios are structured helps a Technical Product Manager articulate user stories with greater clarity and precision, ensuring that development teams build exactly what is intended. This insight improves communication, reduces ambiguity, and enhances product quality by aligning development efforts closely with business value, which is critical for product success. This role often requires an advanced degree.
Solutions Architect
A Solutions Architect designs and oversees the implementation of complex technical solutions, ensuring they meet business requirements and are scalable, secure, and maintainable. This course may be useful for a Solutions Architect by enhancing their ability to design robust testing strategies within large systems. The course covers the architectural design of BDD test frameworks using Python, Behave, and Selenium WebDriver, including directory structures, configuration management, and different reporting integrations. Understanding these practical aspects allows a Solutions Architect to specify appropriate automation frameworks, integrate testing into overall system architecture, and ensure quality is built into the solution from the outset. This role typically requires an advanced degree.

Reading list

We've selected 22 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Cucumber BDD with Python Behave and Selenium WebDriver 2024.
Provides a comprehensive guide to Behavior-Driven Development, covering the entire lifecycle from discovery to delivery. It is an essential companion for understanding the 'why' behind Cucumber and Behave, offering deep insights into collaborative specification. This text is widely used by industry professionals to transition from traditional testing to BDD. It adds significant depth to the course by explaining how to align technical tests with business goals.
Commonly known as the 'Obey the Testing Goat' book, this staple for Python developers learning web automation. It uses Selenium and Django to teach TDD, providing a rigorous framework that complements the course's BDD approach. is particularly useful for students who want to understand how to integrate testing into the full development lifecycle. It adds significant breadth by covering deployment and CI/CD concepts.
As the definitive guide to the Cucumber ecosystem, this book explains the Gherkin language and the philosophy of BDD in detail. While the primary examples are in Ruby, the principles of feature files and step definitions are directly applicable to the Python Behave framework. It useful reference tool for mastering the syntax of Gherkin used in the course. Industry professionals consider this the 'bible' for anyone starting with Cucumber-based tools.
This recent publication covers a wide range of testing types including UI, API, and database testing, all of which are featured in the course. It serves as an excellent reference tool for students building the e-commerce test suite mentioned in the syllabus. The book provides a holistic view of automation that helps learners understand how Selenium and API tests fit together. It is highly relevant for those aiming for a career in Quality Engineering.
The course includes a section on backend and API testing with Python, and this book is the perfect deep-dive into that subject. It covers the strategic approach to API testing, including GET and POST methods mentioned in the syllabus. It provides the technical depth needed to build the 'Backend Helper' modules described in the course. This modern reference tool for any tester working with RESTful services.
While the course focuses on Behave, understanding the broader Python testing ecosystem is crucial for professional development. covers pytest, which is often used alongside or as an alternative to Behave for lower-level testing. It provides helpful background knowledge on test discovery and execution patterns in Python. It is more valuable as additional reading for students looking to expand their automation toolkit beyond BDD.
This highly practical reference book that provides code snippets for common Selenium problems, such as handling alerts, frames, and waits. It directly supplements the course's lectures on 'Selenium WebDriver functions.' It is particularly useful for students working on the practical automation section of the syllabus. It is designed to be kept on the desk as a quick-fix guide during test script development.
As students learn to build a 'ready to go framework,' they must learn to write maintainable code. This classic text is the industry standard for best practices in software development, which the course instructor emphasizes. It vital reference for creating the 'efficiently structured test framework' mentioned in the course description. Reading this will help students pass technical interviews by demonstrating professional coding standards.
Specifically targets the use of Selenium WebDriver with Python, making it a direct technical supplement to the course. It provides practical recipes for finding elements and handling complex web interactions that students will encounter in the e-commerce project. While slightly older, it remains a valuable reference for the core Selenium functions used in Behave step definitions. It is frequently used as a manual for junior automation engineers.
This very approachable book that introduces web automation concepts, including Selenium and the testing pyramid. It great companion for students who feel overwhelmed by the technicality of WebDriver and BDD. It provides a high-level overview that makes the course's lectures on 'BDD Components' easier to digest. Industry professionals often recommend this to manual testers transitioning into automation.
Summarizes the essential practices of testing in an agile environment, where BDD core component. It provides the necessary context for why the course teaches BDD as a 'critical addition to your resume.' It is more valuable as a strategic guide than a technical reference. It helps students understand the collaborative role of a QA engineer in a modern software team.
Focuses on the 'Specification by Example' aspect of BDD, teaching how to write clear and maintainable Gherkin. It is highly relevant to the course modules on feature files and scenario outlines. By reading this, students will learn to avoid common pitfalls in Gherkin writing that lead to fragile test suites. It is more valuable as additional reading to improve the 'business' side of BDD skills.
As the course progresses into building a full framework, students will need to refactor their step definitions and page objects. is the definitive reference for how to safely improve code structure without changing behavior. It crucial resource for the 'Best Practices' mentioned in the course description. It adds significant depth to the concept of maintaining a long-term automation project.
Is an essential prerequisite for learners who have no prior experience with Python. It covers the fundamental syntax and data structures required to write the logic inside Behave step definitions. As one of the most popular Python textbooks globally, it ensures students have a solid foundation before tackling automation. It provides the necessary breadth to understand variables, loops, and classes used in the course.
Once students have mastered the basics of the course, this book provides the 'tips and tricks' for writing professional-grade Python code. It is an excellent reference for optimizing the 'Runner Script' and 'Backend Helpers' discussed in the syllabus. The book is organized into short, actionable items that improve code readability and performance. It staple for professional Python developers seeking to refine their craft.
Since the course includes a 'SQL Crash Course' and database helpers for MySQL, this book serves as an excellent reference for data manipulation. It teaches how to query and manage data, which is vital for verifying backend test results in the course's e-commerce site. The book is beginner-friendly and uses real-world datasets to explain complex joins and filters. It provides the background knowledge needed for the database helper sections of the syllabus.
Is highly recommended for those who want to see the broader application of Python automation beyond just web testing. It provides helpful background on interacting with the file system and environment, which is relevant to the course's setup/teardown sections. It common introductory textbook that makes programming accessible to non-developers. It supplements the course by providing more context on general automation tasks.
Provides the exploratory mindset needed before one can effectively automate BDD scenarios. It helps students understand what to test before they begin writing Gherkin files in PyCharm. While not a coding book, it highly regarded industry text that adds depth to the 'Test Methodologies' mentioned in the course. It is best used as a conceptual supplement to the practical automation exercises.
For students who want to master the 'Backend Helper' and 'Credentials Management' parts of the course, this book offers advanced Python techniques. It covers complex topics like decorators and context managers, which can be used to enhance the Behave environment. It high-level reference tool for those who want their test framework to be exceptionally robust. It is widely respected in the Python community for its depth.
David Farley, a co-author of 'Continuous Delivery,' provides a modern framework for thinking about software as a discipline of engineering. is valuable as additional reading to understand why automated testing and BDD are non-negotiable in modern tech. It adds theoretical depth to the course's mention of 'Test Methodologies.' It high-level text that will benefit students looking to advance into senior or architect roles.
Provides an industry-scale perspective on testing and maintenance, which helps students understand the long-term value of the skills they are learning. It discusses the culture of testing and why automated suites are vital for large-scale software. While not a tutorial, it adds immense breadth to the learner's understanding of the QA profession. It valuable read for anyone looking to work in high-tier tech companies.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser