- 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
Pytest - Introduction
Pytest is a python based testing framework, which is used to write and execute test codes. In the present days of REST services, pytest is mainly used for API testing even though we can use pytest to write simple to complex tests, i.e., we can write codes to test API, database, UI, etc.
Advantages of Pytest
The advantages of Pytest are as follows −
Pytest can run multiple tests in parallel, which reduces the execution time of the test suite.
Pytest has its own way to detect the test file and test functions automatically, if not mentioned explicitly.
Pytest allows us to skip a subset of the tests during execution.
Pytest allows us to run a subset of the entire test suite.
Pytest is free and open source.
Because of its simple syntax, pytest is very easy to start with.
In this tutorial, we will explain the pytest fundamentals with sample programs.
To Continue Learning Please Login
Login with Google