Testing and Continuous Integration
Learning Path ⋅ Skills: Unit Testing, Doctest, Mock Object Library, Pytest, Continuous Integration, Docker, Code Quality, Test Automation, Software Testing, CI/CD
Embark on a journey to Python testing excellence with Real Python. Begin with fundamental testing concepts, progress through unittest, doctest, mock objects, and Pytest. Conclude with advanced continuous integration practices using Docker. Perfect your skills step-by-step.
Testing and Continuous Integration
Learning Path ⋅ 7 Resources
Course
Test-Driven Development With pytest
In this hands-on course, you’ll see how to create Python unit tests, execute them, and find the bugs before your users do. You’ll learn about the tools available to write and execute tests, check your application’s performance, and even look for security issues.
Interactive Quiz
Getting Started With Testing in Python
Tutorial
Python's doctest: Document and Test Your Code at Once
Learn how to add usage examples to your code's documentation and docstrings and how to use these examples to test your code. To run your usage examples as automated tests, you'll use Python's doctest module from the standard library.
Tutorial
Python's unittest: Writing Unit Tests for Your Code
Learn how to use the unittest framework to create unit tests for your Python code. Along the way, you'll also learn how to create test cases, fixtures, test suites, and more.
Interactive Quiz
Python's unittest: Writing Unit Tests for Your Code
Course
Improve Your Tests With the Python Mock Object Library
Learn how to use the Python mock object library, unittest.mock, to create and use mock objects to improve your tests. Obstacles like complex logic and unpredictable dependencies make writing valuable tests difficult, but unittest.mock can help you overcome these obstacles.
Interactive Quiz
Understanding the Python Mock Object Library
Course
Testing Your Code With pytest
Learn how to take your testing to the next level with pytest. You'll cover intermediate and advanced pytest features such as fixtures, marks, parameters, and plugins. With pytest, you can make your test suites fast, effective, and less painful to maintain.
Interactive Quiz
Effective Testing with Pytest
Course
Continuous Integration With Python
Learn the core concepts behind Continuous Integration (CI) and why they are essential for modern software engineering teams. Find out how to how set up Continuous Integration for your Python project to automatically create environments, install dependencies, and run tests.
Tutorial
Build Robust Continuous Integration With Docker and Friends
In this tutorial, you'll use Docker and GitHub Actions to build a robust continuous integration pipeline for a multi-container web application consisting of Flask and Redis. Along the way, you'll learn how to dockerize a Python web application.
Got feedback on this learning path?
Looking for real-time conversation? Visit the Real Python Community Chat or join the next “Office Hours” Live Q&A Session. Happy Pythoning!