EdX

Test and Behavior Driven Development (TDD/BDD) (edX)

Offered by IBM,
Test and Behavior Driven Development (TDD/BDD) (edX)

This course provides the fundamentals of Test Driven Development (TDD) and Behavior Driven Development (BDD), and why it’s essential for building quality applications and preventing bugs, reducing development costs and improving performance.

Class Deals by MOOC List - Click here and see EdX's Active Discounts, Deals, and Promo Codes.

Testing is one of the most critical processes of the Software Development Lifecycle (SDLC) and often contributes to preventing bugs, reducing development costs, and improving performance. Two of the best methods for testing software are Test Driven Development (TDD) and Behavior Driven Development (BDD). TDD tests individual units of code while BDD tests how these units work together.
This course introduces you to the fundamentals of both TDD and BDD, You’ll discover what automated testing is and why it is essential for building robust applications resilient to failure. You'll explore the basics of testing, including test cases, testing levels, the traditional release cycle, and the benefits, concepts and popular tools involved.
This course provides multiple real-world inspired hands-on labs to demonstrate your skills with TDD and BDD. You’ll create TDD test cases by writing test assertions and building test fixtures, and you’ll run these test cases using the Nose testing package. You’ll practice more advanced TDD methods, such as increasing code coverage, generating and using fake data, and testing mock objects. You’ll also practice setting up a BDD environment using Behave, write the feature and step files, test a web interface using Selenium, and load sample data for testing.
By the end of the course you will have the knowledge and skills to perform test driven development (TDD) and behavior driven development (BDD) testing and understand when to apply these development techniques.
This course is part of the DevOps and Software Engineering Professional Certificate.

What you'll learn

  • Explain the importance of testing.
  • Describe test-driven development (TDD) and explain its benefits for DevOps.
  • Develop unit tests with test assertions and test fixtures and then run the tests.
  • Improve unit testing through advanced TDD methods including coverage reports, factories, fakes, and mock objects.
  • Summarize the steps in a typical BDD workflow.
  • Describe popular BDD tools and their benefits.
  • Conduct BDD tests using Honcho and Behave.

Syllabus

Module 1: Introduction to Testing

  • The Importance of Testing
  • Why Developers Don’t Test
  • Testing Levels and Release Cycle
  • TDD and BDD
  • Testing Case Study

Module 2: Introduction to Test Driven Development

  • Benefits of Test Driven Development
  • Tools for TDD
  • Running Tests with Nose
  • Running Tests with Nose Demo
  • Hands-on Lab: Running Tests with Nose
  • Anatomy of a Test Case
  • Writing Test Assertions
  • Writing Test Assertions Demo
  • Hands-on Lab: Writing Test Assertions
  • Test Fixtures
  • Creating Initial State Using Test Fixtures Demo
  • Hands-on Lab: Creating an Initial State Using Test Fixtures

Module 3: Advanced Methods for Test Driven Development

  • Test Coverage
  • Running Test Cases with Coverage Demo
  • Hands-on Lab: Running Test Cases with Coverage
  • Factories and Fakes
  • Factories and Fakes Demo
  • Hands-on Lab: Using Factories and Fakes
  • Mocking
  • Mocking with Patch
  • Mocking with Mock Objects
  • Mocking with Mock Objects Demo
  • Hands-on Lab: Mocking Objects
  • Practicing Test Driven Development
  • Practicing Test Driven Development Demo
  • Hands-On Lab: Practicing Test Driven Development

Module 4: Introduction to Behavior-Driven Development

  • What is Behavior Driven Development
  • Benefits of BDD
  • BDD Workflow and Gherkin Syntax
  • Example of BDD
  • Tools for Behavior Driven Development
  • Overview of Behave
  • Environment Setup
  • Environment Setup Demo
  • Hands-on Lab: Setting up an Environment
  • Writing Feature Files
  • Writing Feature Files Demo
  • Hands-on Lab: Writing Feature Files
  • Selenium
  • UI Considerations
  • Writing Step Files
  • Writing Step Files Demo
  • Hands-on Lab: Writing Step Files
  • Loading Test Data with Behave
  • Loading Test Data with Behave Demo
  • Hands-on Lab: Loading Test Data with Behave

Module 5: Running Behave for Behavior Driven Development

  • Generating Steps with Behave
  • Generating Steps with Behave Demo
  • Hands-on Lab: Generating Steps with Behave
  • Implementing Your First Steps
  • Implementing Your First Steps Demo
  • Hands-on Lab: Implementing Your First Steps
  • Working with the Context
  • Working with the Context Demo
  • Hands-on Lab: Working with the Context
  • Using Variable Substitution
  • Using Variable Substitution Demo
  • Hands-on Lab: Using Variable Substitution
  • BDD in Practice

Module 6: Final Project

Go to Class
MOOC List is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Related Courses

Creative Design, Prototyping, and Testing (Coursera) Coursera
University of Maryland, College Park

Creative Design, Prototyping, and Testing (Coursera)

Designing the customer and user experience is essential to creating great products today. Gone is the old paradigm of “form follows function” model of design. The process must be iterative and follow the best product design and development processes. While designing a great user experience can be a lengthy and expensive process, there are approaches to doing it faster and smarter, without compromising results.

Sep 21st 2026
4 Weeks
A Practical Introduction to Test-Driven Development (Coursera) Coursera
LearnQuest

A Practical Introduction to Test-Driven Development (Coursera)

To be a proficient developer you need to have a solid grasp of test writing before putting code into production. In this course, we will take a hands-on look at Test-Driven Development by writing and implementing tests as soon as week one. TDD starts with good unit tests, so we will start there. Topics will also cover translating user specs into unit tests, applying the Red-Green-Refactor mantra, and applying mocks in python with the unittest.mock module. Once finished, you will have covered all the steps of TDD before development.

Sep 21st 2026
3 Weeks
Automated Software Testing: Model and State-based Testing (edX) EdX
Delft University of Technology,DelftX

Automated Software Testing: Model and State-based Testing (edX)

Learn the advanced software testing techniques, tools, and best practices required to deliver high-quality software. Software testing gets a bad rap for being difficult, time-consuming, redundant, and above all - boring. But in fact, it is a proven way to ensure that your software will work flawlessly and can meet release schedules.

Self Paced
Self-Paced
Black-box and White-box Testing (Coursera) Coursera
University of Minnesota

Black-box and White-box Testing (Coursera)

After completing this course, learners will have an understanding of a variety of black-box and white-box testing techniques. The learner will have put this understanding into practice, creating effective sets of test cases (called a test suite) to properly exercise software for defect finding. The learner will have examined requirements for testability, created an oracle for automated testing, assessed fault-finding effectiveness of test suites, and generated inputs using a variety of techniques.

Sep 21st 2026
4 Weeks
Integrating Test-Driven Development into Your Workflow (Coursera) Coursera
LearnQuest

Integrating Test-Driven Development into Your Workflow (Coursera)

In this course we will discuss how to integrate best practices of test-driven development into your programming workflow. We will start out by discussing how to refactor legacy codebases with the help of agile methodologies. Then, we will explore continuous integration and how to write automated tests in Python. Finally, we will work everything we've learned together to write code that contains error handlers, automated tests, and refactored functions.

Sep 21st 2026
4 Weeks
Business Model Testing (edX) EdX
Delft University of Technology,DelftX

Business Model Testing (edX)

Learn how to stress test your business model to help you anticipate change and harness your business model’s success. The world is changing rapidly and full of uncertainties. The future success of a business model depends on how well it is adapted to changing circumstances. Do you want to become aware of the relevant developments in technology, markets and society? And understand how this affects your business?

Self Paced
Self-Paced
Writing, Running, and Fixing Code in C (Coursera) Coursera
Duke University

Writing, Running, and Fixing Code in C (Coursera)

Building on the course Programming Fundamentals, this course will teach you how to write code by first planning what your program should do—an important approach for novice and professional programmers. You will learn how to compile and run your program, and then how to test and debug it. This course builds on the Seven Steps you have already learned and provides a framework for systematically testing for problems and fixing them, so you can find and fix problems efficiently.

Sep 21st 2026
4 Weeks