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"]
The following command runs the WysiCorp Login script from the WysiCorpWebSite workspace.
QAWRunScript.exe "WysiCorpWebSite.qawwspace" "WysiCorp Login.qawscript"
To run the script without creating a results report, add the /noreport option. For example:
QAWRunScript.exe "WysiCorpWebSite.qawwspace" "WysiCorp Login.qawscript" /noreport
To run the script and change a repository variable value, add the /Dvariable option. The following example changes the URLROOT repository variable value.
QAWRunScript.exe "WysiCorpWebSite.qawwspace" "WysiCorp Login.qawscript" /DURLROOT=http://www.wysicorp.com
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"]
The following command runs the WysiCorp Logins batch file and saves the run results report on the computer's Desktop.
QAWRunScript.exe "WysiCorpLogins.qawbatch" /reportdir %USERPROFILE%\Desktop
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.
|
| /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. |