Recent Post

QTP Learning – Part1




QTP Learning – Part1


Let’s get started

You would be able to learn the following, at the end of this chapter

o   What is QTP?
o   What is Automation?
o   Why do we need QTP?
o   What are the advantages of Automation?
o   How do we record and playback test scripts in QTP
o   What is Object
o   Explain about Object Repository
o   Explain about Object Properties
o   Explain about Object Methods
o   What are the deferent QTP - Script Generation Methods
o   What are the QTP - Script Recording Modes
o   Explain about Analog - Screen based and Window based recording mode with examples
o   How do we code Test Scripts in QTP
o   What are needed for scripting/coding test scripts in QTP
o   What are the object types in automation
o   Explain in detail about Test Object and Run-Time Object
o   What are the Advantages of QTP
o   What is low-level recording mode and why it is used for?



Introduction to QTP

o     Was  a Mercury Interactive Test tool
o     Now, HP -  Automation Test Tool
o     The Latest version of QTP is called as UFT – Unified Functional Testing.
o     Functional test tool
o     Regression test tool
o     Supports Stand alone, Web based and Client Server Apps
o     Supports One tier / Two tier / Three tier  / N-tier Apps
o     Designed to provide a robust  application verification
o     Simple and easy to use and implement
o     As simple as a Tape recorder
o     Best at even record and play back
o     Can be utilized at advanced level (coding, objects creation)
o     Supports COM /DCOM/DOM/AOM
o     Different Environments supported (Java, .NET, SAP…)
o     Add ins available for other environment supports

o   “Quick Test Professional” popularly called as QTP, originally from a company known as Mercury Interactive, which was acquired by Hewlett Packard (HP) in 2006 and is now HP’s QuickTest Professional
o   The Latest version of QTP is called as UFT – Unified Functional Testing.
o   QTP is primarily used for functional and regression automated testing.
o   QTP can automate user actions on a window; web or client based computer application and tests the same actions for different users, and different data sets on various windows operating systems and on different browsers.
o   It’s an easy tool to lean and implement automation testing.
o   Automation using QTP saves lot of time, efforts, resources, and budget.
o   It is as simple as a Tape recorder to record and playback test scripts
o   Quick Test Professional can be utilized at advance level coding and object creation and also support COM/DCOM/DOM/AOM.
o   QTP supports different environments like Java, .Net, SAP, Web, Windows and so on.
You can learn the following:


Let’s go on… 


What is Automation

o   Automation is the use of a software / tool to design, to control , to execute the manual tests.
o   In addition, automation helps in the comparison of actual results to expected (pre-defined) results.
o   Commonly, test automation involves automating a manual process already in place that uses a formalized testing process.
o   Automation is enhanced process of the manual tests that uses AUT identification, objects capturing mechanism, script generation , logical coding techniques, tests executions and user friendly report generations.



Why Automation is popular...: 

§  Manual Testing usually
§  Costly
§  Time Consuming
§  Resource oriented
§  Repeatedly conducted (Functional / Regression)
§  Big Challenge is improve productivity and reduce the cost of Testing
§  Changes in environment like new patches, service packs / fixes needs thorough testing
§  So…
§  To reduce testing cost
§  To avoid manual efforts
§  To increase productivity
§  To increase quality in product
§  To reduce time
§  To be repeatedly useful


o   Benefits of Automation.

o   Consistent and Accurate Testing
o   Cost Effective and Efficient Process
o   Reduces Overall Test Cycle Time
o   Mitigates Risks of Manual Testing
o   Increases Overall Product Quality
o   Early Time to Market
o   Repeatable
o   Process Oriented
o   Low Maintenance
o   High Productivity




What to Automate : 
o   Which & What Test Should be Automated First ?
o   Most important tests
o   A set of breadth tests
o   Test for the most important functions
o   Tests that are easy to automate
o   Tests that will give the quickest payback
o   Tests that are run more often
o   Alternatively, test candidates that are identified as part of risk-based testing strategy may as well be considered for test automation.





QTP - Automation Testing Process

The Automation in QTP contains the following phases.
o    Planning the Test
o   Designing the Scripts
o   Modify the Script
o   Execute or Run the Test
o   Report the Test Result (Test Status)
No screenshots were saved for this Information step.


What is an Object
o   What is an Object




o   Object??
o   What’s an object?

o   Object is the one…which exist.
o   Anything which exists is an object.

o   You are an object
o   I am an object
o   Laptop is an object
o   Pen / Pencil / TV / Bag / Mobile……
o   All these are objects…

o   How can we identify objects?
o   Let us talk about a MOBILE .
o   How can we identify / say a mobile as mobile..
o   Why don’t we say a mobile as pen or book??
o   We don’t say that…and we say that...a mobile is a mobile..

o   HOWWWWWWWWWWWWWWWW?? And WHYYYYYYYYYYYYYYYYYYY??
o   How means…

o   Mobile has few characteristics to itself (such as name, size, type, usage, purpose…)  and by means of them we would identify that and call it by name “MOBILE”
o   What are the characteristics then…
o   Characteristics are those which could be used to identify an object
o   Characteristics are those which explain the nature, functionality, type, behavior of an object
o   Sooooooooooo….
o   For any object > we learn about that object (by means of that object and it’s characteristics and we store them into our brain) and based on these we would identify object and call it by name and use it by functionality.

