Setting up and starting the command-line adapter

With the command-line adapter, you can use a machine as a target test machine for command-line execution. You must register the adapter on the target test machine to run command-line scripts.

Before you begin

The command-line adapter will run on any platform that supports the minimum of Java version 1.5 or later. The executable file java.exe must be accessible in the path on the target test machine. You must also know the following information to start the adapter: Finally, the quality management application must be running on the server.
Note: You might have more than one adapter running on a target test machine, but each adapter must be a separate process with a unique name that is specified in the -adapterName option.

About this task

The command-line adapter must be set up and started on the target test machine.
Command-Line Execution setup
Complete this task on the target test machine.

Procedure

  1. Obtain the install-location\JazzTeamServer\server\conf\qm\adapters\RQMCommmandLineAdapter.zip file from the installation machine.
    Note: A server administrator who has read access to the server might need to get the compressed file for you.
  2. Extract the RQMCommmandLineAdapter.zip file to a folder on the target test machine.
  3. Optional: Customize the actual scripts results (that appear in the test case execution record or test suite execution record) as described in Customizing the command-line adapter.
  4. Start the command-line adapter.

    To start the command-line adapter for the first time:

    Windows icon
    Run the batch file with the command line arguments as shown:
    C:\ start.bat -repository  https://qmserver:port/qm -user userid -password password [-adapterName adapter-name]
    [-projectArea project area] [-sleepTime sleep
    time]	[-configFile configuration file]
    Customizing the command-line adapter
    Linux icon
    Unix icon
    Run the shell script with the command line arguments as shown:
     $ start.sh -repository  https://qmserver:port/qm -user userid -password password [-adapterName adapter-name]
    [-projectArea project area] [-sleepTime sleep
    time]	[-configFile configuration file]
    where:
    • qmserver: is the hostname or IP address of the quality management server.
    • port: is the port where the quality management server is running
    • userid: is a registered user ID for quality management that has the license to run an adapter.
    • password: is the password of the submitted user ID.
    • adapter-name: is an adapter name that the user has assigned.
    • project area: is the name of the project being logged in to.
    • sleep time: is the polling interval between polling for tasks. The default setting is 5 seconds.
    • configuration file: is the file to store and read the settings for this adapter. The default file name isconfig.ini.
    The adapter generates a configuration file (the config.ini file or the file that is specified in the -configFile option) to contain the registration information. This information is reused when the adapter is restarted.

    To restart the command-line adapter from a config.ini file:

    Windows icon
    : Run the batch file without any arguments:
    C:\ start.bat
    Linux icon
    Unix icon
    : Run the shell script without the command-line arguments:
    $ start.sh
    Note: The configuration file is expected to be in the directory that the adapter is started from.

Results

The system generates a message that is similar to this message:
Launching Adapter…
Configuration file adapterConfig.ini does not exist, adapter will use the arguments passed
Successfully created an HTTP client
The adapter is now connected
Created Commandline Adapter

What to do next

You can verify the adapter state on the quality management application on the tester machine by clicking Execution > Adapter Console. Make sure the status is GREEN before you attempt to run a test against a running command-line adapter.


Have a problem or a question? Post it in the Jazz.net forum.