Running scripts from a command prompt

You can use the QAWRunScript command to run scripts and batch files from a command prompt. Enter QAWRunScript /? to view help. To run load test scripts from a command prompt, use the QAWLoadTest command. See Running load tests from a command prompt

Script syntax

QAWRunScript.exe [workspace] scripts [/helixalm] [/reportdir "path"] [/reportfile "path"] [/noreport] [/Dvariable="value"] [/remote computername] [/lsuser username] [/lspassword password] [/lssinglesignon on|off] [/emailhost host] [/emailport port] [/emailresults OnSuccess|OnFailure|Always|Never] [/emailusername username] [/emailpassword passwordincleartext] [/emailusesslencryption TRUE|FALSE] [/emailfrom emailaddress] [/emailto listofemailaddresses] [/emailsubject "subject line"] [/emailmessagebody "message body"] [/promptbeforeexit] [/sessionname "name"]

Batch syntax

QAWRunScript.exe batch [/helixalm] [/reportdir "path"] [/reportfile "path"] [/noreport] [/Dvariable="value"] [/remote computername] [/lsuser username] [/lspassword password] [/lssinglesignon on|off] [/emailresults OnSuccess|OnFailure|Always|Never] [/emailhost host] [/emailport port] [/emailusername username] [/emailpassword passwordincleartext] [/emailusesslencryption TRUE|FALSE] [/emailfrom emailaddress] [/emailto listofemailaddresses] [/emailsubject "subject line"] [/emailmessagebody "message body"] [/promptbeforeexit] [/sessionname "name"]

Command options

General

Item Description
workspace Workspace filename. Required if the script calls another script or has an associated datasheet, or if the /helixalm option is specified.
scripts Script filenames. Separate multiple filenames with spaces.
batch Batch filename.
/remote computername Run scripts on the specified remote computer. See Running scripts remotely.
/promptbeforeexit Prompt for confirmation before exiting QAWRunScript.
/sessionname "name" Playback session name. Only used if playback information is sent to the QA Wizard Pro Server.

Results reports

Item Description
/reportdir "path" Directory path to save the run report in (e.g., C:\Program Files\Perforce\QA Wizard Pro\RunReports). Report is saved with a default filename.
/reportfile "path" Full directory path to save the run report in, including filename (e.g., C:\Program Files\Perforce\QA Wizard Pro\RunReports\Login.qawreport).
/noreport Disable report generation.

Repository variables

Item Description
/Dvariable="value" Set repository variable and value. Overrides default value.

Email results

Item Description
/emailresults OnSuccess|
OnFailure|
Always|Never
Indicates when to email results.
  • OnSuccess: Only email when scripts pass.
  • OnFailure: Only email only when scripts fail.
  • Always: Email when scripts pass or fail.
  • Never: Do not send email.
/emailhost host Email server host. Enter the domain name (e.g., mailserver.company.com) or IP address (e.g., 192.168.1.100).
/emailport port Port used to communicate with the email server.
/emailusername username Username used to communicate with the email server.
/emailpassword
passwordincleartext
Password used to communicate with email server.
/emailusesslencryption TRUE | FALSE Use SSL encryption to communicate with the email server.
/emailfrom emailaddress Sender's email address.
/emailto listofemailaddresses Recipient's email address. Separate multiple addresses with a semicolon.
/email subject "subject line" Email subject line. Must start and end with quotes.
/emailmessagebody "message body" Email message body. Must start and end with quotes. Only one line is allowed.

Helix ALM and Helix ALM Data Warehouse integrations

Item Description
/helixalm Automatically submit issue to Helix ALM.
/lsuser username Helix ALM License Server username for ALM Data Warehouse integration. Overrides the saved value on the computer running the script. If not specified, may be prompted to enter username.
/lspassword password Helix ALM License Server password for ALM Data Warehouse integration. Overrides the saved value on the computer running the script. If not specified, may be prompted to enter password.
/lssinglesignon on|off Enable or disable single sign-on for use with ALM Data Warehouse integration. Overrides the saved value on the computer running the script.

Return value

After playback completes, a value is returned to the command prompt to indicate if the session succeeded or failed.

Value Description
0 All scripts succeeded.
Non-zero number Errors caused scripts to fail. Use the output in the command prompt, the results report (if generated), or the status tool to review error information. See Viewing results reports and Viewing playback information in the status tool.