Menu

qTest Automation Host 2.0 Installation Guide on Mac

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

1. Download qTest Automation Host 2.0.x

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

1.2. Open Terminal.

1.3. Move the downloaded file to /usr/local directory:

$ sudo mv agentctl-[version]-osx-x64-full.tgz /usr/local

Note:

  • You can move the package to /usr/local or wherever you'd like; sudo is only needed depending on the location it will be moved
  • Replace [version] in the command to the actual version that you have chosen to download, e.g. 2.0.1

1.4. Change current directory to /usr/local:

$ cd /usr/local

1.5. Extract the bundle:

$ tar -zxf agentctl-[version]-osx-x64-full.tgz

1.6. Change current directory to the extracted agentctl 2.0:

$ cd agentctl-[version]

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.

/usr/local/agentctl-[version]$ ./agentctl config -Phost=[ip_address] -Pport=[agent_port] -Pqtest.url=[qtest_url] -Pqtest.token=[qtest_token] -Pproxy.enable=[true|false] -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 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 if -Pproxy.enable is set to true.
-Pproxy.port The port that the proxy server is running on. This parameter is required if -Pproxy.enable 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

/usr/local/agentctl-[version]$ ./agentctl 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 2.0 in a proxy environment. The values for each parameter are highlighted in bold

If your proxy does not require authentication:

/usr/local/agentctl-[version]$ ./agentctl 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

If your proxy does require basic authentication with user name and password:

/usr/local/agentctl-[version]$ ./agentctl 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:

/usr/local/agentctl-[version]$ ./agentctl 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 automation host will connect to script based one first, then connect to proxy host when the connection to script based one was failed.

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/Contents/Home/bin/keytool -import -noprompt -trustcacerts -alias <AliasName> -file <certificate> -keystore ./server-jre/Contents/Home/lib/security/cacerts -storepass changeit

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

IMPORTANT: Add system environment variable

Open Terminal and execute this command to identify Java version: $ java -version

If the execution result showing your machine is running Java whose version is between 1.8.0_77 and 1.8.0_151, you must add an environment variable to make proxy with basic authentication work properly following below steps:

  • Run below command to edit the bash_profile file: $ vi ./bash_profile
  • Add this line to the bash_profile file: export JAVA_TOOL_OPTIONS=-Djdk.http.auth.tunneling.disabledSchemes=""
  • Below screenshot shows how your updated bash_profile file looks like

bash_profile.png

  • Save the file when you're done.
  • Next, execute below command to load the updated bash_profile: $ source ~/.bash_profile
  • Verify the variable is loaded:  $ echo JAVA_TOOL_OPTIONS
  • If you see the output -Djdk.http.auth.tunneling.disabledSchemes= printed in the Terminal, then you have successfully added a new environment variable.

4. Start the automation agent

To start the automation host, run start command with an optional -Phostname parameter. Note: if you do not specify -Phostname parameter and value, the default host name is set to "Sample Agent".

/usr/local/agentctl-[version]$ ./agentctl start -Phostname="[agent_host_name]"

Example:

/usr/local/agentctl-[version]$ ./agentctl start -Phostname="My Automation Host Name"

Note: it might take some time for the aotumation host to be fully started at the first time.

5. Access to qTest 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 #3. If you did not specify the port at step #2, use the default 6789

6. Install the Automation Host as a Service

Access to agentctl directory and execute following command

/usr/local/agentctl-[version]$ sudo ./install
/usr/local/agentctl-[version]$ sudo launchctl list | grep com.qasymphony.qtest-automation-agent

7. Uninstall Service

If you want to uninstall automation agent 2.0 service, open Terminal and execute following commands.

/usr/local/agentctl-[version]$ sudo ./uninstall
/usr/local/agentctl-[version]$ sudo launchctl list | grep com.qasymphony.qtest-automation-agent

Subscribe To Our Blog
Powered by Zendesk