? QA Design Gurus: Docker for Testing

Aug 4, 2015

Docker for Testing

As per the definition from docker.com, Docker allows you to package an application with all of its dependencies into a standardized unit for software development. It is an engine that enables any payload to be encapsulated as a lightweight, portable, self-sufficient  container that  can be manipulated using standard operations and run consistently on virtually any hardware platform. Some of its characteristics are:

  • •  It includes the application and all of its dependencies, but share the kernel with other containers.
  • •  They run as an isolated process in userspace on the host operating system.
  • •  Docker containers run on any computer, on any infrastructure and in any cloud
There are multiple ways we could use Docker for testing. 


Selelnium Grid and Docker


Selenium Grid is a great way to speed up your tests by running them in parallel on multiple machines. However, rolling your own grid also means maintaining it. Setting up the right browser / OS combinations across many virtual machines (or – even worse – physical machines) and making sure each is running the Selenium Server correctly is a huge pain. Not to mention troubleshooting when something goes wrong on an individual node. God help you when it comes time to perform any updates. Thinking about this problem, it’s clear we need a central point from where we can configure and update our hub / nodes. It would also be great if we had a way to quickly recover in case an individual node crashes or otherwise ends up in a bad state. Selenium Grid is distributed system of nodes for running tests. Instead of running your grid across multiple machines or VMs, you can run them all on a single large machine using Docker
These references (link1 and link2) describes this in detail.

Security testing using Docker

ZAP is an intercepting proxy. It is dockerized. It essentially means that you can download a docker image from here and run ZAP inside a container and acting as a proxy for your website testing. You can configure your browser to connect through the ZAP proxy on 127.0.0.1:8080 and start to playHTTP and HTTPS connections. More details here

Performance Testing using Docker and JMeter 


Instead of JMeter running on VMs, create Docker images. Docker also has the ability to iterate, correct and improve on an existing image. Some of the key advantages of using Docker here:- Creating and modifying Docker image is fast and easy, Since the JMX and data files were maintained on the host a change in these files simply means restart the container, Creating additional JMeter server instance is just a matter of another docker run invocation and finally startup time will be almost imperceptible. 

More details here






No comments:

Post a Comment