Testsigma Docker Setup


This guide will help you setup Testsigma Server and MySQL as docker containers using Docker Compose. This is the easiest way to set up Testsigma on your local machines.


Prerequisites


Setting up Testsigma Community Edition with Docker

Create a folder called Testsigma where you would like to install Testsigma and store the logs and runtime data.

cd cmd into this installation folder (Testsigma)


Step 1: Download docker-compose.yml file

Download docker-compose.yml file into the Testsigma installation folder from here. Download the appropriate file based on your OS.

NOTE:
  • If you are using Apple M1 machines then you should replace the testsigmahq/server image version in docker-compose.yml with the M1 docker image tag. For example if the version is v1.0.0 then you should add "-m1" and make it v1.0.0-m1. So the final image name looks like this "testsigmahq/server:v1.0.0-m1"

Step 2: Run Testsigma Server

The following command will run Testsigma along with a MySQL database to store data.

$ docker-compose up -d 



Check if the containers are running using the following commands

$docker ps

CONTAINER ID        IMAGE                   …       STATUS            PORTS                                     Names    			                                              
580db1ec9ad1        testsigmahq/server:m1   …       ….	              443->443/tcp, 9090->9090/tcp, 9090/tcp    testsigma\_server 
318c46259b15        mysql:5.7               …       ….	              33060/tcp, 55581->3306/tcp                testsigma\_mysql

You should see a message: “Testsigma is Running!” once the container is ready.

Your Testsigma server should be up and running now. Testsigma server will be accessible at https://local.testsigmaos.com/ui


Verifying the installation

By default folders db_data, ts_data will be created in the installation folder to store the application data and MySQL data. If you want to change this folder path you can open docker-compose.yml and change the db_data volume path under mysql service and ts_data path under testsigma_server.


Connecting to External MySQL

If you want to connect to an external/existing MySQL database, add the below environment variables

MYSQL_HOST_NAME = < mysql _host_name> where mysql_host_name is your database url
MYSQL_PORT = < port_number> where mysql is running
MYSQL_DB_NAME = < db_name> where you want to save data
MYSQL_USER = < username>
MYSQL_PASSWORD = < password>


Step 3: Install and configure Testsigma Agent

When we run the Testsigma server using Docker it runs in a separate container(child process), where it cannot access the applications installed in the host machine. But in order to automate Web and Mobile Apps the Testsigma Server (running in docker) has to access Browsers and Mobile Devices connected to the host machine.

To achieve this we use Testsigma Agent that connects the Testsigma Server with the host machine to access the browsers and mobile devices connected.

Download and Install Testsigma Agent

Login to https://local.testsigmaos.com/ui and follow the steps mentioned here(Setup: Windows, Mac, Linux) to Install and configure the the Agent


Update to new Version(Testsigma Server)

  1. Stop the Docker images/container with name Testsigma in Docker Desktop, alternatively you can use the below commands to kill the processes
     a. sudo su
     b. docker container kill $(docker ps -q)
  2. Download the latest version of docker-compose.yml file into the Testsigma installation folder from here.
  3. Run $ docker-compose up -d
  4. Verify the status by running $docker ps command
  5. Now login to check the updated version of Testsigma Server here https://local.testsigmaos.com/ui

Update to new Version(Testsigma Agent)

  1. Stop the running agent by executing the stop.sh
  2. Delete the TestsigmaAgent folder
  3. Login to https://local.testsigmaos.com/ui
  4. Go to Agents menu to download the latest version of Testsigma Agent
  5. Now start the Agent by executing start.sh
NOTE:

Troubleshooting


Next Steps

  1. Get Started with Automating Web Applications
  2. Get Started with Automating Mobile Web Applications
  3. Get Started with Automating Android Apps
  4. Get Started with Automating iOS Apps
  5. How to automate tests for Android Apps using local devices
  6. How to automate tests for iOS Apps using local devices