o   Similarly…. QTP has got a BRAIN to it
o   BRIAN = Object Repository
o   QTP identifies objects, learns about objects, captures objects (captures object and its properties) and stores this information into its brain ( Object Repository )
o   And based on the information on OR (Object Repository) , QTP identifies the objects on Application and thus it can work on them.
No screenshots were saved for this Information step.


What is Object Repository:

o   What is Object Repository




o   OR - Object Repository
o   Object Repository is the storage place where QTP captures  and stores the AUT - Objects in the form of objects logical names and physical descriptions.
o   Objects are identified and stored by QTP in OR with respect to their properties (like..name, class, type…)
o   QTP helps testers (users)  to make use of these objects / Test Object properties to identify objects on AUT during runtime  to identify and to work with them using METHODS (like..Activate, Click, Set, Type…)
o   Note: Object ? Object is the one exists

No screenshots were saved for this Information step.


QTP - Object Types 

QTP - Object Types



o   Test Objects
·           Test Objects are those, which are identified, captured, stored into QTP’s Object Repository (OR) by means of their logical names and physical descriptions (object properties)
·           Objects and their properties  identified by QTP during recording/coding

o   Run-Time Objects
·           Run-Time Objects are those which resemble the Test Objects, but then they may or may not change their properties at run-time.
·           Objects  and their properties during runtime of the application under test

o   Test Objects and Test Objects Properties…

·           Test Object Properties are captured by QTP at Recording time
·           QTP stores Object as Test Object, determining the class it fits.
·           For each test object class - learns  a list of mandatory properties.
o   ·       QTP checks if the description learnt is enough to uniquely    identify the object using mandatory properties.
·           If it is not able to indentify then QTP adds assistive properties , one by one, to the description until it has a unique description to identify objects during runtime.

·           Run-Time Objects and Run-Time Objects Properties…

·           Searches for a run-time object that exactly matches the description of the test object
·           It expects to find a perfect match for both the mandatory  and any assistive properties of test object
·           Uses Smart Identification mechanism to identify an object, even when the recorded description is no longer accurate.

No screenshots were saved for this Information step.


QTP – Script Generation Methods
QTP – Script Generation Methods


QTP – Script Generation Methods
o   Recording
o   From Keyword View
o   From Expert View  ( Coding)
o   Drag and Drop from OR
o   Drag and Drop from Tree Panel
o   Using Descriptive Programming
o   Script Generator Tool
o   Excel / Keyword Driven
  
No screenshots were saved for this Information step.


QTP - Recording Modes

·            Normal Recording
·            Analog Recording
·            Low Level Recording

Normal Recording
o   It’s the default recording mode
o   Records AUT – Objects and Operations made on them
o   Objects could be like:
o   Browser(“”), Page(“”), WinEdit(“”), WinButton(“”)
o   Operations could be:
o   Set, Click, Activate, Type

 Analog Recording
o   Records exact mouse and key board operations
o   Records every move of the mouse
o   Used while recording operations that cannot be recorded at object level
o   Analog Recording—enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window.
o   In this recording mode, QTP records and tracks every movement of the mouse as you drag the mouse around a screen or window.
o   This mode is useful for recording operations that cannot be recorded at the level of an object, for example, recording a signature produced by dragging the mouse.
o   Note : You cannot edit analog recording steps from within QuickTest.
 Low Level Recording
o   Records on any object whether or not QTP identifies those objects
o   Records all run-time objects as Window or WinObject
o   Just records only the co-ordinate based operations
o   Use while
o   If Objects are not recognized by QTP
o   If Exact object co-ordinates are important in test
o   May not run correctly on all objects…
o   Low-Level Recording—enables you to record on any object in your application, whether or not QuickTest recognizes the specific object or the specific operation.
o   This mode records at the object level and records all run-time objects as Window or WinObject test objects.
o   Use low-level recording for recording in an environment or on an object not recognized by QuickTest. You can also use low-level recording if the exact coordinates of the object are important for your test or component.
o   Note : Steps recorded using low-level mode may not run correctly on all objects

No screenshots were saved for this Information step.
http://www.blogger.com/blogger.g?blogID=4605361392378888646#editor/src=dashboard
o   Whats Next...




o   What's Next...

o   What is Object Spy
o   What is Active Screen
o   Differentiate between Keyword view and Expert view
o   What are the different Object Identification Filters in QTP
o   Explain about Object Identification
o   Explain about Text and Static text
o   Explain about Image and Static Image
o   Explain about Reporter.ReportEvent
o   Explain about MsgBox
o   What is Print command in QTP
o   How do we take snapshot of any Application in QTP
o   What are the different events in Reporter utility in QTP
o   Explain with examples about misPass, micFail
o   What is Synchronization
o   Explain Exist Method with an example
o   Explain Wait and WaitProperty with examples
o   Design and explain through a Script with available Synchronization Methods with an Application example
o   Explain common problems in Record and Play back test scripts using QTP
o   What are the Object Identification Methods in QTP
o   Differentiate between Object Spy and Object Repository
o   What are different Object Capturing filtering options in QTP
o   What is Sync , where and how do we use Sync in test scripts
o   What is GetROProperty
o   Why and where do we use GetROProperty
o   Explain GetROProperty with examples
o   How do we insert snapshots / images into QTP Results

No screenshots were saved for this Information step.
http://www.blogger.com/blogger.g?blogID=4605361392378888646#editor/src=dashboard









0 comments:

Post a Comment

GAReddy @ OneTestingCenter @ All Articles