qTest Automation Host 2.x Installation Guide on Mac

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

Download qTest Automation Host 2.x

  1. From the Download Automation Host page, download the qTest Automation Host 2.x for Mac. It is highly recommended that you download the latest 2.x version to benefit from bug fixes and enhancements.
  2. Open the Terminal.
  3. Move the downloaded file to the /usr/local directory:
    $ sudo mv agentctl-[version]-osx-x64-full.tgz /usr/local


    • 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
  4. Change the current directory to /usr/local:
    $ cd /usr/local
  5. Extract the bundle:
    $ tar -zxf agentctl-[version]-osx-x64-full.tgz
  6. Change the current directory to the extracted agentctl 2.0:
    $ cd agentctl-[version]

Acquire your qTest API Token

  1. Login to qTest Manager as an Administrator and access to the Resources page.
  2. Expand the APIs and SDK section.
  3. Copy the API Token, as shown below.


Install and Configure the Automation Host

Execute the 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][proxy_host] -Pproxy.port=[proxy_port] -Pproxy.username=[proxy_username] -Pproxy.password=[proxy_password] -Pproxy.script=[proxy_script_url]

Command Parameters and Descriptions:

Parameter Name Description
 config Execute the configuration command
-Phost IP address, hostname 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 the 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 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 a username to authenticate with the proxy.
-Pproxy.password If your proxy server requires basic authentication, enter a 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

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

/usr/local/agentctl-[version]$ ./agentctl config -Phost= -Pport=6789 -Pproxy.enable=false -Pqtest.url= -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ

Configure qTest Automation Host with Proxy Settings

The EXAMPLE command below shows how to configure the qTest Automation Host 2.x 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= -Pport=6789 -Pqtest.url= -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ -Pproxy.enable=true -Pproxy.port=3128

If your proxy does require basic authentication with a username and password:

/usr/local/agentctl-[version]$ ./agentctl config -Phost= -Pport=6789 -Pqtest.url= -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ -Pproxy.enable=true -Pproxy.port=3128 -Pproxy.password=s0mething#0923

Your proxy is configured with a script:

/usr/local/agentctl-[version]$ ./agentctl config -Phost= -Pport=6789 -Pqtest.url= -Pqtest.token=c2FuZGJveHxodXluZ3V5ZW5AcWFzeW1wFAqrrAWEdOEsdqOTODRSFwNTMxODhlZDY5NTg2ZmMyYzA2NDA5MWNmMQ -Pproxy.enable=true -Pproxy.script=

Note: If you specify both script-based proxy server and proxy server host, the automation host will connect to the script-based proxy server first, then connect to the proxy host if the connection to the script-based one 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 embedded Java,) you will need to add your own certificate to the default cacerts keystore.

In order to accomplish this, you need to 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 the Terminal and execute this command to identify the 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 a proxy with basic authentication work properly following these steps:

  1. Run the following command to edit the bash_profile file:
    $ vi ./bash_profile
  2. Add this line to the bash_profile file:
    export JAVA_TOOL_OPTIONS=-Djdk.http.auth.tunneling.disabledSchemes=""
    The image below shows how your updated bash_profile file will look like.
  3. Save the file when you're done.
  4. Next, execute the command below to load the updated bash_profile:
    $ source ~/.bash_profile
  5. Verify the variable is loaded: 
  6. If you see the output -Djdk.http.auth.tunneling.disabledSchemes= printed in the Terminal, then you have successfully added a new environment variable.

Start the Automation Host

To start the automation host, run start command with your optional -Phostname parameter. (Entered during the Installation and Configuration of the Automation Host.)
Note: If you do not specify a -Phostname parameter and value, the default hostname is set to "Sample Agent".

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


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

Note: It might take some time for the automation host to be fully started initially.

Access qTest Automation Host

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

Install the Automation Host as a Service

Access the agentctl directory and execute the following commands:

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

Note: It might take some minutes for the service to fully start. After that, you can access the host UI using your browser.

Uninstall Service

If you want to uninstall automation agent 2.x service, open the Terminal and execute the 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