Introduction

As you might already know, Testsigma Agent requires JDK 1.7/1.8 installed in your local machine. Newer versions of JDK such as JDK 9 or later might have incompatibility issues. Therefore, it is recommended to use JDK 1.8 for Testsigma Agent.


Even if you have newer Java versions installed, you can still install JDK 1.8 along with that and use it for Testsigma Agent.

In this guide, we will explain how to use JDK 1.8 in a machine while another Java version is installed.


Prerequisite: Testsigma Agent is already installed. If not, please follow the below guide to install Testsigma Agent

Quick setup guide - Setup TestSigma Agent on your device for Hybrid Test Execution(Windows/Mac/Linux)


For Windows

1. Check the current java version

java -version

If 1.8 is the current java version, you don't need to do further steps. Else go to step 2.


2. Download and install JDK 1.8

Download and install Java JDK 1.8 from the following link: JDK 1.8 Windows


3. Create customized Testsigma Agent startup script

Create a file named start_testsigma_agent.bat and paste the following content:

set JAVA_HOME=<path to JDK 1.8 home directory>

set CATALINA_HOME=<path to Apache Tomcat folder within Testsigma Agent folder>

%CATALINA_HOME%\bin\catalina.bat run


Here's an example:

# setting the JAVA_HOME environment variable for this shell to JDK 8. This is the default location for JDK 1.8. Please check the location and modify if required.
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191

# setting the CATALINA_HOME environment variable for this shell to Testsigma Agent Apache folder. This is the default location for Testsigma Agent. Please check the location and modify if required.
set CATALINA_HOME=C:\Users\<username>\Documents\Testsigma_Agent\apache-tomcat-8.0.53

#Run Testsigma Agent
%CATALINA_HOME%\bin\catalina.bat run


4. Execute the Startup Script

Open CMD Prompt and run the start_testsigma_agent.bat file.


For Mac/Linux

1. Check the current java version

java -version

If 1.8 is the current java version, you don't need to do further steps. Else go to step 2.


2. Download and install JDK 1.8

Download and install Java JDK 1.8 from the following link: JDK 1.8 Mac | JDK 1.8 Linux



3. Create customized Testsigma Agent startup script

Create a file named start_testsigma_agent.sh and paste the following content:

set JAVA_HOME=<path to JDK 1.8 home directory>

set CATALINA_HOME=<path to Apache Tomcat folder within Testsigma Agent folder>

$CATALINA_HOME/bin/catalina.sh run


Here's an example:

# setting the JAVA_HOME environment variable for this shell to JDK 8. This is the default location for OpenJDK 1.8. Please check the location and modify if required.
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64

# setting the CATALINA_HOME environment variable for this shell to Testsigma Agent Apache folder. This is the default location for Testsigma Agent. Please check the location and modify if required.
export CATALINA_HOME=~/Documents/Testsigma-Agent/apache-tomcat-8.0.53

#Run Testsigma Agent
$CATALINA_HOME/bin/catalina.sh run


4. Execute the Startup Script

Open Terminal and run the start_testsigma_agent.sh file.