Menu

qTest Automation Host 2.0 Installation Guide on Windows

In this article, we will walk you through how to install qTest Automation Host version 2.0.x on Windows machine.

1. Download qTest Automation Host 2.0.x for Windows

1.1. Go to this page Download Automation Host and download the qTest Automation Host 2.0 for Windows. It is highly recommended that you download the latest 2.0.x version to benefit from bug fixes and enhancement.

1.2. Extract agentctl-[version]-windows-x64-full.zip to C:\agentctl-[version]

Note:

  • Replace [version] to the actual version that you have chosen to download, 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 show from below screenshot.

token.png

3. Install and configure the automation host

Execute following command to install and configure the automation agent.

C:\agentctl-[version]> agentctl.bat config -Phost=[ip_address] -Pport=[agent_port] -Pqtest.url=[qtest_url] -Pqtest.token=[qtest_token] -Pproxy.enable=true -Pproxy.host=[proxy_host] -Pproxy.port=[proxy_port] -Pproxy.username=[proxy_username] -Pproxy.password=[proxy_password] -Pproxy.script=[proxy_script_url]

Command parameters description:

Parameter Name Description
 config Execute the configuration command
-Phost IP address or host name or domain name of this machine. If this parameter is omitted, localhost will be used
-Pport Specify a port that your automation host will be running on. If this parameter is omitted, port 6789 will be used
-Pqtest.url Url of your qTest Manager instance
-Pqtest.token The qTest API token generated for your qTest Manager account. You can copy it from API & SDK section in qTest Manager's Resource page
-Pproxy.enable Possible value is true or false. If the value is set to true, you will need to provide proxy settings, otherwise, set it to false
-Pproxy.host The IP address or machine name of the proxy server. This parameter is required when -Pproxy.enable parameter is set to true.
-Pproxy.port The port that the proxy server is running on. This parameter is required when -Pproxy.enable parameter is set to true.
-Pproxy.username If your proxy server requires basic authentication, enter username to authenticate with the proxy
-Pproxy.password If your proxy server requires basic authentication, enter password to authenticate with the proxy
-Pproxy.script If your proxy server is configured with a script, enter the url to access your PAC (Proxy Auto-Configuration) file

 

Configure qTest Automation Host without proxy

Example command below shows how to configure the qTest Automation Host 2.0 in a non-proxy environment. The values for each parameter are highlighted in bold

C:\agentctl-[version]> agentctl.bat config -Phost=192.168.76.29 -Pport=6789 -Pproxy.enable=false -Pqtest.url=https://demo.qtestnet.com -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ

Configure qTest Automation Host with proxy settings

Example command below shows how to configure the qTest Automation Host in a proxy environment. The values for each parameter are highlighted in bold

Your proxy does not require authentication:

C:\agentctl-[version]> agentctl.bat config -Phost=192.168.76.29 -Pport=6789 -Pqtest.url=https://demo.qtestnet.com -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ -Pproxy.enable=true -Pproxy.host=192.168.76.138 -Pproxy.port=3128

Your proxy does require basic authentication with user name and password:

C:\agentctl-[version]> agentctl.bat config -Phost=192.168.76.29 -Pport=6789 -Pqtest.url=https://demo.qtestnet.com -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ -Pproxy.enable=true -Pproxy.host=192.168.76.138 -Pproxy.port=3128 -Pproxy.username=proxyuser@qasymphony.com -Pproxy.password=s0mething#0923

Your proxy is configured with a script:

C:\agentctl-[version]> agentctl.bat config -Phost=192.168.76.29 -Pport=6789 -Pqtest.url=https://demo.qtestnet.com -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ -Pproxy.enable=true -Pproxy.script=https://proxytestlab.sampleproxy.com/proxy.pac

Note: if you specify both script based proxy server and proxy server host, the host will connect to script based one first, then connect to proxy host when the connection to script based one was failed.

IMPORTANT: Add system environment variable

If your PC is running Java 8 whose version is ranging from 1.8.0_77 to 1.8.0_151 (you can find your Java version on Windows here), you must add a system environment variable to make proxy with basic authentication work properly by following below steps.

Add system environment variable on Windows

  • Select Start, select Control Panel, double click System, and select the Advanced tab.
  • Click Environment Variables.
  • In the System variables section, click New. The New System Variable dialog is displayed
  • In Variable Name field, enter: JAVA_TOOL_OPTIONS
  • In Variable Value field, enter: -Djdk.http.auth.tunneling.disabledSchemes=""
  • Click OK to close New System Variable dialog

Below screenshot shows the new system variable being added to Environment Variables

env-var-windows.png

Click OK to close Environment Variables dialog.

SSL Proxy Configuration

If your organization uses an SSL proxy that alters all certificates on the internet to your own certificate that is not trusted by our embeded Java, you need to add your own certificate to the default cacerts keystore.

In order to accomplish that, run the following command:

./server-jre/bin/keytool -import -noprompt -trustcacerts -alias <AliasName> -file <certificate> -keystore ./server-jre/jre/lib/security/cacerts -storepass changeit

  • <AliasName> an alias for this certificate
  • <certificate> the path to your certificate

4. Start the automation host 

To start the host, execute start command as below. If you do not specify "-Phostname" parameter and value, "Sample Agent" will be used as default host name.

C:\agentctl-[version]> agentctl.bat start -Phostname="[agent_host_name]"

Example:

C:\agentctl-[version]> agentctl.bat start -Phostname="My Automation Host Name"

Notes:

*If you run "agentctl.bat start" by itself, without parameter (before assigning a name), "Sample Agent" will be used as a default. Once "Sample Agent" is used as a default, this name CANNOT be changed. 

*Running "agentctl.bat start"  will fail the first time. Please run "agentctl.bat stop" after the fail and re-run "agentctl.bat start"  a second time.  

5. Access to the Automation Host

Open your browser and enter the URL: http://<host>:<port>

  • host: the IP address or host name or domain name that you specified at step #3. If you did not specify the host at step #2, use localhost
  • port: the port that you specified at step #2. If you did not specify the port at step #3, use the default 6789

5. Install qTest Automation Host as a Windows service

If you want the Automation Host to automatically starts when Windows starts, you should install it as a Windows service.

Run command prompt as Administrator, access to agentctl directory and execute following command to install qTest Automatin Host as a service on Windows

C:\agenctl-[version]> install.bat

6. Uninstall qTest Automation Host service

If you want to uninstall qTest Automation Host service, open command prompt as Administrator then access to agentctl-[version] directory and execute following command:

C:\agenctl-[version]> uninstall.bat

 

Subscribe To Our Blog
Powered by Zendesk