Oct 27, 2009

Parameterized a step...

 suppose you have parameterized a step where a user selects one of three membership types as part of a registration process. When the user selects a membership type, the page that opens depends on the membership type selected in the previous page. You can create one action for each type of membership. Then you can use If statements to determine which
membership type was selected in a particular iteration of the test and run the appropriate action for that selection.     In the Expert View, your test might look something like this:

Browser("Membership Preference").Page("Membership Preference").
WebRadioGroup("MemType").Select DataTable("memtype", dtGlobalSheet)
Mem_Type=Browser("Membership Preference").
Page("Membership Preference").WebRadioGroup("MemType").
GetROProperty ("value")
If Mem_Type="paid" Then
RunAction "Paid_Mem", oneIteration
ElseIf Mem_Type = "free" Then
RunAction "Free_Mem", oneIteration
RunAction "Preferred", oneIteration
End If

Creating an Action Template
If you want to include one or more statements in every new action in your
test, you can create an action template. For example, if you always enter
your name as the author of an action, you can add this comment line to
your action template. An action template applies only to actions created on
your computer.
To create an action template:
1 Create a text file containing the comments, function calls, and other
statements that you want to include in your action template. The text file
must be in the structure and format used in the Expert View.
2 Save the text file as ActionTemplate.mst in your <QuickTest Installation
Folder>\dat folder. All new actions you create contain the script lines from
the action template.
Note: Only the file name ActionTemplate.mst is recognized as an action

Oct 16, 2009

We automate only regression test scripts or even we can automate the whole application?


We can automate whole application and generally do the same. But the main objective of automation is regression test, that's why we automate the application/part of application whose requirements are freezed and needs not to be changed. Because change in requirement is change in script and if we need to change script so frequently then no benefit from automation.


Oct 6, 2009

How to compare the data in the excel sheet with the Web List items in the application ?

How to compare the data in the excel sheet with the Web List items in the application ?

1. Create an Excel object and get the values from excel into an array.
2. Get the allitems property of a Weblist, split and keep them in to an array.
3. Compare the two array's.

QTP Expertise Search

Popular Posts