We need a working Python interpreter with the PyTest framework installed with the pytest-bdd plugin. PyTest and pytest-bdd can be installed with the following command:
$ pip install pytest pytest-bdd
For each section, you will need to install the plugin discussed in the section itself. You can install all of them at once:
$ pip install pytest-cov pytest-benchmark flaky pytest-testmon pytest-xdist
The examples have been written on Python 3.7 with PyTest 6.0.2 and pytest-bdd 4.0.1, but should work on most modern Python versions. The versions of the plugins in use for each section instead are pytest-cov 2.10, pytest-benchmark 2.3.2, flaky 3.7.0, pytest-testmon 1.0.3, and pytest-xdist 2.1.0.
You can find the code files present in this chapter on GitHub at https://github.com/PacktPublishing/Crafting-Test-Driven-Software-with-Python/tree/main/Chapter08.