pytest-dev / pytest-xdist

pytest plugin for distributed testing and loop-on-failures testing modes.
https://pytest-xdist.readthedocs.io
MIT License
1.48k stars 232 forks source link

Support controlling whether a specific Worker starts and stops testing #1139

Open M2asXe opened 3 weeks ago

M2asXe commented 3 weeks ago

Our business requires controlling Workers in multiple different environments for testing. These Worker-controlled environments may include mobile phones, Linux, MacOS, Windows, etc. We have mechanisms for automatically detecting and restarting these environments, but sometimes certain environments still cannot function properly. We hope to be able to exclude them and allocate test cases to Worker processes corresponding to normal environments.

Can we consider supporting?

RonnyPfannschmidt commented 3 weeks ago

more context is needed for good suggestions

the common recommendation for testing against multiple environments is to have one ci job/matrix entry per environment an having the ci system manage the provisioning of the environment

that way xdist would not have to care as xdist would not need to distinguish environments

additionally commonly one needs to run most/all tests against each environment, having xdist split tests between different environments would imply not running them elsewhere