Docker + Python + WebDriver

Hello all, recently I started working on automating a python application using WebDriver for regression testing. While creating the regression suite using python and selenium webdriver I came to understand that there are a lot of dependencies other than python as well. To start of at the very beginning we would be needing pip which is basically a python package manager that would help you installing the python dependencies like Selenium and Python virtual display (This python package is a wrapper for Xvfb and can help run tests in Firfox and Chrome HEADLESS). Besides this I have use npm (node package manager) to install the latest version of chromedriver and geckodriver which would help run your test on your corresponsing browser.

So instead of installing all the packages and dependencies and then start running your tests in the system why no we have a virtual platform that can provide these dependencies and the python packages to kick start of with the automation project. So I have created a Docker image that has all the dependencies and the required python packages. As I have already discussed in my previous post that docker gives you the flexibility to execute your builds and pipeline processes without thinking much about the platform. We can get the entire Infrastructure as a code up and running in no time. All you need is to ship your automation project to Docker and see it running hassle free.

For further details you can check my webpage for the pre-requisites to get started with pyconauto, also you can customize the Docker template as per your need.

If you already have docker installed in your machine you can do a docker pull corefinder/pyconauto or you can even use docker kitematic to take a pull of the image and get started with your automation. To check the details for docker you can check it on dockerhub as well.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s