Updated: Starting from version 2.0.3, it's highly recommended to upgrade the automation host from qTest Launch following these instructions.
In this article, we will walk you through how to upgrade your automation host to the newer version on Windows.
This article provide an example to upgrade automation host version 1.3.8 to 2.x. However, if your version is later than 1.3.8, you can still follow this list to upgrade your automation host to the newer version:
- 1.3.8 to 2.0.0
- 1.3.8 to 2.0.1
- 1.3.8 to 2.0.2
- 2.0.0 to 2.0.1
- 2.0.0 to 2.0.2
- 2.0.1 to 2.0.2
- 2.0.2 to 2.0.3
1. Download qTest Automation Host 2.x
1.1 Go to this page Download Automation Host and download the qTest Automation Host 2.x for Windows. It is highly recommended that you download the latest 2.x version to benefit from bug fixes and enhancement.
1.2. Extract agentctl-[version]-windows-x64-full.zip to C:\agentctl-[version]
Notes: replace [version] with the actual version you have downloaded, e.g. 2.0.1
2. Get your qTest API token
2.1. Login to qTest Manager as an Administrator and access to Resource page
2.2. Expand APIs and SDK section
2.3. Copy the API Token, as shown from below screenshot.
3. Remove old qTest Automation Host 1.3.8 Service
If you have installed qTest Automation Host 1.3.8 as a Windows service, follow below steps to remove it. Otherwise, move to step #4.
3.1 Press a combination of Windows + R keys to open Run dialog, then type services.msc OR
3.2 Open the Control Panel, click on Administrator Tools, then double click the Services shortcut
3.3 From the Services window, look for the qTest Automation Agent service, right click on it and select Stop in the context menu.
3.4. Open Command Prompt as an Administrator
3.5 Access to the folder where qTest Automation 1.3.8 has been installed, for example:
> cd C:\agentctl-1.3.8
3.6. Execute below command to remove the qTest Automation Host service
If the command was successful, you will see a message that looks like below.
- 'The service 'qtest-automation-agent' has been successfully removed
Note: the message may be a little bit different depending on your current version of automation host.
3.7. Remove old environment variables
3.7.1. Select Start, select Control Panel, double click System, and select the Advanced tab.
3.7.2. Click Environment Variables.
Look for these environment variables and remove them:
4. Upgrade to qTest Automation Host 2.x
4.1. Open Command Prompt and navigate to the extracted folder of qTest Automation Host 2.x
> cd C:\agentctl-[version]
4.2. Execute below command to configure the agent host 2.x
C:\agentctl-[version]> agentctl.bat config -Phost=[ip_address] -Pport=[agent_port] -Pqtest.url=[qtest_url] -Pqtest.token=[qtest_token]
Note: -Phost and -Pport parameters are optional
- If you do not specify -Phost parameter, localhost will be used
- If do you not specify -Pport parameter, 6789 will be used
C:\agentctl-[version]> agentctl.bat config -Pqtest.url=https://demo.qtestnet.com -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ
For more detail about how to configure qTest Automation Host 2.x, follow this article: Install and Configure the Automation Host
4.3 Run the backup command to copy data and configuration of the Automation Host 1.3.8
C:\agentctl-[version]> agentctl.bat backup -Plocation=[directory_of_qtest_automation_host_1.3.8]\build\qautomation
C:\agentctl-[version]> agentctl.bat backup -Plocation=C:\agentctl-1.3.8\build\qautomation
If the command was successful, it will create a backup file at C:\agentctl-[version]\backup\agentctl_bk.zip
4.4 Next, run restore command to copy the data and configurations of qTest Automation Host 1.3.8 to the new Automation Host 2.0
C:\agentctl-[version]> agentctl.bat restore -Pbackup-file=[\path\to\backup file]
C:\agentctl-[version]> agentctl.bat restore -Pbackup-file=C:\agentctl-[version]\backup\agentctl_bk.zip
5. Start Automation Host 2.x
C:\agentctl-[version]> agentctl.bat start
6. Install the qTest Automation Host 2.x as a Windows Service
Follow this guideline to install qTest Automation Host 2.x as a Windows Service: Install Automation Host as a Service