Installing TestArchitect in silent mode

In some cases, you may need to install TestArchitect in silent mode. In this mode, the installation is performed automatically without any user interaction.


For example, you install TestArchitect in silent mode, when you would like to automate the installation process or deploy TestArchitect on various computers. Especially, CI/CD cycle for continuous integration, deployment and delivery fit your needs most.


Silent installation performed via InstallShield on Windows

· The installation runs in the background. It does not show any dialog boxes or messages.

· An installation response file is required. Response file is like a mold that helps replicate the installation process again and again.

· If you want to change something during installation, such as, installation directory, you are required to re-create this mold.


Creating an installation response file

To install TestArchitect in silent mode by using InstallShield, create an installation response file to store the needed installation settings.

1. Choose a computer on which TestArchitect is not installed.

2. Bring up a command window with administrator right.

The command window opens with a prompt displaying your current directory.

3. Run the TestArchitect installation file in record mode with the following command:

<path_to_installation_file>\<TestArchitect_installation_file.exe> /r

Note:

· /r: Use this command line to run the installation in record mode. (Learn more.)

· If the path includes spaces, enclose it in quotes.

For example, enter the following command:

"D:\Silent installation\TestArchitect Build\TestArchitect_8.3.0.143_x64.exe" /r

 

1.png

Where:

· Path to the executable TestArchitect installation file: D:\Silent installation\TestArchitect Build\TestArchitect_8. 3.0.143_x64.exe

4. Follow the onscreen instructions and install TestArchitect with the needed settings.

The installation program tracks the choices you make during the installation and records them to the setup.iss file in the Windows folder on your system drive.

5. Rename setup.iss into install.iss, which is in charge of silent installation.


Running silent installation

Deploying TestArchitect installation file on other computers and running the installation there using the created response file.

1. Deploy the TestArchitect installation file and the installation response file to the target computer.

2. Bring up a command window with administrator right.

The command window opens with a prompt displaying your current directory.

3. On the target computer, run the following command:

<path_to_installation_file>\<TestArchitect_installation_file.exe> /s /f1<path_to_response_file>\<respone_file.iss> /f2<path_to_log_file>\<log_file.log>

 

Note:

· /s: Runs the installation in silent mode. (Learn more.) 

· /f1: Specifies where the response file is. (Learn more.) 

· /f2: Specifies a log file location and file name. (Learn more.) 

· Specify an absolute path; using a relative path gives unpredictable results. 

· If the path includes spaces, enclose it in quotes.

For example, enter the following command:

"D:\Silent installation\TestArchitect Build\TestArchitect_8.3.0.143_x64.exe"

/s /f1"D:\Silent installation\Silent files\install.iss"

/f2"D:\Silent installation\Silent files\install.log"

2.png


Where:

· Path to the executable TestArchitect installation file: D:\Silent installation\TestArchitect Build\TestArchitect_8.3.0.143_x64.exe

· Path to the response file: D:\Silent installation\Silent files\install.iss

· Path to the log file: D:\Silent installation\Silent files\install.log

The installation program installs TestArchitect in the background using the options specified in the response file. The installation program displays no dialog boxes. The installation progress is not shown either.


Verifying the silent installation success

In silent mode, the installation wizard shows no informative, warning or error messages. The installation program creates the log file and writes the installation status to that file. You can examine that log file to learn whether TestArchitect has been installed successfully.


The file is located in the folder, specified by the /f2 parameter. Open the file and check the ResultCode value. 0 indicates success, any other values indicate an error. A complete list of error codes is available here


Uninstalling TestArchitect in silent mode

In some cases, you may need to uninstall the current version of TestArchitect in silent mode before installing the newer version. In this mode, the uninstallation is performed automatically without any user interaction.

 

Silent uninstallation performed via InstallShield on Windows

· The uninstallation runs in the background. It does not show any dialog boxes or messages.

· An uninstallation response file is required. This file contains all the data needed during silent uninstallation.


Creating an uninstallation response file

