Learning PyTest - Suggested path¶
I have made some videos to assist in using this PyTest Cookbook and how to customise the hooks and plugins used to create custom terminal reports and custom CSV files.
These videos are available here.
He also has a guide https://github.com/CoffeeBeforeArch/pytest_guide/blob/main/src/intro/intro.md.
1. CoffeeBeforeArch¶
Located in 02_py_coffee
in PFS, this is a great video series on PyTest. I have included the tests form his repo as part of the template tests. Links in repo.
2. Indian Pythonista¶
Located in 03_indian_pythonista
in PFS, this is another great video series that has source code included.
3. PyTest with Eric¶
This is perhaps one of the best resources for PyTest, PyTestWithEric, and I am creating videos of them and incorporating the GitHub code to provide a second content delivery medium, explaining salient points.
This is both for my own technical development and a way of creating a greater audience for this body of work.
I have started recording videos of me go through the article and adding them to PyTest Full Stack in 60_pwe
, (with Eric's permission).
Playlist PyTest With Eric
Articles videod:
- 01 pytest-html
- 02 suppress warnings
- 03 read yaml files with argparse and typer and test
- 04 transactions with SQL Model
- 05 setting up allure reporting
- 06 automated testing with GitHub actions
- 07 wiring of the big Mortgage Calculator FastAPI test suite
4. Brian Okken¶
Python Testing with pytest, Second Edition Simple, Rapid, Effective, and Scalable by Brian Okken
The definitive book!
https://pragprog.com/titles/bopytest2/python-testing-with-pytest-second-edition/
5. Hooks and Plugins¶
For an advanced look at these topics, I have my course hosted on Udemy:
The course is available Udemy Hooks and Plugins course and Udemy has a sale ever two weeks and the cost would be $20 USD approx.
The repo contains heavily commented source files creating a sort of 'ebook' and is freely available https://github.com/Python-Test-Engineer/Udemy-PyTest. The video course adds visual explanations and commentary.