December 19, 2011

QA Wizard Pro: Running Successive Scripts Successfully

Helix ALM
Running scripts in a clean environment is critical to ensuring that you're able to gather the best and most precise results possible. For instance,  let's say you're running a series of twenty-five scripts but the first one fails, leaving a browser window open and the user logged in. This can cause successive scripts to fail because they can not log in to the application. To make sure your scripts run without interference from applications or browser windows that are left open by other scripts, you can add a Windows taskkill command to the beginning of each script. This one line of code ensures that any running application processes are killed. To add the taskkill command, insert a line of code that uses the RunCommand statement to pass the Windows taskkill command to the Command Window at the beginning of the script. The following screenshot includes the code: A few things to keep in mind:
  • The Image Name corresponds to the application process and can be found using the Task Manager.
  • Quotes must be placed around the arguments to make sure the command is passed correctly.
  • The "/C" option in the argument closes the Command Window when the action is completed.
By adding one line to the script you can guarantee that each execution will run without interference. For more QA Wizard Pro tips, be sure to check out the QA Wizard Pro Resource Center.