For Hybrid Model and Private Grid, we need to configure a local machine to execute the tests. We can do that by running a small utility software named 'Testsigma Agent' on the local machine. The Agent will do the required configuration, avoid the hassle of numerous configuration for end-users and allow us to concentrate on managing the tests alone.


Note: This article is for First-time setup of Testsigma Agent. If you have previously configured Testsigma Agent on your local machine, please upgrade to the newer auto update version mentioned in this article using the following guide: How to upgrade the Testsigma Agent to the newest auto-update version(One time setup)?


Prerequisites

Before starting the setup for Hybrid Execution, please make sure the following prerequisites are satisfied:

1. Java Runtime Environment(JRE) - Java is required for running Testsigma Agent on a machine. If you already have Java installed on your machine, you can skip to Environment variables part below. If not, You can download JDK from here:
Windows 64bit | Windows 32bit | Mac | Linux 


Note: If that doesn't work, please download from the official Oracle website here: JDK 8 Download Page

JDK 8 is the recommended Java version for Testsigma Agent


2. Environment variables for Java - JAVA_HOME/JDK_HOME/JRE_HOME - After installing Java, you need to set Environment Variables to easily execute Java Applications on your machine. Please check the below article for a detailed guide on setting the Environment variables: How to set Environment variables on your machine?

You may also refer to the official documentation given below: Windows | Linux | Mac


Setting up your Local machine

Setting up your Windows, Mac or Linux Machine for Hybrid Execution consists of three steps. They are:

I. Extract the Testsigma Agent-Drivers bundle

II. Start the Testsigma Agent Server

III. Register the Testsigma Agent


I. Extract the Testsigma Agent-Drivers bundle

Download the Testsigma Agent archive corresponding to your Operating System below:

Windows - Testsigma Agent-Driver Bundle Windows 32bit | Testsigma Agent-Driver Bundle Windows 64bit
Mac - Testsigma Agent-Driver Bundle Mac 32bit | Testsigma Agent-Driver Bundle Mac 64bit
Linux - Testsigma Agent-Driver Bundle Linux 32bit
Testsigma Agent-Driver Bundle Linux 64bit


Extract the archive somewhere in your home directory:

For Windows, you may use "C:\Users\<username>\Documents"

For Linux, you may use "/home/<username>/Documents"

For Mac, you may use "/Users/<username>/Documents"


Note: Replace the <username> part with your Account username. The home directory is recommended so as to avoid hassles of setting file permissions and ownership.



II. Start the Testsigma Agent Server

For Windows

1. Open your Command Prompt and navigate to the Testsigma Agent directory using cd command as follows:

cd "C:\Users\<username>\Documents\Testsigma-Agent-<OSArch>\apache-tomcat-8.5.30\bin"


2. Start the Testsigma Agent using the below command

startup.bat

A new window will open up and tomcat server will start running. Wait for the "Server startup in X ms" message to come up. Your Testsigma Agent server is up and running now.


For Mac/Linux

1. Open Terminal and navigate to Testsigma Agent directory using cd command as follows:

For Linux:

cd "/home/<username>/Documents/Testsigma-Agent-<OSArch>/apache-tomcat-8.5.30/bin"

For Mac:

cd "/Users/<username>/Testsigma-Agent-<OSArch>/apache-tomcat-8.5.30/bin"


2. Start the Testsigma Agent using the below command

sh ./startup.sh

Tomcat server will start running as a background process. Wait for a few seconds. Your Testsigma Agent server is up and running now.


III. Register the Testsigma Agent

Once your Testsigma agent is up, go to the below URL on your Web Browser(Recommended: Google chrome).

http://localhost:8080/agent


Testsigma Agent Dashboard page would open up as shown below:

Click on Register Agent link on the left navigation pane, enter your Testsigma Account details and click on Register. 


That's all we need to do to register the Testsigma Agent on the local machine with your Testsigma Account. Now, whenever we start executions on Testsigma Account and select this machine for running tests, the agent will run the tests here.


Starting the Execution

We assume that you have already created a Hybrid Execution or a Dry Run on Testsigma App before configuring your local machine. In that case, you can go back to the Execution/Test Case and click on Run button now.

If not, please refer this article for a detailed guide on creating a Hybrid Execution - How to Create a Hybrid Execution for running Tests on Local Machine?


Smart Test Automation!