SlideShare ist ein Scribd-Unternehmen logo
1 von 19
TEST AUTOMATION AND QTP
                                        The Zeroth Step




www.automationrepository.com   Automation Repository -   QTP Tutorials Made Easy
“Before you begin learning QTP, you should have a basic idea about what you
would be doing as part of test automation and how QTP will assist you to do
that work.”




What you would read in this PPT:
 What all basic things you do as part of automating test cases.
 How would QTP help you in this test script creation process.




 www.automationrepository.com           Automation Repository -   QTP Tutorials Made Easy
Part 1

                      Automating a Test Case
                   (Decoding the Steps Involved)




www.automationrepository.com        Automation Repository -   QTP Tutorials Made Easy
When you start automating a test case, there would be certain things
(tasks) that you have to do. Automation of your test script will complete
only when you complete all these tasks.

Here, we will first try to identify all the tasks that are common in most of
the test cases you automate.


Let us understand this with the help of an example – Gmail Login.




 www.automationrepository.com           Automation Repository -   QTP Tutorials Made Easy
To automate Gmail Login part, you have to write some code that does the
  following things –

   Opens Gmail URL.
   Enters valid Email id and Password.
   And click on Sign in button.

  Let us understand this in bit more detail.




Objects or Controls like                                                      Data that you fill in
Text Box, Button, Link etc                                                    different controls
on which you will perform
some action




                                   Perform actions like clicking on button,
                                   entering data in some text field.

    www.automationrepository.com                     Automation Repository -     QTP Tutorials Made Easy
Task 1 - Identifying the Objects
 Before you can perform action on any object, you need to identify the
object uniquely. For example, before entering the email id, you should
know that which of the two text boxes in the Gmail Login screen is the
‘Email’ field. Once you correctly identify the email field, you can then enter
email id in that field.

 Each control (in the application) has its own unique set of properties
using which you can distinguish it from other controls on the same page.
For example, the login button in Gmail contains the text ‘Sign in’ using
which it can be clearly distinguished from other buttons.


                                     Login button with ‘Sign in’ text




 So to identify an object, you should try to find out the unique properties
which are available with that object only.

 www.automationrepository.com              Automation Repository -      QTP Tutorials Made Easy
Task 2 - Performing Operation on the Object
 Once you have identified an Object uniquely, the next step is to perform
some operation on that object.

 The operation that you perform depends on the type of object.

For example: On a button or link, you can do a click operation. For a text
box, you can perform Set or Type operation. Similarly, each object will
have each own set of operations which you can perform on that object.



Task 3 - Data Handling
 Data handling is also a part of performing operations on Objects.

 For some controls like text boxes you would need to perform operations
that would enter some data in these fields.

 www.automationrepository.com           Automation Repository -   QTP Tutorials Made Easy
Task 4 - Combining all Individual Operations
 To create a test script, you would need to combine all individual
operations together and execute them.

For example: The Login portion of Gmail will have the following
operations:

      Op 1: Open Gmail URL.
      Op 2: Enter User Name.
      Op 3: Enter Password.
      Op 4: Click on ‘Sign in’ button.

 You can combine all the individual operations to form an Action or
Function.

So an action (function) is a collection of operations that when combined
form a logical business flow (such as Login, Logout, Search etc).


 www.automationrepository.com             Automation Repository -   QTP Tutorials Made Easy
Task 5 - Reusable and Non-Reusable Functions
 In your test scripts, there will be certain functions that will be used only
once and there will be others that will be used multiple times.

 The actions that are used only once are non-reusable actions. And the
actions that are used multiple times are called reusable actions.

Example: Consider the following 3 Test Cases –




 Here you can note that functions Gmail_Login and Gmail_Logout are
used more than once. Hence, these are reusable functions. All others are
non-reusable functions.


 www.automationrepository.com            Automation Repository -   QTP Tutorials Made Easy