To remove previously installed TestArchitect in silent mode by using InstallShield, create an uninstallation response file to store the needed uninstallation settings.

1. Choose a computer on which TestArchitect is not installed.

Bring up a command window with administrator right.

The command window opens with a prompt displaying your current directory.

2. Run the TestArchitect uninstallation file in record mode with the following command:

<path_to_installation_file>\<TestArchitect_installation_file.exe> /uninst /r

Note:

· /uninst: Causes Setup.exe to execute only the event handler function OnUninstall, whose default code uninstalls the previously installed TestArchitect. (Learn more.) 

· /r: Use this command line to run the uninstallation in record mode. (Learn more.)

· If the path includes spaces, enclose it in quotes.

For example, enter the following command:

"D:\Silent installation\TestArchitect Build\TestArchitect_8.3.0.143_x64.exe" /uninst /r

 

3.png

Where:

· Path to the executable TestArchitect installation file: D:\Silent installation\TestArchitect Build\TestArchitect_8. 3.0.143_x64.exe

3. Follow the onscreen instructions and remove TestArchitect.

The uninstallation program records your choices to the setup.iss file in the Windows folder on your system drive.

4. Rename setup.iss into uninstall.iss, which is in charge of silent uninstallation.


Running silent uninstallation

Deploying TestArchitect uninstallation file on other computers and running the uninstallation there using the created response file.

1. Deploy the TestArchitect installation file and the uninstallation response file, uninstall.iss, to the target computer.

2. Bring up a command window with administrator right.

The command window opens with a prompt displaying your current directory.

3. On the target computer, run the following command:

<path_to_installation_file>\<TestArchitect_installation_file.exe> /s /uninst /removeonly /f1<path_to_response_file>\<respone_file.iss> /f2<path_to_log_file>\<log_file.log>

Note:

· /s: Runs the uninstallation in silent mode. (Learn more.) 

· /uninst: Causes Setup.exe to execute only the event handler function OnUninstall, whose default code uninstalls the previously installed TestArchitect. (Learn more.) 

· /removeonly: Sets the REMOVEONLY system variable equal to a non-zero value. (Learn more.) 

· /f1: Specifies where the response file is. (Learn more.) 

· /f2: Specifies a log file location and file name. (Learn more.) 

· Specify an absolute path; using a relative path gives unpredictable results. 

· If the path includes spaces, enclose it in quotes.

For example, enter the following command:

"D:\Silent installation\TestArchitect Build\TestArchitect_8.3.0.143_x64.exe"

/s /uninst /removeonly 

/f1"D:\Silent installation\Silent files\uninstall.iss" /f2"D:\Silent installation\Silent files\uninstall.log"

 

4.png

Where:

· Path to the executable TestArchitect installation file: D:\Silent installation\TestArchitect Build\TestArchitect_8.3.0.143_x64.exe

· Path to the response file: D:\Silent installation\Silent files\uninstall.iss

· Path to the log file: D:\Silent installation\Silent files\uninstall.log

The uninstallation program removes TestArchitect in the background using the options specified in the response file. The uninstallation program displays no dialog boxes. The uninstallation progress is not shown either.

 

Note: Although the removal is successful, TestArchitect and its related components' shortcuts are not deleted. You can delete them manually.


Verifying the silent uninstallation success

In silent mode, the uninstallation wizard shows no informative, warning or error messages. The uninstallation program creates the log file and writes the uninstallation status to that file. You can examine that log file to learn whether TestArchitect has been removed successfully.

 

The file is located in the folder, specified by the /f2 parameter. Open the file and check the ResultCode value. 0 indicates success, any other values indicate an error. A complete list of error codes is available here.


Using batch file to automate silent installation

In practice, there are occasions where you might need to write and schedule a batch (.bat) file to automate the tasks of silent TestArchitect uninstallation and installation. This topic shows a basic template to follow.

 

Ensure that the following requirements are met:

· Be familiar with silent installation and uninstallation.

