Testsigma Setup using Bundled Package


Prerequisites

Create a folder called testsigma where you would like to install Testsigma.

cd cmd into this installation folder(testsigma)


Step 1: Download the Package

Download the Testsigma zip into the installation folder(testsigma) from https://github.com/testsigmahq/testsigma/releases/latest/

You will find the following files in this location, download the appropriate one based on your OS.

  • Testsigma-Windows-{latest-version}.zip
  • Testsigma-Mac-{latest-version}.zip
  • Testsigma-Linux-{latest-version}.zip

 

Once the file is downloaded, extract it to the directory you wish and follow the steps below: We need 4 components for the Testsigma community server to work:

  • MySQL (not bundled)
  • Nginx (bundled)
  • Testsigma Server (bundled)
  • Testsigma Agent (bundled)

MySQL

Install MySQL

  1. Download and install MySQL from https://dev.mysql.com/downloads/mysql/
  2. Set the MySQL password for the root user as root. You can choose to set a different password, but while starting the testsigma API server you will need to set this as an environment variable (MYSQL_PASSWORD).

 

Connect with Existing MYSQL

You can also connect with an external/existing MYSQL server instance. Set the following environment variables to connect with the existing MYSQL Instance

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>


Nginx

Since we have UI components and API server separately we need a single application to route the requests between them. Nginx is the one that facilitates this. Nginx listens to 443 ports for HTTPS connections and forwards them to the API server, so make sure this port is not occupied by another service.


Testsigma Server

Testsigma follows API first approach, all APIs are served from this service. This service contains all APIs and business logic to support the Testsigma UI and all other backend processes. Testsigma Server is a Spring Boot application that runs on port 9090 by default. Make sure that 9090 is free. If you want to change the port follow the steps below.

  • Before changing the ports, stop Nginx, Testsigma Server and Testsigma Agent.
  • Navigate to the Nginx folder from the downloaded Testsigma zip and open nginx.conf. In the text http://localhost:9090 replace the port you would like to use and save it.
  • Before starting the Testsigma server set the environment variable TESTSIGMA_SERVER_PORT to the port you want
  • Before starting the Testsigma agent, set the environment variable LOCAL_SERVER_URL to http://localhost: here you can replace with the port you would like to use.

Testsigma Agent

Testsigma Agent is a microservice that processes test case data and runs tests on browsers and mobile devices. The Testsigma agent runs on ports 9393 (HTTP) and 9494 (HTTPS) by default. If you want to change these ports, follow the steps below:

  • Before changing the ports, stop Nginx, Testsigma Server, and Testsigma Agent.
  • Before starting the Testsigma server you need to set the environment variable LOCAL_AGENT_URL= https://localhost:<http_port>, here you can replace the <http_port> with the port you want to use for the agent.
  • Before starting the Testsigma agent you need to set the environment variables TESTSIGMA_AGENT_HTTP_PORT for HTTP port and TESTSIGMA_AGENT_HTTPS_PORT for HTTPS port.

Step 2: Run Services

Windows

Starting Nginx:

  • Open a command prompt
  • Navigate to the extracted folder
  • Run start_nginx.bat to start Nginx
  • If you want to stop nginx at any point in time then, run the start_nginx.bat script

Starting API Server:

  • Open a command prompt
  • Navigate to the extracted folder
  • Navigate to the TestsigmaServer folder
  • Run start.bat file to start the Testsigma API server
  • You can run stop.bat if you want to stop the API server at any point in time

Starting Local Agent:

  • Open a command prompt
  • Navigate to the extracted folder
  • Navigate to the TestsigmaAgent folder
  • Run start.bat file to start the Testsigma Agent
  • You can run stop.bat if you want to stop the agent at any point in time

Mac / Linux:

Starting Nginx:

  • Open a command prompt
  • Navigate to the extracted folder
  • Run start_nginx.sh file to start the Nginx
  • You can run stop_nginx.sh if you want to stop the nginx at any point in time

Starting API Server:

  • Open a command prompt
  • Navigate to the extracted folder
  • Navigate to the TestsigmaServer folder
  • Run start.sh file to start the Testsigma API server
  • You can run stop.sh if you want to stop the API server at any point in time

Starting Local Agent:

  • Open a command prompt
  • Navigate to the extracted folder
  • Navigate to the TestsigmaAgent folder
  • Run start.sh file to start the Testsigma API agent
  • You can run stop.sh if you want to stop the agent at any point in time

Verifying the installation

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


Update to new Version

  1. Stop Nginx, TestsigmaServer, TestsigmaAgent
  2. Delete the Testsigma Installation folder
  3. Download the latest version from here https://github.com/testsigmahq/testsigma/releases/latest/
  4. Repeat the steps explained in “Step2: Run Services” section
  5. Now login to check the updated version of Testsigma Server here https://local.testsigmaos.com/ui

Troubleshooting

If you encounter any errors during this process, check out our guide on debugging deployment errors. If you are still facing any issue, please reach out to support@testsigma.com or join our Discord Server to speak to the Testsigma team directly!


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