execute several times a test with pytest

pytest, python

Solution

Actually you may try running with pytest-xdist like this:

py.test --dist=each --tx=3*popen

This will run the same tests 3 times in three different subprocesses.

Problem

Is there a way to run a test x times with py.test? What I'm looking for it's to repeat a test several times, because the tests has random fixtures. Something like py.test -n100 I've been playing with pytest-xdist but if I understand well it only distributes the tests among the cpus.

Original source