· Create installation and uninstallation response files.

· Back up abt.ini and automation.ini from the computer creating the response files.

o abt.ini stores information such as, repository server, license server, such as, automation harness. Location:

§ C:\Users\Public\LogiGear\TestArchitect\controller

§ C:\Users\Public\LogiGear\TestArchitect\Data

§ C:\Users\Public\LogiGear\TestArchitect\LicenseServer

§ C:\Users\Public\LogiGear\TestArchitect\RS

o automation.ini store automation information. Location: C:\Users\Public\LogiGear\TestArchitect\Data

 

1. Assign TestArchitect versions to two variables.

One is for version to be removed. The other is for version to be installed.

For example, enter the code lines below.

 

set current_ta_version=TestArchitect_8.3.0.143_x64.exe

set ta_version=TestArchitect_8.3.0.145_x64.exe

 

  1. Terminate all TestArchitect-related processes, if running.

Enter the code lines below.

 

taskkill /IM TAControllerGUI.exe /F /T

taskkill /IM TAController.exe /F /T

taskkill /IM TAClient.exe /F /T

taskkill /IM TARegisterServer.exe /F /T

taskkill /IM tars.exe /F /T

taskkill /IM TARepository.exe /F /T

taskkill /IM TestArchitectHelp.exe /F /T

 

 

 

3. Uninstall previously installed TestArchitect by entering the following command.

 

<path_to_installation_file>\<TestArchitect_installation_file.exe> /s /uninst /removeonly /f1<path_to_response_file>\<respone_file>.iss /f2<path_to_log_file>\<log_file>.log (Learn more.)

 

If you do not installTestArchitect yet, proceed to step #6.

For example, enter the code line below.

 

echo Uninstall TA

"\\computerone\Silent installation\TestArchitect Build\%current_ta_version%"

/s/ /uninst /removeonly

/f1"\\computerone\Silent installation\Silent files\uninstall.iss"

/f2"\\computerone\Silent installation\Silent files\uninstall.log"

 

Where:

· Shared path to the executable TestArchitect installation file over your network: \\computerone\Silent installation\TestArchitect Build\%current_ta_version%

· Shared path to the response file: \\computerone\Silent installation\Silent files\uninstall.iss

· Shared path to the log file over your network: \\computerone\Silent installation\Silent files\uninstall.log

 

  1. Wait until InstallShield of uninstallation process is closed.

Enter the code lines below.

 

:loop

tasklist /fi "imagename eq setup.exe" |find ":" > nul

if errorlevel 1 goto loop

 

  1. Wait until uninstallation is done.

Enter the code line below.

 

ping 127.0.0.1 -n 31 > nul

 

6. Begin to install a newer version of TestArchitect by entering the following command.

 

<path_to_installation_file>\<TestArchitect_installation_file.exe> /s/f1<path_to_response_file>\<respone_file>.iss /f2<path_to_log_file>\<log_file>.log

 

 

 

For example, enter the code line below.

 

echo Install TA

"\\computerone\Silent installation\TestArchitect Build\%ta_version%"

/s/ /f1"\\computerone\Silent installation\Silent files\install.iss"

/f2"\\computerone\Silent installation\Silent files\install.log"

 

Where:

· Shared path to the executable TestArchitect installation file over your network: \\computerone\Silent installation\TestArchitect Build\%ta_version%

· Shared path to the response file: \\computerone\Silent installation\Silent files\install.iss

· Shared path to the log file over your network: \\computerone\Silent installation\Silent files\install.log

·  

  1. Wait until installation is done.

Enter the code line below.

 

ping 127.0.0.1 -n 31 > nul

 

  1. Copy abt.ini and automation.ini from the original computer, which created response files, into the computer that has just installed TestArchitect.

· abt.ini's location:

o C:\Users\Public\LogiGear\TestArchitect\controller

o C:\Users\Public\LogiGear\TestArchitect\Data

o C:\Users\Public\LogiGear\TestArchitect\LicenseServer

