QA Focus

Jul 25 2008   2:53AM GMT

HP QuickTest Professional Tips ‘n’ Tricks – July ’08 Part II

Sentinel627 Greg Annen Profile: Sentinel627

Tags:
IMAP4

Args(“maties”)! More tricky bits for ye!

Sorry, I just HAD to say that! But it does make a point: not everything works quite as you might expect in QuickTest Pro.

Using Parameters with QTP Scripts

Parameters can be predefined for a QTP Action script, under File –> Settings –> Test Settings, Parameters tab.

Test Settings - Parameters 1

These parameters can then be populated manually, or from Quality Center Test Lab at runtime.

An important note: using the QTP ‘Parameter()’ property described in the user guide does not always work (this is an HP Mercury bug)! As a workaround, use ‘TestArgs()’.
For example:

If Trim(TestArgs(“Workbook”))”” Then
DriverWorkbook = TestArgs(“Workbook”)
End If

If you are not executing a script from Quality Center, the values of any parameters can be changed manually before execution:

Test Settings - Parameters 2

In this example, fill in a Value for ‘Workbook’:

Test Settings - Parameters 3

As described above, you can now use TestArgs(“Workbook”) to refer to this value at any point during script execution.

All right, me hearties! Shiver your timbers! Get out there, ye auto-“maties”!

I can be such a dork.

HP QuickTest Pro

 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.

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:

Share this item with your network: