Posted by: Sentinel627
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:
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:
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)
These tips apply to all 9.x versions of HP QuickTest Professional