-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests in random order on nodes #229
Comments
currently this is not possible at all - based on the work in the loadscope sheduler it should be possible to randomize better the main problem is, that xdist is incompatible with worker side collection reordering and the same plug-ins cant nicely put it in place for the schedulers |
running test suite in parallel before we get too far we should also monitor pytest-dev/pytest-xdist#229 because right now one cannot run tests in random order as well as run in parallel
running test suite in parallel before we get too far we should also monitor pytest-dev/pytest-xdist#229 because right now one cannot run tests in random order as well as run in parallel
running test suite in parallel before we get too far we should also monitor pytest-dev/pytest-xdist#229 because right now one cannot run tests in random order as well as run in parallel until then, I've added another makefile target that can run the tests in parallel, and have left that running in CI.
running test suite in parallel before we get too far we should also monitor pytest-dev/pytest-xdist#229 because right now one cannot run tests in random order as well as run in parallel until then, I've added another makefile target that can run the tests in parallel, and have left that running in CI.
running test suite in parallel before we get too far we should also monitor pytest-dev/pytest-xdist#229 because right now one cannot run tests in random order as well as run in parallel until then, I've added another makefile target that can run the tests in parallel, and have left that running in CI.
I would be quite curious to find out if someone found a way to randomize test order while running xdist as from time to time I endup facing testing issues related to parallel runs that are hard to reproduce. |
I understand https://pypi.org/project/pytest-randomly/ supports xdist? |
Yes, looking at the code seems like Closing this then. 👍 |
Sorry if this has been covered elsewhere or is obvious, but I would like to be able to run our test suite with the tests running in a random order where the order is controlled by a random seed to allow reproducibility. At the moment I can do that with
pytest-random-order
orpytest-randomly
but as soon as I use-n
everything gets confused because it seems the randomization messes with the test to node allocation and the subprocesses complain that they have been scheduled the same tests or that tests are missing.Is there any way the xdist scheduler can play nicely with
pytest-random-order
or any way to control the ordering inxdist
itself?My motivation for this is that we are finding that some of the tests are sensitive to test execution order and fail if run first or on their own.
The text was updated successfully, but these errors were encountered: