SlideShare a Scribd company logo
1 of 16
QTP (Quick Test Professional)
       Introduction to QTP:

       QTP is a functional & regression testing of an application.

Since QTP supports external add-ins,it can be used for automating testing of many
different software applications and websites.Some add-ins (e.g ActiveX,VisualBasic,Web)
are built-in with QTP, and some other add-ins (e.g Java, .net, TE (termial emulator))are
external add-ins.

External add-in means we need to install them separately once after installing QTP.We
have the option to load only the required add-ins when opening the QTP IDE. So, it will be
helpful to improve the execution speed.QTP will support Keyword Driven and Data
Driven testing.We can create our own test automation framework (Hybrid framework) also
based on our own requirements for test automation.

It is very important to understand how QTP works. Because it will help to learn any other
features in QTP easily. And, it will help to design an effective automation framework. Having
clear understanding of inner working of QTP will help to resolve any issue that may come
across during automation script development and also during script execution.

       It can be explained as below

We know that every test case should have Test Steps and Expected Results.As QTP is
used for executing these test cases, QTP also should have a way for handling both Test
Steps and Expected Results.Handling Test Steps means, QTP should be capable of
navigating any path/page in any website or in any software application.For achieving this
QTP should be able to recognize any control/object in any application/webpage which
needs to be tested. For recognizing the object, it should know the properties of those
objects beforehand. It is achieved by storing the properties of the objects in a
centralized place known as Object

Repository While running the test script, the objects in the application are
identified/recognized by comparing the properties of the objects with the properties stored
in the Object Repository.

doing this recognization, execution of Test Steps becomes possible.QTP is having Data
tables (similar to Excel sheet) for supporting execution for multiple iterations of same steps
with different data. For example, assume that we need to execute two test cases, one for
logging into a website using UPPER case username and another test case for logging into a
website using lower case username. For executing these two test cases, the steps will be
same. The only difference is in the test data. It can be easily done in QTP by putting these
input usernames in Datatable and make the Script to execute it two times.Next, we need
to think about handling Expected Results. The purpose of testing is comparing the Actual
result with the predefined Expected Results. It is achieved by using Checkpoints.




                                                                                              1
Prepare By Sandeep
There are many checkpoints available in QTP. They are, Standard Checkpoint,Text
Checkpoint, Bitmap Checkpoint, Database Checkpoint, accessibility Checkpoint and
XML Checkpoint.

      Checkpoints:

          Standard Checkpoint — Checks the properties of an object.
          2. Table Checkpoint — A Standard Checkpoint that checks the properties of a
           table.
          3. Image Checkpoint — A Standard Checkpoint that checks the properties of an
           image.
          4. Bitmap Checkpoint — Compares an area of the application under test pixel-
           for-pixel with the screen as seen at record-time.
          5. Database Checkpoint — Used to automate back-end testing.
          6. Text Checkpoint — Checks that a section of text is found between two other
           sections of text.
          7. Text Area Checkpoint
          8. Page Checkpoint — Checks the properties of a web page.
          9. Accessibility Checkpoint — Checks the accessibility of an application.
          10. XML Checkpoint
          The VBScript Reporter.ReportEvent function also produces output very similar to
           that of a checkpoint, allowing the creation of custom checkpoints.




                                                                                         2
Prepare By Sandeep
Key Areas in QTP :

            About the script structure
            Action (Simple,Nested,Extenal,Re- useable)
            Parameterization (Different Types)
            Checkpoints (Programmatic methology)
            Adv.Synchronization points
            Exception Handling

      Types of Test tool :

      Business:

        a) Vendor tools
        b)
        Ex: HP- WinRunner, LoadRunner, QTP, QC
           IBM-Rational Robot, ,RFT, RPT, QA Director
           Borland-SilkTest, Silk Performer etc.

        b) Open Source Tools:
           Ex: Selenium, Jmeter, QAWebLoad, Bugzilla etc...
        c) In-house tools:

        Technical :


          Functional & Regression Test Tools:


                                                              3
Prepare By Sandeep
a) Ex: WinRunner, QTP, Rational Robot, ,RFT, SilkTest,Selenium etc..
        b) Performence/load/stress test tools
           Ex: LoadRunner, RPT, Silk Performer,Jmeter, QAWebLoad etc...
        c) Test Management Tools:
          Ex: QC, QA Director Etc...
        d) Defect Management tools
        e) Unit Test tools (Ex: JUnit).




      QTP has two modes in which it is possible to view and edit a test script:

         € KeywordView

         € ExpertView

      Contents:

         o   Testing Process
         o   Test Object Model
         o   Object Repositories
         o   Checkpoints
         o   QTP Recording


                                                                                  4
Prepare By Sandeep
o   Parameterzing Tests
         o   Keyword View
         o   Actions in QTP
         o   VBScript in QTP

      File extension of file in QTP?

          Per test object rep: filename.mtr
          Shared Object rep: filename.tsr
          Code file extension id: script.mts



      How many types object repository in QTP?

          Local Repository(.tsr[test shared repository])
          Shared Repository(.mtr(modular test repository))

    Testing Process with QTP :




    Main Phase of QTP testing Process:




                                                              5
Prepare By Sandeep
Window test:




                     6
Prepare By Sandeep
Record and Run Models:

Record mode:

    Normal
    Analog
    Low Level

Run models:

    Normal
    Fast
    Update

       Required Steps/Processes in QTP Automation :

Before starting actual automation task, we should do tool evaluation and feasibility study to
make sure QTP is the appropriate tool for automating test cases of our application. It can be
done by selecting few sample modules/screens/flow from the application/test cases
and create simple QTP scripts to make sure QTP will recognize the objects in our application
As part of Test driven development, we can ask the application development team to give
proper name or any other identification properties for the objects, if our feasibility study
reveals some difficulty for QTP to recognize the objects.



                                                                                            7
Prepare By Sandeep
• As I mentioned earlier, we should start our actual automation work only after completing
some basic manual testing to make sure the application is stable and in working
condition.

