Categories

Docker

Docker is an open source platform for creating, deploying and running applications in isolated environments called "containers".

Containers are light, self-contained software units that encapsulate all the elements needed to run an application, such as code, libraries, dependencies and configurations.

Tests designed on Agilitest can be executed with Docker and its containers composed of images. Create and maintain your tests with Agilitest then execute them with Docker to take advantage of graphical interface-free background executions that will result in detailed reports.

What is Docker?

Docker uses images to create containers. A Docker container is a running instance of a Docker image. Images are created from files called Dockerfiles, which describe the steps involved in building the image.

The container provides an isolated environment to execute an application in a consistent and repeatable way, independent of the host environment. Each container is isolated from the others and uses system resources efficiently.

Unlike a virtual machine, which requires a complete operating system, each Docker container shares the same operating kernel with the host, making more efficient use of hardware resources.

To know more on how to use Docker you can consult the Docker documentation: https://docs.docker.com/

Docker and ATS

ActionTestScript is a structured, readable test language used to create reliable, high-performance GUI automated test campaigns.

Test scripts are defined by a sequence of actions executed on a web or desktop application. Scripts written in ATS are converted into Java classes and then executed using the Selenium and TestNG frameworks.

With ATS, test designers focus solely on the functional actions to be performed and do not have to worry about technical considerations.

By combining Docker with ActionTestScript, you now have the ability to run test suites in predefined environments, under Linux or Windows. These environments are equipped with the latest versions of browsers and web drivers.

To use Docker images, copy the DockerPull command line of the image,

Docker pull command

Then, execute the command in your script created in Agilitest through your Terminal in your computer.

💡 Tip

To update your environment, simply perform a Docker pull before each test launch to obtain the latest version of Docker images based on browser updates, web drivers, etc.

This combination offers great flexibility and enables a high level of control to be maintained over test conditions, guaranteeing accurate and reliable results.

No specific configuration is required on the machine running the tests, with the exception of installing the Docker application.

To install Docker, click on the download link directly on the Docker website: https://www.docker.com/

Use a Docker image

To discover available Docker images of ActionTestScript, you can consult the Docker Hup web page: https://hub.docker.com.

Enter "actiontestscript" in the search bar to show all the corresponding images.

DockerHUB

This platform allows you to consult the details of each image, such as its version, metadata and instructions for use.

Docker Hub details

Docker Hub makes child's play of using ready-to-use Docker images, such as those from ActionTestScript.

🔸Warning

The first time you download the Dockerhub it will be around 3GB, however, with each update it will only download portions of images since the base will already be downloaded. The images are cut into 'slices' with a GUID. They are generally 150-200MB files.

ATS images

With Docker you have image repositories based on Linux and Windows operating systems (OS) at your disposal.

Linux images can be exectude on:

  • Windows host via Hyper-V or via Windows Subsystem for Linux (WSL)
  • Linux windows
  • MacOs

As for Windows images, they can only be run on a Windows host using Hyper-V and only with a "pro" version of Windows (10 or 11).

Linux OS-based images

linux : Ready to be used to execute tests with ActionTestScript, either with AtsLauncher or Maven.

linux-base : Contains the Java Jdk, Maven and tools such as Git, Zip, Unzip and Bzip2.

linux-browsers : Contains the latest web browsers. The browsers included are : Brave, Firefox, Google Chrome, Microsoft Edge and Opera.

Tests with Docker

In Linux and Windows Docker images, only tests on web browsers and all API tests can be executed. It's also quite easy to run tests with Jenkins or others on non-graphical servers with just a few command lines.

Prerequisites :

  1. On a Windows host

Once it is installed, you need to execute Docker Desktop on the host to use Docker containers.

        2. On a Linux host

Consult the following page: https://docs.docker.com/engine/install/ubuntu/

Next, you need to retrieve the Docker image:

  • On a Windows host : In a PowerShell console: Docker pull actiontestscript/linux
  • On a Linux host : In a bash console or shell: Docker pull actiontestscript/linux
  • Repository Git

🔸 Warning

It is important to note that tests involving system actions will not work.

Once the tests have been executed, you can generate reports that include images, just like a normal test. The report can include screenshots, even though there is basically no screen. Everything is stored in memory thanks to the web browser. This means that the tests can run on servers that do not have graphical interfaces.

Still require support?
Contact support