pytest-xdist

pytest xdist plugin for distributed testing and loop-on-failing modes

Here are some articles that you may find helpful