Structure of a Simple Test Script
                     TEST SCRIPT
                       ACTION 1 (Reusable Or Non-Reusable)

                        Op 1: Some Operation (Data Handling optional)
                        Op 2: Some Operation (Data Handling optional)
                        Op 3: Some Operation (Data Handling optional)



                       ACTION 2 (Reusable Or Non-Reusable)

                        Op 1: Some Operation (Data Handling optional)
                        Op 2: Some Operation (Data Handling optional)
                        Op 3: Some Operation (Data Handling optional)


                                         .....

                       ACTION N (Reusable Or Non-Reusable)

                        Op 1: Some Operation (Data Handling optional)
                        Op 2: Some Operation (Data Handling optional)
                        Op 3: Some Operation (Data Handling optional)



www.automationrepository.com                        Automation Repository -   QTP Tutorials Made Easy
Combining Everything Together

This slide lists down the common tasks you need to perform to create Test
Scripts

 Identify Objects uniquely.

 Perform Operations on the Objects.

 Perform Data Handling operations wherever required.

 Create Reusable and Non – Reusable Actions (or Functions).




 www.automationrepository.com          Automation Repository -   QTP Tutorials Made Easy
Part 2

                          How QTP Helps in
                        Automating Test Cases




www.automationrepository.com        Automation Repository -   QTP Tutorials Made Easy
 In Part 1, you saw the common tasks that you have to complete in order
to create a Test Script.

 In this section you will see how QTP can assist you in completing these
tasks.

 QTP has different features and mechanisms that will help you complete
the tasks.

 Let us see each of these tasks and the corresponding QTP feature one by
one.




 www.automationrepository.com          Automation Repository -   QTP Tutorials Made Easy
Identifying and Storing Objects

QTP provides a unique mechanism using which you can identify the
unique properties of the objects. This mechanism is called Object Spy.
Along with this, QTP also provides a storehouse called Object Repository
where you can store these objects together with their properties.




         Object Spy to find unique           Object Repository to store the
         properties of an object             object and its properties.

 www.automationrepository.com         Automation Repository -    QTP Tutorials Made Easy
Performing Operations on Objects

QTP has its own set of pre-defined function libraries that contain all the
operations associated with different objects. QTP also provides an intelli-
sense option where when you write an object in your code, QTP will
automatically show all the functions and properties associated with that
object.




      QTP shows the functions associated
      with ‘WebEdit’ object.




 www.automationrepository.com              Automation Repository -   QTP Tutorials Made Easy
Performing Data Handling Operations

QTP has its own inbuilt mechanism called Data Table where you can save
the test data and later use it in the test scripts. QTP provides its own set of
functions using which you can retrieve data from the Data Table.

Even if your data is stored in some external files such as Excel sheets or
XML files, QTP provides you with many methods using which you can
fetch data from these external sources.




                                 Data Table in QTP

 www.automationrepository.com               Automation Repository -   QTP Tutorials Made Easy
Storing Reusable and Non-Reusable Code

QTP also provides many methods which you can use to store your
reusable and non-reusable code. These mechanisms are –

 Actions: Actions are one of the most common ways in which you can
save code in QTP. You can save both reusable and non-reusable code in
Actions.

 Function Libraries: Function Library is another very popular method
that you would use in almost all your QTP projects. Function Library is
primarily used to store reusable code.

 Business/Scripted Components: Though used less frequently, this is
one more place where you can store your code.




 www.automationrepository.com         Automation Repository -   QTP Tutorials Made Easy
Summary

 You read about the common tasks that you need to do in order to write
test scripts. These tasks are –

      Identifying and Storing Objects.
      Performing Operations on the Objects.
      Handing Test Data in the Scripts.
      Combining all operations to form Reusable & Non-Reusable Actions.


 You also read how QTP can help you create test scripts using its various
features like –

      Object Spy and Object Repository.
      Inbuilt Function Libraries.
      Data Tables and related methods
      Actions, Function Libraries and Scripted/Business Components.


 www.automationrepository.com          Automation Repository -   QTP Tutorials Made Easy
