TestArchitect Queue command line tool

TestArchitect Queue command line tool, also known as TAQueue, is in charge of generating jobs, which contains a number of TA automated tests in the form of TA batches files, and submitting them to external batch queuing systems, such as JPPF (Java Parallel Processing Framework).

Note: TAQueue is an  independent tool from TestArchitect (Please download at this link)


TAQueue, dispatches TA batch files which containing test modules or test suites to be executed in the following manners:

  1. TAQueue defines whether a bat file is a test suite or test module
  2. TAQueue parses the test module/test suite from bat files and obtains the following information:
    • repository server and its port number,
    • user account, and user password
  3. TAQueue accesses to repository by information obtained via TAUtilities, then obtain a list of test modules included in the test suite. Note that, jobs are equivalent to batch files, or test modules.
  4. TAQueue generates jobs, and submits jobs to batch queuing systems, such as JPPF (Java Parallel Processing Framework).
  5. The queuing system organizes jobs of a queue. The system then chooses when and which nodes will run the jobs according to system policies.

Commands in TAQueue

create command

. Description

This command is used to generates jobs, and then submit them to external batch queuing systems.

. Synopsis

  • On Windows:
    • run.bat create -<ShortArgumenName> <argumentValue>
    • run.bat create --<LongArgumenName> <argumentValue>
  • On Linux and macOS:
    • run.sh create -<ShortArgumenName> <argumentValue>
    • run.sh create --<LongArgumenName> <argumentValue>

. Arguments

Name
Description
-b (short name)--batch (long name)
 
Specifies the folder that contains TA batch files.

Usage: 
--batch "<pathToFolder>"
-b "<pathToFolder>”
-s (short name)
--server (long name)
Specifies IP address and port of the batch queuing system server.

Usage:
--server "localhost:11111"
-s "localhost:11111"


-n (short name)
--name (long name)
Assigns a logical name to a submitted queue.
Usage:
--name  “Queue01”
-n  “Queue01”
 
Notes: It is highly recommended that you assign a unique name to prevent duplicate queue names.
 -f (short name)
--filter (long name)
(Optional) Specifies the filter conditions to determine whether a set of jobs will be executed on which nodes.
The below example is for JPPF’s filter conditions.
Usage:
-f “<ExecutionPolicy><AtLeast><Property>jppf.processing.threads</Property><Value>2</Value></AtLeast></ExecutionPolicy>"

Notes:
- <ExecutionPolicy> tag is optional.
-t (short name)
--timeout (long name)
(Optional) Specifies the maximum wait time for a submitted queue (Units: minutes).
Usage:
--timeout "50"
-t “50”
Notes:
  • Defaults to 60 minutes
  • You can configure this default value at {TAQueue _DIR}\config\ta_dispatcher.properties
-spt (short name)
--split (long name)
(Optional) Chooses "yes/no" option to determine whether TAQueue breaks a batch into multiple test modules for job generation purpose.
Usage:
-- split "yes"
- spt "no"

Notes:
  • Defaults to yes.
  • With this argument specified, the current job file will be broken into a given number of sub-jobs. This number is determined based on the number of included test modules.
  • For example: The current job contains 5 test modules. This argument will split the job into 5 sub-jobs, each contains a single test module.


Note: When the connection between the TAQueue and the queuing system server is broken, the default timeout for the job execution is 60 minutes. Once the timeout expires, the create command is aborted.


wait command

. Description

Waits whether dispatched jobs are executed entirely.

Notes

  • TAQueue submits jobs to batch queuing systems in asynchronous transfer. Specifically, jobs will be submitted to the queuing systems continuously without waiting for whether the jobs execution is finished or not.
  • When you use the wait command after the create command, TAQueue waits until the timeout, defined in the wait command, expires or the job execution is done, before TAQueue executes the next command.
  • Use create before wait.

. Synopsis

  • On Windows:
    • run.bat wait -<ShortArgumenName> <argumentValue>
    • run.bat wait --<LongArgumenName> <argumentValue>
  • On Linux and macOS:
    • run.sh wait -<ShortArgumenName> <argumentValue>
    • run.sh wait --<LongArgumenName> <argumentValue>

. Arguments


Name
Description
-n (short name)
--name (long name)
Name of the submitted queue.

Usage:
--name "Job01"
-n "Job01"
-s (short name)
--server (long name)
Specifies IP address and port of the batch queuing system server.

Usage:
-- server "localhost:11198"
-s "localhost:11198"
Notes:
  • On JPPF, since the JMX (Java Management Extensions) technology is employed for the wait command, the default port number must be 11198.
  • If you’d like to use another port number:
  • Go to the JPPF-x.y.z-driver\config\jppf-driver.properties, folder. (Follow here to see where this file is located.)
  • Comment out the line jppf.management.port by removing the # at the start of the line.
  • Change into a desired port number.
-t (short name)
--timeout (long name)
Specifies the maximum wait time for the queue's status (Units: minutes).
Usage:
--timeout "60"

Notes:
  • Defaults to 60 minutes
  • You can configure this default value at {TAQueue _DIR}\config\ta_dispatcher.properties


Java Parallel Processing Framework

We’ll take JPPF, a typical batch queuing system, as an example to integrate with TAQueue.

Configuring JPPF

  1. Download the following JPPF components.
    • JPPF server/driver distribution
    • JPPF node distribution
    • JPPF administration and monitoring console
    • JPPF application template.
  2. Unzip them into a desired location.
  3. Comment out the line “ppf.discovery.enabled” by removing the # at the start of the line. Note: “ppf.discovery.enabled” is located at the below places, the location where you store downloaded JPPF components.
    • JPPF-x.y.z-node\config\jppf-node.properties
    • JPPF-x.y.z-driver\config\jppf-driver.properties
    • JPPF-x.y.z-application-template\config\jppf.properties
    • JPPF-x.y.z-admin-ui\config\jppf-gui.properties
  4. Change the value of ppf.discovery.enabled of all configuration files, mentioned above, from true to false.
  5. To start a server:
    • Go to “JPPF-x.y.z-driver” folder and open a command prompt or shell console.
    • Type startDriver.bat on Windows or ./startDriver.sh on Linux/macOS.
    • The server is now ready to process job requests.

  6. To start a node:
    • Go to the “JPPF-x.y.z-node” folder and open a command prompt or shell console.
    • Type startNode.bat on Windows or ./startNode.sh on Linux/macOS.
    • Together, this node and the server constitute the JPPF grid.
  7. To start the admin GUI:
    • Go to the “JPPF-x.y.z-admin-ui” folder and open a command prompt or shell console.
    • Type start Console.bat on Windows or ./startConsole.sh on Linux/macOS.

Running submitted job requests

Ensure that the following requirements are met:

  1. Go to the location where you store TAQueue.
  2. Generate jobs from a TA test suite by using the create command. This job will be submitted to the JPPF server. For example:
    • Location where to store TA batch files: D:\taqueue
    • JPPF server: 192.168.167.60
    • Port number of the server: 11111
    • Name of the submitted job to be assigned: TS1
  3. The jobs are submitted successfully to the JPPF server.
  4. The server then distributes the jobs to the nodes, that is, the machines which will run the automated tests.

Tip: You can also find the log file at the following location {TAQueue_DIR\log}