Using Docker Containers in parallel execution of test cases with Codeception

Parallel execution of test cases is one of the important requirements of clients while implementing test automation framework. Not only the solution to parallel execution should be effective but also easy to understand and implement. Out team at Getskills was actively working on this solution for quite some time. Finally we are able to find such solution which is Docker Containers.We have already some basic idea about it and how it works. Using Kitematic as GUI for Docker Containers makes our life really easy. All we have to do is find an appropriate container which full fill our needs and map it to our Codeception configuration file by using access url and port.
We can have a better understanding with help of screenshots.

In the above screenshot I have selected one of the containers called gigantic_albattani which contains selenium standalone server as well as the firefox environment which is used for running our test cases in Codeception. We can see the container logs in the middle to check if its working fine and towards the right side we can see the access url of the container with the port number. We can also change the port number by going in settings, this way we can use same container multiple times as we have done in our project.
Now our next step is to link this container with our Codeception project. This is rather a very simple step as we already know the access url and port number. This step can also be shown with help of another screenshot.

In the above screenshot we can see that by creating different environments we can use multiple Docker Containers and run the test cases in parallel in different environments.

Kanav Chadha

Kanav Chadha works as advisor and consultant for Getskills ltd. He has a passion for gaining knowledge about advancements in Information and Communication Technologies.

Auckland