Blog Posts

Docker for Software Testing

Gone are the days where we had different physical systems for developing & testing applications and along with the setup of dependent software. The development of virtualizing hardware inside the system broke away those physical limitations.

It’s a tiring process for a QA team, to build and maintain the test infrastructure that is needed for Test Automation. Though we have cloud services like browser stack, sauce Labs who provide the needed virtualization, comes with their own limitations like cost, performance and security challenges.

On the other hand, Docker is a light weight platform which allows to pack your app in a container with all its required dependencies thereby setting up the Test Automation infrastructure easily, especially with open source Test automation tools like Selenium and Appium (along with their respective packages / servers), where there is no cost involved.

Quick information on Selenium, Appium and Docker Containers:

Selenium is an open source UI Test automation framework for web and web-based applications. It simulates user actions on different Web browsers and validates the functional flow of the Web application. It uses “Selenium-Grid” concept to run the test scripts in parallel distributed infrastructure to pace up the Test Automation execution speed.

Appium is an open source mobile automation tool. It supports Native, Web and Hybrid applications across platforms (Android and iOS). It uses Client-Server architecture to create a communication channel that translates the selenium scripts to device understandable commands.

A Docker image is an opensource tool that provides platform as a service. It uses virtualization at OS-level to deploy software in independent packages. These packages can be read, modified and executed with help of Containers. The advantage of containers, these are isolated from one another and bundle their own software, libraries and configuration files.

Breach of Security or not

Our Security Testing Services are a must

Read More

Now let’s understand on how to leverage Docker Container for a test runner, a selenium Grid, and an appium server, to construct a flexible and disposable test automation infrastructure.

Selenium appium architecture using docker

Test Runner container:

Test Runner is a typical illustration of a test automation tool/ framework. In addition to test automation framework, one should consider dependent libraries and their version, platform/ environment utilities and their access. These automation solutions and their dependencies can be effectively dockerized (bundled) into a docker image.

Selenium-Grid container:

Selenium-Grid container has Selenium Hub and node servers. It allows to run test scripts in parallel and in distributed fashion where different tests can run at the same time on different machines to save execution duration. Selenium Hub is center for managing which machine your Selenium test will run on. To run a Selenium test, we have to configure the machine and browser related information. Based on the configured details the test will execute on the desired machine and browser combination.

Selenium servers using docker

We have to install Selenium servers over multiple machines which is a tedious job. To make this process easy, selenium provides a docker image for Selenium servers. By running Selenium servers (hub and node) in containers, it is very easy to setup and configure the Hub server and to scale up the number of node server containers.

Even more, there are a few open source projects that provide extra functions for Selenium-Grid by extending the Selenium Docker image. Zalenium is one open source project powered by Zalando. It is highly flexible and auto scalable. It has ability to spin up selenium docker containers instantly as nodes without any manual intervention.

The main objective of Zalenium is to have a disposable and flexible Selenium Infrastructure for everyone and in an automated fashion. It also has video recording feature that can be viewed using a VNC player which is live preview board.

Zalenium provides docker-selenium nodes that are created on-demand and disposes of itself after test execution without providing any commands. With this, the test cases can run very fast.

Zelenium container

Appium container:

Let’s have a look at the software required for mobile automation setup with Appium.

Appium framework may not run as per the requirement even if there is any problem with one of the software. This will be definitely a difficult job to configure, scale, maintain and dispose.

Will bundling all these software in a single container make my work easy?

Yes, in docker Hub, there are some images such as appium which contains all of appium’s dependencies in the docker form.
The main goal is to help the user focus on writing the UI tests by leveraging the advantages of using a docker like

Appium servers using docker

In Summation:

Docker can be leveraged for automation testing in addition to providing packaging and deployment support for developers. This helps in setting up and scale out remote servers either for web UI or mobile testing, easily. By having an isolated and stable environment, where everyone can perform testing inside a container to verify the system functions at any development stage.

Is Your Application Secure? We’re here to help. Talk to our experts Now

Inquire Now

Inquire Now

Is Your Application Secure? We’re here to help. Talk to our experts Now

All containers in this infrastructure can be created on demand and destroyed when the job is done. It makes the test infrastructure more flexible and maximizes the availability of machines and devices.

The post Docker for Software Testing appeared first on Indium Software.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/docker-for-software-testing/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×