September 6, 2009

Keyword-Driven Testing with QA Wizard Pro

Helix ALM
Keyword-driven testing is a testing methodology that allows you to separate the actions that you want to perform from the automated script that executes the given actions. The actions can be entered into a table, such as an Excel spreadsheet, and then run by an automated script. Since the QA Wizard Pro scripting language mirrors these keywords in its own implementation, keyword-driven testing with QA Wizard Pro is easy. The keyword-driven example on Seapine Labs provides all that you need to begin keyword-driven testing with your own application. To try out the sample, add the two scripts to your workspace and add the Excel sheet to your workspace as an external datasheet named "SampleKeywords". You then just need to open the "KeywordDrivenSample" script and run it. You can see that this script is very simple, containing only two lines: Script.CallScript("KeywordDriver") KeywordDriver.DriveScript("Bug Reporter/1.0", "SampleKeywords") The first line sets up the use of the "KeywordDriver" script, which contains functions for reading in keywords and performing the listed actions. The second line contains two arguments. The first argument identifies which program to run. This script uses the Bug Reporter sample application that comes with QA Wizard Pro. The second argument tells QA Wizard Pro which datasheet to read the keywords from. In this sample, the "SampleKeywords" datasheet links to the provided "SampleKeywords.xls" Excel file. [caption id="attachment_960" align="aligncenter" width="640" caption="Sample Excel Sheet for a keyword-driven QA Wizard script."]Sample Excel Sheet for a keyword-driven QA Wizard script.[/caption] If you want to use keyword-driven testing with your own application, you can use much of this sample script and the "KeywordDriver" script that it calls.
  1. Add your application to QA Wizard Pro's repository and populate the repository with the controls and windows that you want to use. You can use the Populate Repository command to do this.
  2. Copy the "SampleKeywords.xls" file to a new Excel sheet. Edit this sheet to perform the actions that you would like your script to perform.
  3. Add the newly created Excel sheet into QA Wizard Pro by selecting the Create Datasheet command and selecting "Link to data in external source." Find your Excel sheet and link to it. Make sure you select the "First row contains column headers" option if you've left the header row in the Excel file.
  4. Copy the "KeywordDrivenSample" script to a new script. Edit the second line to specify the repository name and version of the application that you added in step 1. Also change the line to specify the datasheet that you created in step 3.