Hello everyone! I’m Andy Knight, the Automation Panda. I’ve been a Software Engineer in Test, a Developer Advocate, and even Director of Test Automation University. But if you know me, you know that there are two tech topics I absolutely love: Python and BDD.

This course is a combination of the two: Behavior-Driven Python with pytest-bdd.

As the name suggests, in this course, we will learn how to use the pytest-bdd test framework to write behavior-driven tests in Python. We'll start by learning a little bit about Behavior-Driven Development and what advantages it can offer us. We'll even compare different Python BDD-style frameworks to show why I chose pytest-bdd for this course over others like Behave and Radish.

Then, for the majority of the lessons, we'll be looking at how to use pytest-bdd – from writing feature files, to step definitions, to tag filtering, and everything in between.

This will be a hands-on course. You will create a new Python project and progressively add new code to it with each chapter. I also created a GitHub repository that contains all the example code for the course, so if you get stuck, you can compare your code to mine.

  • Each chapter has a corresponding branch in the repository.
  • The “main” branch contains the completed code for the end of the course.
  • The “README” file contains setup and troubleshooting instructions.

Before taking this course, you should have basic Python programming skills. That way, you can focus on learning the concepts more than wrestling with Python itself. If you are new to Python or need to brush up on your skills, you can take TAU’s Python Programming course.

I also strongly recommend taking one of my other TAU courses, Introduction to pytest, as a prerequisite before taking this pytest-bdd course. pytest-bdd is actually just a pytest plugin, so knowing how pytest works will make you more effective with pytest-bdd.

I hope you’re excited to start this course, because I know I am! Let’s jump in.

Resources

© 2024 Applitools. All rights reserved. Terms and Conditions Privacy Policy GDPR