THANK YOU

 We are always eager to know what you think about our
 content. For feedback, suggestions or any queries, please
 email us at anish@automationrepository.com



 For more QTP Tutorials, visit –

  www.automationrepository.com
 www.automationrepository.com/tutorials-for-qtp-beginners/




www.automationrepository.com        Automation Repository -   QTP Tutorials Made Easy

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (8)

SQL BASIC QUERIES SOLUTION ~hmftj
SQL BASIC QUERIES SOLUTION ~hmftjSQL BASIC QUERIES SOLUTION ~hmftj
SQL BASIC QUERIES SOLUTION ~hmftj
 
Most Asked Java Interview Question and Answer
Most Asked Java Interview Question and AnswerMost Asked Java Interview Question and Answer
Most Asked Java Interview Question and Answer
 
QA Interview Questions With Answers
QA Interview Questions With AnswersQA Interview Questions With Answers
QA Interview Questions With Answers
 
Fresher testing cv
Fresher testing cvFresher testing cv
Fresher testing cv
 
Java questions for viva
Java questions for vivaJava questions for viva
Java questions for viva
 
01. testing fresher-resume
01. testing fresher-resume01. testing fresher-resume
01. testing fresher-resume
 
Sql queires
Sql queiresSql queires
Sql queires
 
Top C Language Interview Questions and Answer
Top C Language Interview Questions and AnswerTop C Language Interview Questions and Answer
Top C Language Interview Questions and Answer
 

