Advanced testing with pytest
Beginner
Developer
Student
Azure
Improve multi-input tests with parametrize and use pytest fixtures for reusable code.
Learning objectives
By the end of this module, you'll be able to:
- Use the
pytest
framework and its library helpers to solve common testing problems - Work with parametrize to create tests with multiple input values
- Create and use fixtures, which allow you to extend and share testing functionality.
Prerequisites
- Ability to write Python scripts
- Familiarity with command-line tools and executing scripts
- Python 3.6 or later and a virtual environment with pytest installed on your computer. Follow the steps in the Install Python 3 module. At the top of the article describing how to install Python, select your environment: Windows, Linux, or macOS.
Get started with Azure
Choose the Azure account that's right for you. Pay as you go or try Azure free for up to 30 days. Sign up.