QA Focus

Jul 11 2008   8:20PM GMT

HP QuickTest Professional Tips ‘n’ Tricks – July 2008



Posted by: Sentinel627
Tags:
Functional testing
HP Quality Center
HP QuickTest Professional
Software Quality

Periodically, I hope to post a few helpful suggestions about using HP’s QuickTest Professional automated test tool. These are the tricky little things that are obvious once you stumble across then actually use them. Perhaps someone else will benefit by my stumbling.

Environment.Value and XML Files

If you load a user-defined environment file (XML) as a Test Resource setting, you can NOT change any of the values (i.e., QTP won’t let you). However, if you define an Environment.Value programmatically, you CAN change its value. This is especially useful for updating global variable values used by functions.

To detect an existing Environment.Value and load if NOT found:

Environment values

Dynamically Loaded Function Libraries

You can use the vbscript ‘Execute’ statement to dynamically load functions as test resources. Put all common functions and subprocedures in a text file, e.g., “global.txt”. Then at the top of the script to be executed, paste in these lines:

Dynamic loaded libraries

Print Run-time Values during Debug

Use the ‘Print’ utility to display information in the QTP Print Log window while still continuing your run session. For example:

ConfigSoapBlock = FaWebServiceGetConfigBlock(“Global”,NameSpace)
Print ConfigSoapBlock

…will display:

Print

These tips apply to all 9.x versions of HP QuickTest Professional

HP QTP

1  Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Karne2u
    Hi Greg, Your tips were great, have a question on the Print utility... was wondering if there is any way to save the print log to a file.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: