- Pytest Tutorial
- Pytest - Home
- Pytest - Introduction
- Pytest - Environment Setup
- Identifying Test files and Functions
- Pytest - Starting With Basic Test
- Pytest - File Execution
- Execute a Subset of Test Suite
- Substring Matching of Test Names
- Pytest - Grouping the Tests
- Pytest - Fixtures
- Pytest - Conftest.py
- Pytest - Parameterizing Tests
- Pytest - Xfail/Skip Tests
- Stop Test Suite after N Test Failures
- Pytest - Run Tests in Parallel
- Test Execution Results in XML
- Pytest - Summary
- Pytest - Conclusion
- Pytest useful Resources
- Pytest - Quick Guide
- Pytest - Useful Resources
- Pytest - Discussion
Execute a Subset of Test Suite
In a real scenario, we will have multiple test files and each file will have a number of tests. Tests will cover various modules and functionalities. Suppose, we want to run only a specific set of tests; how do we go about it?
Pytest provides two ways to run the subset of the test suite.
- Select tests to run based on substring matching of test names.
- Select tests groups to run based on the markers applied.
We will explain these two with examples in subsequent chapters.
Advertisements