Distribute tests to cloud machines without fuss

pip install pytest-cloudist==0.1.0



pytest-cloudist is a pytest plugin to that distributes your tests to AWS EC2 machines with a minimum of fuss. It is a thin wrapper around Meadowrun, which does the heavy lifting of starting EC2 instances and synchronizing environment and code.


Simply pip install alongside pytest:

python -m pip install pytest-cloudist

That makes the following command line arguments on pytest available:

Distributed testing in the cloud using Meadowrun:
                        Set mode for distributing tests to workers.
                        test: send each test to a worker separately.
                        file: send each test file to a worker separately.
                        (default) no: run tests inprocess, don't distribute.
                        The number of tasks to target per worker. This number determines whether individual tests or files are grouped and sent as a chunk to the test worker. Chunking is normally more efficient, but may affect load balancing and worsen the effect of stragglers.
                        Number of workers to use for distributed testing.
                        The number of logical CPUs needed per worker.
                        The amount of memory (in GiB) needed per worker.
                        The estimated probability that spot instances are interrupted by AWS. Set to 0 for on-demand instances, which will be up to 10x more expensive.
                        Extra files to copy as to the remote machines, if needed. .py files on sys.path are copied automatically.
                        Initialization command to run once per worker


By default, pytest-cloudist is not activated, i.e. your tests run locally as normal. To enable pytest-cloudist, pass either --cloudist test or --cloudist file with any other options.


The code and approach of pytest-cloudist, in terms of pytest integration, are heavily based on the code for pytest-xdist, and as a result it is also licensed as MIT.