TestArchitect Queue command line tool
TestArchitect Queue command line tool, also known as TAQueue, is in charge of generating jobs, which contain 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. You can download the TAQueue that is matched with TestArchitect Client version at:
TAQueue only supports batch files (on Windows) and bash files (on Linux and macOS)
TAQueue dispatches TA batch files containing test modules or test suites to be executed in the following manners:
- TAQueue defines whether a bat file is a test suite or test module
- 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
- TAQueue accesses to repository with information obtained via TAUtilities and then obtains a list of test modules included in the test suite. Note that, jobs are equivalent to batch files, or test modules.
- TAQueue generates jobs and submits jobs to batch queuing systems, such as JPPF (Java Parallel Processing Framework).
- The queuing system organizes jobs in 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 generate 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:
|
-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:
|
-jt (short name) | (Optional) Defines a timeout value for each job of a queue
|
-br (short name) | (Optional) Broadcasts all jobs of a queue to all JPPF’s nodes
|
-pr (short name) | (Optional) Defines a condition before the execution of the |
-po (short name) | (Optional) Defines a condition after the execution of the |
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.
wait is usually used after create.
. 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:
|
-t (short name) --timeout (long name) | Specifies the maximum wait time for the queue's status (Units: minutes). Usage: --timeout "60" Notes:
|
. Troubleshooting
As long as you use the wait command after the create command in the broadcast mode (--broadcast= "yes"), the system will return/display the number of jobs incorrectly.
The issue arises from the fact the server utilizes the following formula in the broadcast mode:
Displayed number of jobs = true number of jobs * (1 + number of nodes)
cancel command
. Description
This command is used to cancel all jobs of a specific queue or all queues that are submitted to the JPPF server.
. Synopsis
- On Windows:
- run.bat cancel -<ShortArgumenName> <argumentValue>
- run.bat cancel --<LongArgumenName> <argumentValue>
- On Linux and macOS:
- run.sh cancel -<ShortArgumenName> <argumentValue>
- run.sh cancel --<LongArgumenName> <argumentValue>
. Arguments
Name | Description |
-n (short name) --name (long name) | (Optional) Cancels all jobs of a particular queue on the JPPF server. Usage: –n "Queue1 " --name "Queue1" |
-s (short name) --server (long name) | Specifies IP address and port of the batch queuing system server. Usage: -- server "localhost:11198" -s "localhost:11198" |
-t (short name) --timeout (long name) | (Optional) Specifies the maximum wait time for a cancelled queue. Unit: minute Usage: --timeout "50 -t "50" Note: · Defaults to 60 minutes · You can configure this default value at <TAQueue _DIR>\config\ta_dispatcher.properties |
-a (short name) --all (long name) | (Optional) Cancels all current jobs on the JPPF server. Usage: -a --all |
Java Parallel Processing Framework
We’ll take JPPF, a typical batch queuing system, as an example to integrate with TAQueue.
Configuring JPPF
- Download the following JPPF components.
- JPPF server/driver distribution
- JPPF node distribution
- JPPF administration and monitoring console
- JPPF application template.
- Unzip them into a desired location.
- Comment out the line “jppf.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
- Change the value of ppf.discovery.enabled of all configuration files, mentioned above, from true to false.
Copy the TAQueueLib.jar file from the <TAQueue_DIR>\plugins folder to the <JPPFx.y.z-driver>/lib folder.
To start a server:
- Go to “JPPF-x.y.z-driver” folder and open a command prompt or shell console.
- Run startDriver.bat on Windows or ./startDriver.sh on Linux/macOS.
The server is now ready to process job requests.
- To start a node:
- Go to the “JPPF-x.y.z-node” folder and open a command prompt or shell console.
- Run startNode.bat on Windows or ./startNode.sh on Linux/macOS.
- Together, this node and the server constitute the JPPF grid.
- 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.
* Important Notes *
In order to avoid the Apache Log4j Vulnerability, please follow these steps:
- Download the log4j version 2.17.1 that fixed the issue and extract it
- Copy 3 files (log4j-1.2-api-2.17.1.jar ; log4j-api-2.17.1.jar ; log4j-core-2.17.1.jar) to
- <JPPFx.y.z-driver>/lib folder
- <JPPFx.y.z-node>/lib folder
- Delete/Remove the log4j-1.2.15.jarfile at
- <JPPFx.y.z-driver>/lib folder
- <JPPFx.y.z-node>/lib folder
Running submitted job requests
Ensure that the following requirements are met:
- Obtaining TestArchitect batch files beforehand which contains sets of test modules or test suites to be executed.
- Configuring JPPF
- Go to the location where you store TAQueue.
- 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
Upon the successful submission, you should see “Exit code 0 - Success: The queue
command line executed successfully”.- The server then distributes the jobs to the nodes, that is, the machines that will run the automated tests.
Tip: You can also find the log file at the following location {TAQueue_DIR\log}