Search here for all the info you want in this Blog

What is parameterization in qtp

Testing the application by using same script with more number of inputs in qtp.

When you test your applications, you may want to check how the application performs the same operations with multiple sets of data. For

example,suppose you want to check how your Web site responds to ten separate sets of data. You could record ten separate tests, each with its own

set of data. Alternatively, you can create Data Table parameters so that your test runs ten times, each time using a different set of data.this way of setting parameters is called parameterization.

parameterize through Methods from Keyword View in qtp.

Create Blank TestCase. Goto –>Record .Open ur Flight Reservation application
Action1 :
Do the record for login (Enter Agent Name and Mercury Password).Then the script would be

SystemUtil.Run “C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe”,””,”C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\”,”open”
Dialog(“Login”).WinEdit(“Agent Name:”).Set “qtpparameter”
Dialog(“Login”).WinEdit(“Password:”).SetSecure “4c04981da8da89eb8a871793145df8e386047656″
Dialog(“Login”).WinButton(“OK”).Click

Action2 :
Goto insert —>Call to new action and then it would create action2.
Then go for File–>Open Order and give orger number (Ex:5) and ok.Then the script would be

Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).WinMenu(“Menu”).Select “File;Open Order…”
Window(“Flight Reservation”).Dialog(“Open Order”).WinCheckBox(“Order No.”).Set “ON”
Window(“Flight Reservation”).Dialog(“Open Order”).WinEdit(“Edit”).Set “5″
Window(“Flight Reservation”).Dialog(“Open Order”).WinButton(“OK”).Click

Action3 :
Goto insert —>Call to new action and then it would create action3.
Close the Flight Reservation application.Then the script would be

Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).Close

Fill the data in the global sheet. Ex:
Make the A name as Login and B name as Password
Give any name (Ex: qtpparameter for login and mercury for password)

Fill the data in the Action2. Ex:
Make the A name as Order Number
Give some numbers (Ex: 3,45,8 )

Goto KeyWord View
Action1
Login :
AgentName Set Value
Click on the value.There choose Parameter:DataTable.
Name :Choose Login
Ok
Same thing for password field.
Name :Choose Password
Ok

Action2
Flight Reservation
Open Order
Edit set “some number” click there
There choose Parameter:DataTable.
Location in the datatable :current action
ok

Now you look into the expert view and see the code .
There automatically code would be change

Goto–Action1–>Right Click–>Action Call Properties–>Run on all rows
Goto–Action2–>Right Click–>Action Call Properties–>Run on all rows

Execute it.

execute it

parameterize through methods in qtp

Action 1:

SystemUtil.Run “C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe”,””,”C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\”,”open”
Dialog(“Login”).WinEdit(“Agent Name:”).Set DataTable(“Login”, dtGlobalSheet)
Dialog(“Login”).WinEdit(“Password:”).SetSecure DataTable(“Password”, dtGlobalSheet)
Dialog(“Login”).WinButton(“OK”).Click

Action2 :

Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).WinMenu(“Menu”).Select “File;Open Order…”
Window(“Flight Reservation”).Dialog(“Open Order”).WinCheckBox(“Order No.”).Set “ON”
Window(“Flight Reservation”).Dialog(“Open Order”).WinEdit(“Edit”).Set DataTable(“OpenOrder”, dtLocalSheet)
Window(“Flight Reservation”).Dialog(“Open Order”).WinButton(“OK”).Click

Action3:

Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).Close

Just user need to give inputs in the corresponding GlobalData sheet (Make ‘A’ as Login and ‘B’ as ‘Password’ )in Action2 Sheet (Make ‘A’ as ‘Order No’).

Parameterization through physical description example in qtp

Parameterization through physical description Example :

Action1 :

systemutil.Run “C:\Program Files (x86)\HP\QuickTest Professional\samples\flight\app\flight4a.exe”
Dialog(“Login”).WinEdit(“Agent Name:”).Set “qtpparameter”
Dialog(“Login”).WinEdit(“Agent Name:”).Type micTab
Dialog(“Login”).WinEdit(“Password:”).SetSecure “4c0ba4645292b686779b42c81dd13093544face9″
Dialog(“Login”).WinEdit(“Password:”).Type micReturn

Action2 :

Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).WinMenu(“Menu”).Select “File;Open Order…”
Window(“Flight Reservation”).Dialog(“Open Order”).WinCheckBox(“Order No.”).Set “ON”
Window(“Flight Reservation”).Dialog(“Open Order”).WinEdit(“Edit”).Set DataTable(“order_no”, dtGlobalSheet)
Window(“Flight Reservation”).Dialog(“Open Order”).WinButton(“OK”).Click
Window(“Flight Reservation”).Activate

Action3 :

Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).WinMenu(“Menu”).Select “File;Fax Order…”
Window(“Flight Reservation”).Dialog(“Fax Order No. 1″).ActiveX(“MaskEdBox”).Type “11111111111111″
Window(“Flight Reservation”).Dialog(“Fax Order No. 1″).WinButton(“Cancel”).Click
Window(“Flight Reservation”).Activate

Action4 :

Window(“Flight Reservation”).Activate
Window(“Flight Reservation”).Close

Goto Global Data Table :
make “A” as “order_no” and enter
1
2
3

make “B” as “fax_no” and enter
Fax Order No. 1
Fax Order No. 2
Fax Order No. 3

Goto Expert Veiw–Action3

rht click on Dialog(“Fax Order No. 1″) goto object propert1es
goto Fax Order No. 1 click there u will get browse button open
choose DataTable and fax_no and click ok
execute it

