Creating a Solid Test Automation Framework with QTP - QA Focus

QA Focus

Aug 16 2008   5:47PM GMT

Creating a Solid Test Automation Framework with QTP



Posted by: Greg Annen
Software Quality, Functional testing, HP QuickTest Professional, HP Quality Center

HP’s QuickTest Pro can itself be used to build a test automation framework. Listed below are some of the characteristics you should take into consideration during the design phase.

Test automation scripts and functions should:

  • Be Reusable and Repeatable
  • Require Low Maintenance
  • Allow Unattended Execution
  • Support Platform Independence - IE 6 or IE 7, shouldn’t matter
  • Use Data Abstraction - Keyword-Driven Framework

HP QuickTest Pro scripts should use:

  • Environment Variables
  • Test execution ‘Driver’ to call ‘Actions’
  • ‘Action’ to call functions - i.e., function call for each action
  • Imported test data (Excel) - common format
  • Results reporting - QTP + Quality Center; Excel “Step Status”

VBScript functions can be:

  • Simple - Specific purpose; True / False or 0 / 1 return code
  • Complex - Multiple steps (e.g., login); “Fuzzy” return code that maps to business rules
  • Resilient - include Error Handling

Handling Objects in the Repository is done by:

  • Object changes/additions per app release
  • Replace with descriptive programming whenever possible
    • Functions using regular expressions (e.g., popup windows: IE 6 vs IE 7)
    • Web app objects usually classifiable by type, html tag, or class (QTP test object properties)
    • Reusable methods: look before you write!

Comment on this Post


You must be logged-in to post a comment. Log-in/Register