Kürzlich hochgeladen

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Test Automation and QTP - The Basics

  • 1. TEST AUTOMATION AND QTP The Zeroth Step www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 2. “Before you begin learning QTP, you should have a basic idea about what you would be doing as part of test automation and how QTP will assist you to do that work.” What you would read in this PPT:  What all basic things you do as part of automating test cases.  How would QTP help you in this test script creation process. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 3. Part 1 Automating a Test Case (Decoding the Steps Involved) www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 4. When you start automating a test case, there would be certain things (tasks) that you have to do. Automation of your test script will complete only when you complete all these tasks. Here, we will first try to identify all the tasks that are common in most of the test cases you automate. Let us understand this with the help of an example – Gmail Login. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 5. To automate Gmail Login part, you have to write some code that does the following things –  Opens Gmail URL.  Enters valid Email id and Password.  And click on Sign in button. Let us understand this in bit more detail. Objects or Controls like Data that you fill in Text Box, Button, Link etc different controls on which you will perform some action Perform actions like clicking on button, entering data in some text field. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 6. Task 1 - Identifying the Objects  Before you can perform action on any object, you need to identify the object uniquely. For example, before entering the email id, you should know that which of the two text boxes in the Gmail Login screen is the ‘Email’ field. Once you correctly identify the email field, you can then enter email id in that field.  Each control (in the application) has its own unique set of properties using which you can distinguish it from other controls on the same page. For example, the login button in Gmail contains the text ‘Sign in’ using which it can be clearly distinguished from other buttons. Login button with ‘Sign in’ text  So to identify an object, you should try to find out the unique properties which are available with that object only. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 7. Task 2 - Performing Operation on the Object  Once you have identified an Object uniquely, the next step is to perform some operation on that object.  The operation that you perform depends on the type of object. For example: On a button or link, you can do a click operation. For a text box, you can perform Set or Type operation. Similarly, each object will have each own set of operations which you can perform on that object. Task 3 - Data Handling  Data handling is also a part of performing operations on Objects.  For some controls like text boxes you would need to perform operations that would enter some data in these fields. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 8. Task 4 - Combining all Individual Operations  To create a test script, you would need to combine all individual operations together and execute them. For example: The Login portion of Gmail will have the following operations:  Op 1: Open Gmail URL.  Op 2: Enter User Name.  Op 3: Enter Password.  Op 4: Click on ‘Sign in’ button.  You can combine all the individual operations to form an Action or Function. So an action (function) is a collection of operations that when combined form a logical business flow (such as Login, Logout, Search etc). www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 9. Task 5 - Reusable and Non-Reusable Functions  In your test scripts, there will be certain functions that will be used only once and there will be others that will be used multiple times.  The actions that are used only once are non-reusable actions. And the actions that are used multiple times are called reusable actions. Example: Consider the following 3 Test Cases –  Here you can note that functions Gmail_Login and Gmail_Logout are used more than once. Hence, these are reusable functions. All others are non-reusable functions. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 10. Structure of a Simple Test Script TEST SCRIPT ACTION 1 (Reusable Or Non-Reusable) Op 1: Some Operation (Data Handling optional) Op 2: Some Operation (Data Handling optional) Op 3: Some Operation (Data Handling optional) ACTION 2 (Reusable Or Non-Reusable) Op 1: Some Operation (Data Handling optional) Op 2: Some Operation (Data Handling optional) Op 3: Some Operation (Data Handling optional) ..... ACTION N (Reusable Or Non-Reusable) Op 1: Some Operation (Data Handling optional) Op 2: Some Operation (Data Handling optional) Op 3: Some Operation (Data Handling optional) www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 11. Combining Everything Together This slide lists down the common tasks you need to perform to create Test Scripts  Identify Objects uniquely.  Perform Operations on the Objects.  Perform Data Handling operations wherever required.  Create Reusable and Non – Reusable Actions (or Functions). www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 12. Part 2 How QTP Helps in Automating Test Cases www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 13.  In Part 1, you saw the common tasks that you have to complete in order to create a Test Script.  In this section you will see how QTP can assist you in completing these tasks.  QTP has different features and mechanisms that will help you complete the tasks.  Let us see each of these tasks and the corresponding QTP feature one by one. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 14. Identifying and Storing Objects QTP provides a unique mechanism using which you can identify the unique properties of the objects. This mechanism is called Object Spy. Along with this, QTP also provides a storehouse called Object Repository where you can store these objects together with their properties. Object Spy to find unique Object Repository to store the properties of an object object and its properties. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 15. Performing Operations on Objects QTP has its own set of pre-defined function libraries that contain all the operations associated with different objects. QTP also provides an intelli- sense option where when you write an object in your code, QTP will automatically show all the functions and properties associated with that object. QTP shows the functions associated with ‘WebEdit’ object. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 16. Performing Data Handling Operations QTP has its own inbuilt mechanism called Data Table where you can save the test data and later use it in the test scripts. QTP provides its own set of functions using which you can retrieve data from the Data Table. Even if your data is stored in some external files such as Excel sheets or XML files, QTP provides you with many methods using which you can fetch data from these external sources. Data Table in QTP www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 17. Storing Reusable and Non-Reusable Code QTP also provides many methods which you can use to store your reusable and non-reusable code. These mechanisms are –  Actions: Actions are one of the most common ways in which you can save code in QTP. You can save both reusable and non-reusable code in Actions.  Function Libraries: Function Library is another very popular method that you would use in almost all your QTP projects. Function Library is primarily used to store reusable code.  Business/Scripted Components: Though used less frequently, this is one more place where you can store your code. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 18. Summary  You read about the common tasks that you need to do in order to write test scripts. These tasks are –  Identifying and Storing Objects.  Performing Operations on the Objects.  Handing Test Data in the Scripts.  Combining all operations to form Reusable & Non-Reusable Actions.  You also read how QTP can help you create test scripts using its various features like –  Object Spy and Object Repository.  Inbuilt Function Libraries.  Data Tables and related methods  Actions, Function Libraries and Scripted/Business Components. www.automationrepository.com Automation Repository - QTP Tutorials Made Easy
  • 19. THANK YOU We are always eager to know what you think about our content. For feedback, suggestions or any queries, please email us at anish@automationrepository.com For more QTP Tutorials, visit –  www.automationrepository.com www.automationrepository.com/tutorials-for-qtp-beginners/ www.automationrepository.com Automation Repository - QTP Tutorials Made Easy