• QTP developers should review the Test cases and update it to specify what are the test
cases that can be automated. Because ideally it is not possible to automate all the test
cases. The reason may be, difficulty in navigation or object identification issue or difficulty in
verifying the result. If possible, the manual test cases can be rearranged to have separate
automation test cases.

• Once after reviewing all the test cases and after getting familiar with the application we
can design the automation frame work for our need Keep separate instance of application
specifically for the purpose of developing automation scripts. It will avoid any unnecessary
mess up with manual testing processes.

• Set up proper QTP development environment with required Add-in and with any add-in
extensibility. If many people are going to involve in the development activities then we
need to clearly document the responsibility of each person and the approach for sharing the
scripts. If application is installed in remote machine then QTP also should be installed in
remote machine. Because QTP will not recongnize the objects of application in
remote session.

• Set up proper object identification properties in QTP IDE.

• Once after completing all the above basic steps, the first development task should be
adding all the required Test Objects/properties to the Object repository It can be done
by recording or by manually adding the objects to Object repository. If you specify any
object using DP (Descriptive Programming) remember to document it.

• Once after adding all the objects, rename them to have a unambiguous/meaningful
name.Based on your design of automation framework, create reusable actions and vbscript
functions using step generator or keyword view or expert view or using Active screen.

• Using these reusable actions prepare a sample/base script for executing few test cases.
And then test it to make it error free.

Once after completing the above mentioned sample script, do parametrization (data
driven testing) for executing multiple iterations. Add checkpoints to verify the expected
results Use appropriate Regular expression to make sure the script runs in all scenarios
even when some properties are getting changed dynamically in particular pattern Add the
Recovery scenarios to handle any unexpected behavior of the application.

• Use Environment variables to avoid any hard coded values in the script.

• Do dry run for this sample script and debug the issues in the automation script and fix
them Do the above steps for all the test cases Create a Driver script which will call all the
test scripts. Complete dry run for the Driver script.




                                                                                                8
Prepare By Sandeep
Understanding Object Repository :

    OR is a place where QTP stores learned objects.
    QTP uses default Object identification properties

Object Repository is a centralized place for storing Properties of objects available in
AUT (Application Under Test). Why Centralized place? And, Why we should store the
properties of objects available in AUT? First, I will explain below things which will be helpful
for understanding answers of above questions.

- All software applications and websites are getting developed using many different
components or small units (e.g textbox control in vb, input tag in HTML, webbrowser
contorl in .net ) which can be called as Objects.

- Each object will be identified based on the object type. And also, each object will have its
own properties e.g name,title,caption,color,size for helping to identify by each of them And
also, each object is having specified set of methods.

- Some of the properties can be changed during run-time. These are known as RO (Runtime
object) properties. And some of them can not be changed. They are known as TO (Test
Object) properties.