o C:\Users\Public\LogiGear\TestArchitect\RS

· automation.ini's location:

o C:\Users\Public\LogiGear\TestArchitect\Data

Remember to copy exact abt.ini and automation.ini to the same folders as the original computer on the target machine (physical machines, cloud instances, virtual machines, etc.)

For example, enter the code lines below:

 

echo Copy abt.ini

copy /y "\\computerone\Silent installation\TestArchitect\controller\abt.ini" "C:\Users\Public\LogiGear\TestArchitect\controller"

 

copy /y "\\computerone\Silent installation\TestArchitect\Data\abt.ini" "C:\Users\Public\LogiGear\TestArchitect\Data"

 

copy /y "\\computerone\Silent installation\TestArchitect\LicenseServer\abt.ini" "C:\Users\Public\LogiGear\TestArchitect\LicenseServer"

 

copy /y "\\computerone\Silent installation\TestArchitect\RS\abt.ini" "C:\Users\Public\LogiGear\TestArchitect\RS"

 

echo Copy automation.ini

 

copy /y "\\computerone\Silent installation\TestArchitect\Data\automation.ini" "C:\Users\Public\LogiGear\TestArchitect\Data"

 

Overall, the snippet of code should resemble the following:

 

@echo off

:: TA build version to be removed

set current_ta_version=TestArchitect_8.3.0.143_x64.exe

 

:: TA build version to be installed

set ta_version=TestArchitect_8.3.0.145_x64.exe

 

:: Kill all TA processes

taskkill /IM TAControllerGUI.exe /F /T

taskkill /IM TAController.exe /F /T

taskkill /IM TAClient.exe /F /T

taskkill /IM TARegisterServer.exe /F /T

taskkill /IM tars.exe /F /T

taskkill /IM TARepository.exe /F /T

taskkill /IM TestArchitectHelp.exe /F /T

 

:: Unistall TA

echo Uninstall TA

"\\computerone\Silent installation\TestArchitect Build\%current_ta_version%"

/s/ /uninst /removeonly

/f1"\\computerone\Silent installation\Silent files\uninstall.iss"

/f2"\\computerone\Silent installation\Silent files\uninstall.log"

 

:: Wait until InstallShield is closed

:loop

tasklist /fi "imagename eq setup.exe" |find ":" > nul

if errorlevel 1 goto loop

 

:: Wait until Uninstallation completes

ping 127.0.0.1 -n 31 > nul

 

:: Install TA 

echo Install TA 

"\\computerone\Silent installation\TestArchitect Build\%ta_version%"

/s/ /f1"\\computerone\Silent installation\Silent files\install.iss"

/f2"\\computerone\Silent installation\Silent files\install.log"

 

:: Wait until Installation completes

ping 127.0.0.1 -n 31 > nul

 

::Copy abt.ini to target computer

echo Copy abt.ini files

copy /y "\\computerone\Silent installation\TestArchitect\controller\abt.ini" "C:\Users\Public\LogiGear\TestArchitect\controller"

copy /y "\\computerone\Silent installation\TestArchitect\Data\abt.ini" "C:\Users\Public\LogiGear\TestArchitect\Data"

copy /y "\\computerone\Silent installation\TestArchitect\LicenseServer\abt.ini" "C:\Users\Public\LogiGear\TestArchitect\LicenseServer"

copy /y "\\computerone\Silent installation\TestArchitect\RS\abt.ini" "C:\Users\Public\LogiGear\TestArchitect\RS"

 

::Copy automation.ini to target computer

echo Copy automation.ini

copy /y "\\computerone\Silent installation\TestArchitect\Data\automation.ini" "C:\Users\Public\LogiGear\TestArchitect\Data" 

 

Note: If you want to run automated tests on Microsoft Edge, you are required to pre-install the Microsoft WebDriver, and copy the above automation.ini file containing the WebDriver’s location to execution machines. In case you do not test on Edge, ignore this note. WebDriver is an MSI package, you should be able to install it silently.