September 2, 2011

Time Saver: Using QA Wizard Pro's AddDefect Statement for Cleaner Defect Reports

Helix ALM
QA Wizard Pro’s AddDefect statement can be used to automatically add a defect to a TestTrack project. The AddDefect's statement parameters are used to populate the Summary, Description, Steps to Reproduce and Hardware fields of the defect. This statement is commonly used with an If statement to add defects to TestTrack Pro if a condition that causes the script to fail is not met. Note: Use Tools > TestTrack > Configure TestTrack to connect to a TestTrack project. Keep in mind that you can configure the TestTrack project to email confirmations to a designated user. Following are two examples of a script that tests a web site to ensure seven different choices appear in a drop-down list when a web browser page is accessed. The first script creates a defect in TestTrack that includes basic information about the failure. The second shows how you can pull information about the failure and send that data to the TestTrack defect to help with reproducing and validating the defect.  In this example, the script verifies that all seven choices are available in the drop-down list. Although the script catches the problem and creates an issue in TestTrack, notice that the defect only contains very basic information. The second AddDefect script sends the following values to TestTrack, which are captured at run-time using the Property Statement:
  • Actual number of items found
  • What the names are
  • Script name
  • Tester running the script
If the correct number of items are not found, the AddDefect statement sends the correct and incorrect number of items when the defect is created in TestTrack. The AddDefect statement is a powerful way to automate issue creation as part of your test automation suite. It also ensures that accurate and useful information about a failure is included with the defect, helping development and QA reproduce, fix, and verify the issue. See ‘AddDefect’ in the QA Wizard Pro User Guide for more information.