- Pytest - Discussion
- Pytest - Useful Resources
- Pytest - Quick Guide
- Pytest - Conclusion
- Pytest - Summary
- Test Execution Results in XML
- Pytest - Run Tests in Parallel
- Stop Test Suite after N Test Failures
- Pytest - Xfail/Skip Tests
- Pytest - Parameterizing Tests
- Pytest - Conftest.py
- Pytest - Fixtures
- Pytest - Grouping the Tests
- Substring Matching of Test Names
- Execute a Subset of Test Suite
- Pytest - File Execution
- Pytest - Starting With Basic Test
- Identifying Test files and Functions
- Pytest - Environment Setup
- Pytest - Introduction
- Pytest - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
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 exppcitly.
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.
Advertisements