The Race for Speed: Threading, Multiprocessing or Asyncio in Your Automated Tests?
-
40 min
Let’s dive into the world of high‑performance automated tests and figure out how to speed up their execution manifold. We will guide the listener through the evolution of multitasking in Python, examining each approach — threading, multiprocessing, and asyncio — not only in theory but also through practical code examples using the tools pytest‑parallel, pytest‑xdist, and pytest‑asyncio.
We will touch upon the future of Python, discussing how disabling the GIL (PEP 703) and sub‑interpreters could drastically change the landscape of multitasking test execution. In the end, you will get a clear algorithm and a handy cheat sheet for selecting the optimal tool for your tasks so that you can immediately apply the acquired knowledge in practice.