48 comments:

  1. I have been following your posts regularly. It is very informative that I share it with my students.
    QTP Selenium Training

    ReplyDelete
  2. I found some useful information in your blog,it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    Greens Technologies In Chennai

    ReplyDelete
  3. have to learned to lot of information about java Gain the knowledge and hands-on experience you need to successfully design, build and deploy applications with java.
    Java Training in Chennai

    ReplyDelete
  4. great article!!!!!This is very importent information for us.I like all content and information.I have read it.You know more about this please visit again.
    QTP Training in Chennai

    ReplyDelete
  5. very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
    Informatica Training in Chennai

    ReplyDelete
  6. Latest Govt Bank Jobs Recruitment Notification 2016


    Really appreciate you sharing this post.Much thanks again. Fantastic...................

    ReplyDelete
  7. Really awesome blog. Your blog is really useful for me. Thanks for sharing this informative blog. Keep update your blog.
    QTP Training in Chennai

    ReplyDelete
  8. Looking for real-time training institue.Get details now may if share this link visit
    oracle training in chennai
    oraclechennai.com:

    ReplyDelete
  9. hai If you are interested in hyperion training, our real time working. so visit this site and get more details....
    hyperion Training in Chennai.
    hyperion training in chennai

    ReplyDelete
  10. Assam 2564 Police Constable Recruitment 2016 Apply Online



    It was helpful and will really help me in building my new blog traffic and increasing my readers per day...............

    ReplyDelete
  11. This post is really nice and informative. The explanation given is really comprehensive and informative..
    SAS Training In Chennai

    ReplyDelete
  12. iOS training in chennai THINKIT is a heading educational academy in Chennai, India. We offer iOS Training developer.

    Our courses are intended for job seekers, scholars, fresher and professionals. These employment oriented courses are planned by very accomplished industry experts and pioneers so that our people can get the most extreme learning and use the same in the best way.

    ReplyDelete
  13. Great post,

    This information is impressive..I am inspired with your post writing style & how continuously

    you describe this topic. After reading your post,thanks for taking the time to discuss this, I

    feel happy about it and I love learning more about this topic..

    Java Training in Chennai

    ReplyDelete
  14. Amazing..Its very good article on QTP. This content creates a new knowledge to me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this
    Android Training in Chennai

    ReplyDelete
  15. This testing QTP is really useful for all.It is very important information.thanks for this valuable one.
    Java Training in Chennai

    ReplyDelete
  16. The testing QTP is really good news for this information , it is informative for students for those who studying on this topic.

    dot net training in chennai

    ReplyDelete
  17. Nice..You have clearly explained about QTP..Its very easy to understand..Keep on blogging..
    Linux training in chennai

    ReplyDelete
  18. nice informatic blog ..SEO training in hyderabad by experts in digital markeing And by prosessional experts in seo.All the training by placement and also guide by the professionals.Best SEO training in hyderabad

    ReplyDelete
  19. I simply want to say I’m very new to blogs and actually loved you’re blog site. Almost certainly I’m going to bookmark your blog post . You absolutely come with great well written articles. Thanks a lot for sharing your blog.
    Android Training institute in chennai with placement | Android Training in chennai |Best Android Training in Velachery

    ReplyDelete
  20. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..
    Big Data Training in Chennai
    AngularJS Training in Chennai

    ReplyDelete
  21. I value your endeavors since it passes on the message of what you are attempting to state. It's an extraordinary expertise to make even the individual who doesn't think about the subject could ready to comprehend the subject. Your web journals are justifiable and furthermore extravagantly depicted. I would like to peruse an ever increasing number of intriguing articles from your blog. Continue Sharing
    Big Data Hadoop online training in Delhi
    Online Hadoop training in Mumbai

    ReplyDelete
  22. Very good information provided, Thanks a lot for sharing such useful information.

    Education
    Technology

    ReplyDelete
  23. I need to to thank you for your time due to this fantastic read!! I definitely enjoyed every bit of it and I have you bookmarked to see new information on your blog.
    I need to to thank you for your time due to this fantastic read!!
    Salesforce Training in Chennai

    Salesforce Online Training in Chennai

    Salesforce Training in Bangalore

    Salesforce Training in Hyderabad

    Salesforce training in ameerpet

    Salesforce Training in Pune

    Salesforce Online Training

    Salesforce Training

    ReplyDelete
  24. Benefits of reading your post. this may facilitate within the maintenance of our health.
    The daily routine can assist you lose weight quickly and safely.My life is completely reworked once I followed this diet.I feeling nice concerning myself.
    data science training in chennai

    data science training in tambaram

    android training in chennai

    android training in tambaram

    devops training in chennai

    devops training in tambaram

    artificial intelligence training in chennai

    artificial intelligence training in tambaram

    ReplyDelete
  25. Infycle Technologies, the best software training institute in Chennai offers the leading Python course in Chennai for tech professionals, freshers, and students at the best offers. In addition to the Python course, other in-demand courses such as Data Science, Cyber Security, Selenium, Oracle, Java, Power BI, Digital Marketing also will be trained with 100% practical classes. After the completion of training, the trainees will be sent for placement interviews in the top MNC's. Call 7504633633 to get more info and a free demo.

    ReplyDelete
  26. Jump into an immense learning experience of DevOps Training in Chennai from Infycle Technologies, the finest software training Institute in Chennai. Also, an excellent place to learn other technical courses like Cyber Security, Graphic Design and Animation, Block Security, Java, Cyber Security, Oracle, Python, Big data, Azure, Python, Manual and Automation Testing, DevOps, Medical Coding etc., and here we provide well-experienced trainers with excellent training to the freshers. And we also provide 100+ Live Practical Sessions with Real-Time scenarios which helps the students in learning the technical stuff easily and they are able to get through interviews in top MNC’s with an amazing package. for more queries call us on 7504633633, 7502633633.

    ReplyDelete