- You can use ObjectSpy available in QTP IDE to see the TO properties methods and RO
properties & methods of any object available in your application. (Make sure that required
add-ins are available .If you see TO and RO properties of many objects in different
applications using ObjectSpy, you will be in a position to distinguish between TO and RO
properties.

- Since TO properties are used for uniquely identifying any object, QTP will store only the TO
properties of any object in the Object Repository.

- QTP will store TO properties of any object of AUT in Object repository as Name & Value
pair.

The Objects stored in the Object repository(OR) are called as Test Objects. Actually it is
just equivalent to the corresponding actual object in AUT.

- All the Test Objects that are stored in Object repository(OR) are arranged in a
hierarchical structure.(e.g Browser->Page->webelement). QTP will store the TO properties
of the Objects in many different waysOne simple way is, while doing Recording the TO
properties will be stored to the OR Second way is, TO properties can be stored by pointing
the mouse cursor to required object in the AUT.Another way is manually adding the TO
properties of the objects to the OR.

- Note that QTP won't store all the TO properties of the objects to the Object Repository.
Only few properties will be stored to the OR, based on the setting done in Object
Identification window. Refer the belo-Sometimes, QTP will store some additional properties
such as index, location which are known as ordinal identifiers. Actually these properties
won't be available in the object of AUT.

                                                                                                   9
Prepare By Sandeep
It will be created by QTP automatically to distinguish two objects which are having exactly
same TO properties. (e.g Some forms in the web pages will be have two submit buttons,
one at top and another at bottom. QTP can identify them only based on location or index).

-Note that even QTP is storing TO properties based on properties of object of AUT (i-e real
object), there is no need for all the TO properties to be available in RO properties collection
also. (ie) QTP can derive (i-e do some manipulation) to get some new TO properties from
one or many RO properties.

-Script can get TO properties of Test Objects using methods such as getTOproperty and
getTOproperties. Even, TO property of TestObject can be changed using setTOproperty. But
anyway, it will be valid only till exiting the execution. After completing the execution it will
resume the actual TO property stored in the OR.During run-time we can get the property of
the runtime object using getROproperty.

-Till this point we have seen about storing the Test Objects in Object Repository.During Run
mode, QTP will use these stored properties for comparing them with properties of actual
objects of AUT to identify them.

- These Test objects can be represented in the script as ObjectType and Object name. (e.g
Window("Mozilla Firefox").Activate.- The object repository will support editing of properties
of Test Object and new properties can also be added to them.

- The value for the properties of the Test Objects in OR need not be a constant. We can
parametrize the values so that the TO property can be dynamically changed for each
iteration of execution.Now we can come to our Initial question. By storing properties in the
centralized place, maintenance and updation of Test scripts can be easily done whenever
there is a change in UI (User Interface) of the AUT.

Assume that Login screen is used in around 20 Test scripts. If the Page name of login
screen in changed, we need not make any change in all these 20 Test scripts. Just changing
the property of Test Object in OR is enough.Clear understanding of Object Repository is
essential if you are willing to use QTP extensively. Because we may face lot of
difficulties/challenges while working with QTP. We should have clear knowledge in OR to
face/solve them.

Just Recording and Playback won't help much. And also, Test Automation framework can be
done very effectively only when you are familiar with understanding/handling of Object
Repositor.



       Understanding Action Iteration and Test Iteratiom:

For beginners of QTP, it is very important to understand the difference between

Action and the Test.A QTP Test can have multiple Actions. The Actions can be arranged in

nested manner (parent action-child action)also within the Test. Each Test will be stored as


                                                                                              10
Prepare By Sandeep
QuickTest Test. Actually it will be shown as Folder in windows explorer. Each Folder will
have So it is clear that Actions are part of Test.DataTables in QTP are used to enhance the
script by doing Datadriven testing easi The Datatable is having One Global Sheet and
several local sheets based on number of Actions used in the Test.The Global sheet is used
for storing the data used for Test Iteration, and the local sheets are used for storing the
data related to corresponding Action iteration.



The Test Iteration can be specified from Run tab of Test Settings (File->Settings).The Action
Iteration can be specified from "Action Call properties" window which can be opened from
Right click menu (context menu) of the particular Action.Now the next step is when we
should use both Test iteration and Action Iterations.Assume that you are testing flight
booking application which comes along with QTP installation.You need to test different test
cases of booking tickets 5 times.So, we can easily do it by entering the ticket details in 5
rows of Action sheets and setting "Run on All Row" in "Action Call properties".We know that
we need to login into the application before booking Tickets.So now the tickets will be
booked 5 times with single user login.Assume that we need to test this with 4 different
users.So, we need to book the tickets 20 (5x4) times.It can be handled by using both Test
Iterations and Action Iterations.The user login details can be kept in the Global Sheet and
the "Run on All Row" should be set in the Test settings.So now script will execute 20 times
to make 5 bookings with 4 user logins.




2)




                                                                                              11
Prepare By Sandeep
12
Prepare By Sandeep
There are 2 kinds of actions:

      1. Regulare( Non- Resuable).

      2. Resuable.

      Tests that contain reusable actions can be use:

          Locally
          Externally



          TEST PANE :
           Keyword View : - Icon based Tree.
           Expert View : - Display Source Code (VB script)

          Create Case Test :

             Create basic


                                                             13
Prepare By Sandeep
Using Parameterized Data:

                  Test data can be passes from one test to another test using the value of
                   an input parameter.
                  This creates a data flow between business Processes.
                  The value passed from one business process to another will come from
                   the Data Table.
                  Be aware of any data dependencies that occur within the business
                   process.

      Interact with test objects not stored in the Object Repository.

      VB Script basic- Variables & Constants :

         Declaring Variable
         Naming Restrictions
         Scope & Liftime
         Assigning Values to Variables
         Scalar Variables & Array Variable
         Creating Constants


      Basics of vbscript :
          VBscript is the scripting language used in QTP. It is developed by Microsoft.
          VBscript is subset of VB (Visual Basic) and VBA(Visual Basic of
         Applications).VBscript is used by other technologies also. For example, it is used in
         ASP (Active Server Page) for web site development. So we will be getting more
         ready-made functions/code written in vbscript from the Internet. It will save QTP
         script development time.VBscript will access the host/system thro' Microsoft's
         Windows Script Host (WSH). We can use WSH scripts also in QTP. It can be
         effectively used to automate the Test scenarios such as rebooting the system
         automatically after doing some steps and locking the system automatically.
         QTP recording feature will automatically generate VBscript code while recording the
         steps.And, QTP IDE is having 'Function Generator" for creating the vbscript
         functions.VBScript Variables In VBScript, all variables are of type variant, that can
         store different types of data.Rules for VBScript variable names:
         •Must begin with a letter Cannot contain a period (.)
         •Cannot exceed 255 characters dim will be used for declaring the variable as below
         .Dim TestCaseIDThe value for this variable can be assigned as below
         TestCaseID="TC1"Remember to use option explicit at top of your script. Otherwise
         a new variable will be created automatically if you misspell the variable name when
         assigning value for it.We need ot understand scope/lifetime of variable clearly. A
         variable declared within a function will exist only within that function. That means the

                                                                                               14
Prepare By Sandeep
variable will be destroyed when exiting the function, and more than one function can
         have variable with same name. So it is called as Local variable
         .So, it is very important to have clear understanding about the scope/lifetime of
         varibale declared/used in Test/Action/function library/datatable/environment.Array
         variable can be declared as below
          Dim ArrIDs(10)The above declaration will create single-dimension array containing
         11 elements. i-e the array in vbscript is 0 based.
         Operators
         Arithmetic
         DescriptionSymbol
         Exponentiation^Unary negation-Multiplication*Division/Integer divisionModulus
         arithmeticModAddition+Subtraction-String concatenation&
         Comparison

         DescriptionSymbol
         Equality=Inequality<>Less than<Greater than>Less than or equal to<=Greater than
         or equal to>=Object equivalenceIs
         Logical

         DescriptionSymbol
         Logical negationNotLogical conjunctionAndLogical disjunctionOrLogical
         exclusionXorLogical equivalenceEqvLogical implicationImp

         VBScript Procedures In VBScript, there are two types of procedures:
         •Sub procedure
         •Function procedure
         A Sub procedure is a series of statements, enclosed by the Sub and End Sub
         statements does not return a value can take arguments without arguments, it must
         include an empty set of parentheses ()eg.Sub displayName() msgbox("QualityPoint
         Technologies")End SuborSub addvalues(value1,value2) gbox(value1+value2)End
         SubWhen calling a Sub procedure you can use the Call statement, like this:
         Call MyProc(argument) Or, you can omit the Call statement, like this MyProc
         argumentA Function procedur is a series of statements, enclosed by the
         Function and End Function statements can return a value can take arguments
         Function addvalues(value1,value2) addvalues=value1+value2End FunctionThe
         above function will take take two arguments and will add those two values and then it
         will return the sum value. Note here the sum value is retured by assigning it to the
         function name.The above function can be called as below.msgbox "Sum value is " &
         addvalues(1,2) Conditional Statements In VBScript we have four conditional
         statements:
         if statement
          - executes a set of code when a condition is true
          (e.g) if i=10 then msgbox "I am 10"
          End if

                                                                                           15
Prepare By Sandeep
if...then...else statement
          - select one of two sets of lines to execute
          (e.g) if i=10 then msgbox "I am 10" else msgbox "other than 10"
          end if ?
         if...then...elseif statement
          - select one of many sets of lines to execute ?
            (e.g) if i=10 then msgbox "I am 10"     elseif i=11 then msgbox "I am 11"  else
         msgbox "unknown"          end if ?
         select case statement
          - select one of many sets of lines to execute select case value ?
           case 1 msgbox "1" case 2 msgbox "2" case 3 msgbox "3" case else
         msgbox "other than 1,2 and 3"end select without arguments, must include an empty
         set of parentheses ()returns a value by assigning a value to its nameFind below a
         Sample function.




                                                                                          16
Prepare By Sandeep

More Related Content

What's hot

First QTP Tutorial
First QTP TutorialFirst QTP Tutorial
First QTP Tutorialtjdhans
 
Hp Quick Test Professional
Hp Quick Test ProfessionalHp Quick Test Professional
Hp Quick Test Professionalsunny.deb
 
UFT- New features and comparison with QTP
UFT- New features and comparison with QTPUFT- New features and comparison with QTP
UFT- New features and comparison with QTPRita Singh
 
Data Base Testing Interview Questions
Data Base Testing Interview QuestionsData Base Testing Interview Questions
Data Base Testing Interview QuestionsRita Singh
 
UFT An advance version of QTP
UFT  An advance version of QTPUFT  An advance version of QTP
UFT An advance version of QTPRita Singh
 
QTP 10 00 Guide
QTP 10 00 GuideQTP 10 00 Guide
QTP 10 00 GuideG.C Reddy
 
Basics of QTP Framework
Basics of QTP FrameworkBasics of QTP Framework
Basics of QTP FrameworkAnish10110
 
Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Lars Thorup
 
QTP Power Point Presentation
QTP Power Point PresentationQTP Power Point Presentation
QTP Power Point PresentationSVRTechnologies
 
Testing tools concepts
Testing tools conceptsTesting tools concepts
Testing tools conceptsKrishna Gurjar
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3Ramu Palanki
 

What's hot (16)

First QTP Tutorial
First QTP TutorialFirst QTP Tutorial
First QTP Tutorial
 
Qtp faqs
Qtp faqsQtp faqs
Qtp faqs
 
Hp Quick Test Professional
Hp Quick Test ProfessionalHp Quick Test Professional
Hp Quick Test Professional
 
UFT- New features and comparison with QTP
UFT- New features and comparison with QTPUFT- New features and comparison with QTP
UFT- New features and comparison with QTP
 
Data Base Testing Interview Questions
Data Base Testing Interview QuestionsData Base Testing Interview Questions
Data Base Testing Interview Questions
 
Qtp day 1
Qtp day 1Qtp day 1
Qtp day 1
 
UFT An advance version of QTP
UFT  An advance version of QTPUFT  An advance version of QTP
UFT An advance version of QTP
 
QTP 10 00 Guide
QTP 10 00 GuideQTP 10 00 Guide
QTP 10 00 Guide
 
Basics of QTP Framework
Basics of QTP FrameworkBasics of QTP Framework
Basics of QTP Framework
 
Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++Automated Testing for Embedded Software in C or C++
Automated Testing for Embedded Software in C or C++
 
Qtp basics
Qtp basicsQtp basics
Qtp basics
 
QTP Power Point Presentation
QTP Power Point PresentationQTP Power Point Presentation
QTP Power Point Presentation
 
Testing tools concepts
Testing tools conceptsTesting tools concepts
Testing tools concepts
 
About QTP 9.2
About QTP 9.2About QTP 9.2
About QTP 9.2
 
1.qtp basics
1.qtp basics1.qtp basics
1.qtp basics
 
Qtp interview questions3
Qtp interview questions3Qtp interview questions3
Qtp interview questions3
 

Viewers also liked

Qtp Basics
Qtp BasicsQtp Basics
Qtp Basicsmehramit
 
UFT Automation Framework Introduction
UFT Automation Framework IntroductionUFT Automation Framework Introduction
UFT Automation Framework IntroductionHimal Bandara
 
QTP Slides Presentation.
QTP Slides Presentation.QTP Slides Presentation.
QTP Slides Presentation.tjdhans
 
Introduction to Unified Functional Testing 12 (UFT)
Introduction to Unified Functional Testing 12 (UFT)Introduction to Unified Functional Testing 12 (UFT)
Introduction to Unified Functional Testing 12 (UFT)Archana Krushnan
 
What is UFT? HP's unified functional testing.
What is UFT? HP's unified functional testing.What is UFT? HP's unified functional testing.
What is UFT? HP's unified functional testing.Confiz
 
QTP Descriptive Programming
QTP Descriptive ProgrammingQTP Descriptive Programming
QTP Descriptive ProgrammingYaron Assa
 
Tο ροδίνι. Περιβαλλοντική ομάδα 7ου Γυμνασίου Ρόδου
Tο ροδίνι. Περιβαλλοντική ομάδα 7ου Γυμνασίου ΡόδουTο ροδίνι. Περιβαλλοντική ομάδα 7ου Γυμνασίου Ρόδου
Tο ροδίνι. Περιβαλλοντική ομάδα 7ου Γυμνασίου ΡόδουLoukia Orfanou
 
Resoluciòn de una EDO en MATHLAB
Resoluciòn de una EDO en MATHLABResoluciòn de una EDO en MATHLAB
Resoluciòn de una EDO en MATHLABIrag1989
 
Virtual_Herbaria_TDWG_20111018_hrainer
Virtual_Herbaria_TDWG_20111018_hrainerVirtual_Herbaria_TDWG_20111018_hrainer
Virtual_Herbaria_TDWG_20111018_hrainerHeimo Rainer
 
Production report and pitch
Production report and pitchProduction report and pitch
Production report and pitchdarren93
 

Viewers also liked (20)

Ppt Qtp
Ppt QtpPpt Qtp
Ppt Qtp
 
Qtp Basics
Qtp BasicsQtp Basics
Qtp Basics
 
Uft ppt
Uft pptUft ppt
Uft ppt
 
Web service testing using QTP (UFT)
Web service testing using QTP (UFT)Web service testing using QTP (UFT)
Web service testing using QTP (UFT)
 
UFT Automation Framework Introduction
UFT Automation Framework IntroductionUFT Automation Framework Introduction
UFT Automation Framework Introduction
 
Uft Basics
Uft BasicsUft Basics
Uft Basics
 
Qtp
QtpQtp
Qtp
 
QTP Slides Presentation.
QTP Slides Presentation.QTP Slides Presentation.
QTP Slides Presentation.
 
Introduction to Unified Functional Testing 12 (UFT)
Introduction to Unified Functional Testing 12 (UFT)Introduction to Unified Functional Testing 12 (UFT)
Introduction to Unified Functional Testing 12 (UFT)
 
What is UFT? HP's unified functional testing.
What is UFT? HP's unified functional testing.What is UFT? HP's unified functional testing.
What is UFT? HP's unified functional testing.
 
QTP Descriptive Programming
QTP Descriptive ProgrammingQTP Descriptive Programming
QTP Descriptive Programming
 
Tο ροδίνι. Περιβαλλοντική ομάδα 7ου Γυμνασίου Ρόδου
Tο ροδίνι. Περιβαλλοντική ομάδα 7ου Γυμνασίου ΡόδουTο ροδίνι. Περιβαλλοντική ομάδα 7ου Γυμνασίου Ρόδου
Tο ροδίνι. Περιβαλλοντική ομάδα 7ου Γυμνασίου Ρόδου
 
Resoluciòn de una EDO en MATHLAB
Resoluciòn de una EDO en MATHLABResoluciòn de una EDO en MATHLAB
Resoluciòn de una EDO en MATHLAB
 
Computer assisted language learning(call)
Computer assisted language learning(call)Computer assisted language learning(call)
Computer assisted language learning(call)
 
Group discussion tha
Group discussion thaGroup discussion tha
Group discussion tha
 
15 wk syllabi
15 wk syllabi15 wk syllabi
15 wk syllabi
 
Rr100 b
Rr100 bRr100 b
Rr100 b
 
Virtual_Herbaria_TDWG_20111018_hrainer
Virtual_Herbaria_TDWG_20111018_hrainerVirtual_Herbaria_TDWG_20111018_hrainer
Virtual_Herbaria_TDWG_20111018_hrainer
 
Production report and pitch
Production report and pitchProduction report and pitch
Production report and pitch
 
삼성그룹
삼성그룹삼성그룹
삼성그룹
 

Similar to Qtp basic

Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questionsRamu Palanki
 
Qtp material for beginners
Qtp material for beginnersQtp material for beginners
Qtp material for beginnersRamu Palanki
 
What are the features in qtp
What are the features in qtpWhat are the features in qtp
What are the features in qtpRamu Palanki
 
HP Quick Test Professional
HP Quick Test ProfessionalHP Quick Test Professional
HP Quick Test ProfessionalVitaliy Ganzha
 
Qtp92 Presentation
Qtp92 PresentationQtp92 Presentation
Qtp92 Presentationa34sharm
 
Dhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro PresentationDhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro PresentationDhanasekaran Nagarajan
 
QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.Jaya Priya
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answersRamu Palanki
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answersRamu Palanki
 
QTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.pptQTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.pptKalyan Chakravarthy
 
QTP Training by INFOTECH
QTP Training by INFOTECHQTP Training by INFOTECH
QTP Training by INFOTECHPravinsinh
 
QTP Tutorial
QTP TutorialQTP Tutorial
QTP Tutorialpingkapil
 
Qtp training session I
Qtp training session IQtp training session I
Qtp training session IAisha Mazhar
 

Similar to Qtp basic (20)

Qtp interview questions
Qtp interview questionsQtp interview questions
Qtp interview questions
 
Qtp material for beginners
Qtp material for beginnersQtp material for beginners
Qtp material for beginners
 
Qtp stuff
Qtp stuffQtp stuff
Qtp stuff
 
Qtp basic stuff
Qtp basic stuffQtp basic stuff
Qtp basic stuff
 
What are the features in qtp
What are the features in qtpWhat are the features in qtp
What are the features in qtp
 
HP Quick Test Professional
HP Quick Test ProfessionalHP Quick Test Professional
HP Quick Test Professional
 
About Qtp_1 92
About Qtp_1 92About Qtp_1 92
About Qtp_1 92
 
About Qtp 92
About Qtp 92About Qtp 92
About Qtp 92
 
Qtp92 Presentation
Qtp92 PresentationQtp92 Presentation
Qtp92 Presentation
 
Dhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro PresentationDhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro Presentation
 
QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answers
 
Qtp interview questions and answers
Qtp interview questions and answersQtp interview questions and answers
Qtp interview questions and answers
 
QTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.pptQTP 10.0_Kalyan Chakravarthy.ppt
QTP 10.0_Kalyan Chakravarthy.ppt
 
Why Automate
Why AutomateWhy Automate
Why Automate
 
QTP Training by INFOTECH
QTP Training by INFOTECHQTP Training by INFOTECH
QTP Training by INFOTECH
 
Faqs
FaqsFaqs
Faqs
 
QTP Online Training
QTP Online TrainingQTP Online Training
QTP Online Training
 
QTP Tutorial
QTP TutorialQTP Tutorial
QTP Tutorial
 
Qtp training session I
Qtp training session IQtp training session I
Qtp training session I
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
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
 
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
 
[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
 
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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
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
 
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
 
[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
 
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...
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Qtp basic

  • 1. QTP (Quick Test Professional) Introduction to QTP: QTP is a functional & regression testing of an application. Since QTP supports external add-ins,it can be used for automating testing of many different software applications and websites.Some add-ins (e.g ActiveX,VisualBasic,Web) are built-in with QTP, and some other add-ins (e.g Java, .net, TE (termial emulator))are external add-ins. External add-in means we need to install them separately once after installing QTP.We have the option to load only the required add-ins when opening the QTP IDE. So, it will be helpful to improve the execution speed.QTP will support Keyword Driven and Data Driven testing.We can create our own test automation framework (Hybrid framework) also based on our own requirements for test automation. It is very important to understand how QTP works. Because it will help to learn any other features in QTP easily. And, it will help to design an effective automation framework. Having clear understanding of inner working of QTP will help to resolve any issue that may come across during automation script development and also during script execution. It can be explained as below We know that every test case should have Test Steps and Expected Results.As QTP is used for executing these test cases, QTP also should have a way for handling both Test Steps and Expected Results.Handling Test Steps means, QTP should be capable of navigating any path/page in any website or in any software application.For achieving this QTP should be able to recognize any control/object in any application/webpage which needs to be tested. For recognizing the object, it should know the properties of those objects beforehand. It is achieved by storing the properties of the objects in a centralized place known as Object Repository While running the test script, the objects in the application are identified/recognized by comparing the properties of the objects with the properties stored in the Object Repository. doing this recognization, execution of Test Steps becomes possible.QTP is having Data tables (similar to Excel sheet) for supporting execution for multiple iterations of same steps with different data. For example, assume that we need to execute two test cases, one for logging into a website using UPPER case username and another test case for logging into a website using lower case username. For executing these two test cases, the steps will be same. The only difference is in the test data. It can be easily done in QTP by putting these input usernames in Datatable and make the Script to execute it two times.Next, we need to think about handling Expected Results. The purpose of testing is comparing the Actual result with the predefined Expected Results. It is achieved by using Checkpoints. 1 Prepare By Sandeep
  • 2. There are many checkpoints available in QTP. They are, Standard Checkpoint,Text Checkpoint, Bitmap Checkpoint, Database Checkpoint, accessibility Checkpoint and XML Checkpoint. Checkpoints:  Standard Checkpoint — Checks the properties of an object.  2. Table Checkpoint — A Standard Checkpoint that checks the properties of a table.  3. Image Checkpoint — A Standard Checkpoint that checks the properties of an image.  4. Bitmap Checkpoint — Compares an area of the application under test pixel- for-pixel with the screen as seen at record-time.  5. Database Checkpoint — Used to automate back-end testing.  6. Text Checkpoint — Checks that a section of text is found between two other sections of text.  7. Text Area Checkpoint  8. Page Checkpoint — Checks the properties of a web page.  9. Accessibility Checkpoint — Checks the accessibility of an application.  10. XML Checkpoint  The VBScript Reporter.ReportEvent function also produces output very similar to that of a checkpoint, allowing the creation of custom checkpoints. 2 Prepare By Sandeep
  • 3. Key Areas in QTP :  About the script structure  Action (Simple,Nested,Extenal,Re- useable)  Parameterization (Different Types)  Checkpoints (Programmatic methology)  Adv.Synchronization points  Exception Handling Types of Test tool : Business: a) Vendor tools b) Ex: HP- WinRunner, LoadRunner, QTP, QC IBM-Rational Robot, ,RFT, RPT, QA Director Borland-SilkTest, Silk Performer etc. b) Open Source Tools: Ex: Selenium, Jmeter, QAWebLoad, Bugzilla etc... c) In-house tools: Technical : Functional & Regression Test Tools: 3 Prepare By Sandeep
  • 4. a) Ex: WinRunner, QTP, Rational Robot, ,RFT, SilkTest,Selenium etc.. b) Performence/load/stress test tools Ex: LoadRunner, RPT, Silk Performer,Jmeter, QAWebLoad etc... c) Test Management Tools: Ex: QC, QA Director Etc... d) Defect Management tools e) Unit Test tools (Ex: JUnit). QTP has two modes in which it is possible to view and edit a test script: € KeywordView € ExpertView Contents: o Testing Process o Test Object Model o Object Repositories o Checkpoints o QTP Recording 4 Prepare By Sandeep
  • 5. o Parameterzing Tests o Keyword View o Actions in QTP o VBScript in QTP File extension of file in QTP?  Per test object rep: filename.mtr  Shared Object rep: filename.tsr  Code file extension id: script.mts How many types object repository in QTP?  Local Repository(.tsr[test shared repository])  Shared Repository(.mtr(modular test repository))  Testing Process with QTP :  Main Phase of QTP testing Process: 5 Prepare By Sandeep
  • 6. Window test: 6 Prepare By Sandeep
  • 7. Record and Run Models: Record mode:  Normal  Analog  Low Level Run models:  Normal  Fast  Update Required Steps/Processes in QTP Automation : Before starting actual automation task, we should do tool evaluation and feasibility study to make sure QTP is the appropriate tool for automating test cases of our application. It can be done by selecting few sample modules/screens/flow from the application/test cases and create simple QTP scripts to make sure QTP will recognize the objects in our application As part of Test driven development, we can ask the application development team to give proper name or any other identification properties for the objects, if our feasibility study reveals some difficulty for QTP to recognize the objects. 7 Prepare By Sandeep
  • 8. • As I mentioned earlier, we should start our actual automation work only after completing some basic manual testing to make sure the application is stable and in working condition. • QTP developers should review the Test cases and update it to specify what are the test cases that can be automated. Because ideally it is not possible to automate all the test cases. The reason may be, difficulty in navigation or object identification issue or difficulty in verifying the result. If possible, the manual test cases can be rearranged to have separate automation test cases. • Once after reviewing all the test cases and after getting familiar with the application we can design the automation frame work for our need Keep separate instance of application specifically for the purpose of developing automation scripts. It will avoid any unnecessary mess up with manual testing processes. • Set up proper QTP development environment with required Add-in and with any add-in extensibility. If many people are going to involve in the development activities then we need to clearly document the responsibility of each person and the approach for sharing the scripts. If application is installed in remote machine then QTP also should be installed in remote machine. Because QTP will not recongnize the objects of application in remote session. • Set up proper object identification properties in QTP IDE. • Once after completing all the above basic steps, the first development task should be adding all the required Test Objects/properties to the Object repository It can be done by recording or by manually adding the objects to Object repository. If you specify any object using DP (Descriptive Programming) remember to document it. • Once after adding all the objects, rename them to have a unambiguous/meaningful name.Based on your design of automation framework, create reusable actions and vbscript functions using step generator or keyword view or expert view or using Active screen. • Using these reusable actions prepare a sample/base script for executing few test cases. And then test it to make it error free. Once after completing the above mentioned sample script, do parametrization (data driven testing) for executing multiple iterations. Add checkpoints to verify the expected results Use appropriate Regular expression to make sure the script runs in all scenarios even when some properties are getting changed dynamically in particular pattern Add the Recovery scenarios to handle any unexpected behavior of the application. • Use Environment variables to avoid any hard coded values in the script. • Do dry run for this sample script and debug the issues in the automation script and fix them Do the above steps for all the test cases Create a Driver script which will call all the test scripts. Complete dry run for the Driver script. 8 Prepare By Sandeep
  • 9. Understanding Object Repository :  OR is a place where QTP stores learned objects.  QTP uses default Object identification properties Object Repository is a centralized place for storing Properties of objects available in AUT (Application Under Test). Why Centralized place? And, Why we should store the properties of objects available in AUT? First, I will explain below things which will be helpful for understanding answers of above questions. - All software applications and websites are getting developed using many different components or small units (e.g textbox control in vb, input tag in HTML, webbrowser contorl in .net ) which can be called as Objects. - Each object will be identified based on the object type. And also, each object will have its own properties e.g name,title,caption,color,size for helping to identify by each of them And also, each object is having specified set of methods. - Some of the properties can be changed during run-time. These are known as RO (Runtime object) properties. And some of them can not be changed. They are known as TO (Test Object) properties. - You can use ObjectSpy available in QTP IDE to see the TO properties methods and RO properties & methods of any object available in your application. (Make sure that required add-ins are available .If you see TO and RO properties of many objects in different applications using ObjectSpy, you will be in a position to distinguish between TO and RO properties. - Since TO properties are used for uniquely identifying any object, QTP will store only the TO properties of any object in the Object Repository. - QTP will store TO properties of any object of AUT in Object repository as Name & Value pair. The Objects stored in the Object repository(OR) are called as Test Objects. Actually it is just equivalent to the corresponding actual object in AUT. - All the Test Objects that are stored in Object repository(OR) are arranged in a hierarchical structure.(e.g Browser->Page->webelement). QTP will store the TO properties of the Objects in many different waysOne simple way is, while doing Recording the TO properties will be stored to the OR Second way is, TO properties can be stored by pointing the mouse cursor to required object in the AUT.Another way is manually adding the TO properties of the objects to the OR. - Note that QTP won't store all the TO properties of the objects to the Object Repository. Only few properties will be stored to the OR, based on the setting done in Object Identification window. Refer the belo-Sometimes, QTP will store some additional properties such as index, location which are known as ordinal identifiers. Actually these properties won't be available in the object of AUT. 9 Prepare By Sandeep
  • 10. It will be created by QTP automatically to distinguish two objects which are having exactly same TO properties. (e.g Some forms in the web pages will be have two submit buttons, one at top and another at bottom. QTP can identify them only based on location or index). -Note that even QTP is storing TO properties based on properties of object of AUT (i-e real object), there is no need for all the TO properties to be available in RO properties collection also. (ie) QTP can derive (i-e do some manipulation) to get some new TO properties from one or many RO properties. -Script can get TO properties of Test Objects using methods such as getTOproperty and getTOproperties. Even, TO property of TestObject can be changed using setTOproperty. But anyway, it will be valid only till exiting the execution. After completing the execution it will resume the actual TO property stored in the OR.During run-time we can get the property of the runtime object using getROproperty. -Till this point we have seen about storing the Test Objects in Object Repository.During Run mode, QTP will use these stored properties for comparing them with properties of actual objects of AUT to identify them. - These Test objects can be represented in the script as ObjectType and Object name. (e.g Window("Mozilla Firefox").Activate.- The object repository will support editing of properties of Test Object and new properties can also be added to them. - The value for the properties of the Test Objects in OR need not be a constant. We can parametrize the values so that the TO property can be dynamically changed for each iteration of execution.Now we can come to our Initial question. By storing properties in the centralized place, maintenance and updation of Test scripts can be easily done whenever there is a change in UI (User Interface) of the AUT. Assume that Login screen is used in around 20 Test scripts. If the Page name of login screen in changed, we need not make any change in all these 20 Test scripts. Just changing the property of Test Object in OR is enough.Clear understanding of Object Repository is essential if you are willing to use QTP extensively. Because we may face lot of difficulties/challenges while working with QTP. We should have clear knowledge in OR to face/solve them. Just Recording and Playback won't help much. And also, Test Automation framework can be done very effectively only when you are familiar with understanding/handling of Object Repositor. Understanding Action Iteration and Test Iteratiom: For beginners of QTP, it is very important to understand the difference between Action and the Test.A QTP Test can have multiple Actions. The Actions can be arranged in nested manner (parent action-child action)also within the Test. Each Test will be stored as 10 Prepare By Sandeep
  • 11. QuickTest Test. Actually it will be shown as Folder in windows explorer. Each Folder will have So it is clear that Actions are part of Test.DataTables in QTP are used to enhance the script by doing Datadriven testing easi The Datatable is having One Global Sheet and several local sheets based on number of Actions used in the Test.The Global sheet is used for storing the data used for Test Iteration, and the local sheets are used for storing the data related to corresponding Action iteration. The Test Iteration can be specified from Run tab of Test Settings (File->Settings).The Action Iteration can be specified from "Action Call properties" window which can be opened from Right click menu (context menu) of the particular Action.Now the next step is when we should use both Test iteration and Action Iterations.Assume that you are testing flight booking application which comes along with QTP installation.You need to test different test cases of booking tickets 5 times.So, we can easily do it by entering the ticket details in 5 rows of Action sheets and setting "Run on All Row" in "Action Call properties".We know that we need to login into the application before booking Tickets.So now the tickets will be booked 5 times with single user login.Assume that we need to test this with 4 different users.So, we need to book the tickets 20 (5x4) times.It can be handled by using both Test Iterations and Action Iterations.The user login details can be kept in the Global Sheet and the "Run on All Row" should be set in the Test settings.So now script will execute 20 times to make 5 bookings with 4 user logins. 2) 11 Prepare By Sandeep
  • 13. There are 2 kinds of actions: 1. Regulare( Non- Resuable). 2. Resuable. Tests that contain reusable actions can be use:  Locally  Externally  TEST PANE : Keyword View : - Icon based Tree. Expert View : - Display Source Code (VB script)  Create Case Test : Create basic 13 Prepare By Sandeep
  • 14. Using Parameterized Data:  Test data can be passes from one test to another test using the value of an input parameter.  This creates a data flow between business Processes.  The value passed from one business process to another will come from the Data Table.  Be aware of any data dependencies that occur within the business process. Interact with test objects not stored in the Object Repository. VB Script basic- Variables & Constants :  Declaring Variable  Naming Restrictions  Scope & Liftime  Assigning Values to Variables  Scalar Variables & Array Variable  Creating Constants Basics of vbscript : VBscript is the scripting language used in QTP. It is developed by Microsoft. VBscript is subset of VB (Visual Basic) and VBA(Visual Basic of Applications).VBscript is used by other technologies also. For example, it is used in ASP (Active Server Page) for web site development. So we will be getting more ready-made functions/code written in vbscript from the Internet. It will save QTP script development time.VBscript will access the host/system thro' Microsoft's Windows Script Host (WSH). We can use WSH scripts also in QTP. It can be effectively used to automate the Test scenarios such as rebooting the system automatically after doing some steps and locking the system automatically. QTP recording feature will automatically generate VBscript code while recording the steps.And, QTP IDE is having 'Function Generator" for creating the vbscript functions.VBScript Variables In VBScript, all variables are of type variant, that can store different types of data.Rules for VBScript variable names: •Must begin with a letter Cannot contain a period (.) •Cannot exceed 255 characters dim will be used for declaring the variable as below .Dim TestCaseIDThe value for this variable can be assigned as below TestCaseID="TC1"Remember to use option explicit at top of your script. Otherwise a new variable will be created automatically if you misspell the variable name when assigning value for it.We need ot understand scope/lifetime of variable clearly. A variable declared within a function will exist only within that function. That means the 14 Prepare By Sandeep
  • 15. variable will be destroyed when exiting the function, and more than one function can have variable with same name. So it is called as Local variable .So, it is very important to have clear understanding about the scope/lifetime of varibale declared/used in Test/Action/function library/datatable/environment.Array variable can be declared as below Dim ArrIDs(10)The above declaration will create single-dimension array containing 11 elements. i-e the array in vbscript is 0 based. Operators Arithmetic DescriptionSymbol Exponentiation^Unary negation-Multiplication*Division/Integer divisionModulus arithmeticModAddition+Subtraction-String concatenation& Comparison DescriptionSymbol Equality=Inequality<>Less than<Greater than>Less than or equal to<=Greater than or equal to>=Object equivalenceIs Logical DescriptionSymbol Logical negationNotLogical conjunctionAndLogical disjunctionOrLogical exclusionXorLogical equivalenceEqvLogical implicationImp VBScript Procedures In VBScript, there are two types of procedures: •Sub procedure •Function procedure A Sub procedure is a series of statements, enclosed by the Sub and End Sub statements does not return a value can take arguments without arguments, it must include an empty set of parentheses ()eg.Sub displayName() msgbox("QualityPoint Technologies")End SuborSub addvalues(value1,value2) gbox(value1+value2)End SubWhen calling a Sub procedure you can use the Call statement, like this: Call MyProc(argument) Or, you can omit the Call statement, like this MyProc argumentA Function procedur is a series of statements, enclosed by the Function and End Function statements can return a value can take arguments Function addvalues(value1,value2) addvalues=value1+value2End FunctionThe above function will take take two arguments and will add those two values and then it will return the sum value. Note here the sum value is retured by assigning it to the function name.The above function can be called as below.msgbox "Sum value is " & addvalues(1,2) Conditional Statements In VBScript we have four conditional statements: if statement - executes a set of code when a condition is true (e.g) if i=10 then msgbox "I am 10" End if 15 Prepare By Sandeep
  • 16. if...then...else statement - select one of two sets of lines to execute (e.g) if i=10 then msgbox "I am 10" else msgbox "other than 10" end if ? if...then...elseif statement - select one of many sets of lines to execute ? (e.g) if i=10 then msgbox "I am 10" elseif i=11 then msgbox "I am 11" else msgbox "unknown" end if ? select case statement - select one of many sets of lines to execute select case value ? case 1 msgbox "1" case 2 msgbox "2" case 3 msgbox "3" case else msgbox "other than 1,2 and 3"end select without arguments, must include an empty set of parentheses ()returns a value by assigning a value to its nameFind below a Sample function. 16 Prepare By Sandeep