python-testcontainers provides capabilities to spin up a docker containers for test purposes would that be a database, Selenium web browser or any other cotainer.
Currently available features:
- Selenim Standalone containers
- MySql db container
- Oracle db container
- PostgreSQL db container
- Google Cloud PubSub emulator container
- Elasticsearch container
- MongoDb container
- Generic Docker containers
The testcontainers module is available from PyPi at:
https://pypi.python.org/pypi/testcontainers and can be installed using pip, depending on which containers you need:
pip install testcontainers[mysql] pip install testcontainers[oracle] pip install testcontainers[postgresql] pip install testcontainers[selenium] pip install testcontainers[google-cloud-pubsub] pip install testcontainers[mongodb] # or with multiple pip install testcontainers[mysql,postgresql,selenium,google-cloud-pubsub]
Tested with Docker for Ubuntu, Mac and Windows.
Was not tested with Docker-machine and Docker Toolbox.
.. toctree:: :maxdepth: 1 Database containers <database> Selenium containers <selenium> Generic containers <generic> Docker Compose <compose> Google Cloud Emulators <google-cloud-emulators>