QTP Slides Presentation.
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

QTP Slides Presentation.

on

  • 20,650 views

First QTP Slides presentation with full topics in QTP....

First QTP Slides presentation with full topics in QTP.

--------------------------------------------------------------------
mail2web.com - Microsoft Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange


Statistics

Views

Total Views
20,650
Views on SlideShare
20,409
Embed Views
241

Actions

Likes
13
Downloads
1,230
Comments
2

13 Embeds 241

http://www.slideshare.net 105
http://www.e-presentations.us 45
http://hanamanthalli.blogspot.in 36
http://hanamanthalli.blogspot.com 35
http://hanamanthalli.blogspot.co.il 9
http://hanamanthalli.blogspot.co.uk 3
http://hanamanthalli.blogspot.fr 2
http://itsqualitycontrol1.blogspot.com 1
http://hanamanthalli.blogspot.mx 1
http://hanamanthalli.blogspot.sg 1
http://diveintotesting1.blogspot.com 1
http://webcache.googleusercontent.com 1
http://hanamanthalli.blogspot.com.au 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Hi,



    Technology Specific Guide for QTP is a new book that has got great feedback from all the readers. It will get you started on the path of automation, introducing solutions, roadblocks, patches and ideas that will give you a solid foundation in the field of automation. Everyone from a novice user to an automation expert will have something they would have never heard of or used.



    http://bluemagic-automation.blogspot.in/



    Best Regards,

    Aditya.
    Are you sure you want to
    Your message goes here
    Processing…
  • merci
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

QTP Slides Presentation. Presentation Transcript

  • 1. PREVIOUSLY MERCURY INTERACTIVE PRODUCT NOW TAKEN OVER BY HP
  • 2. WHY QTP?
    • MORE USER FRIENDLINESS
    • MORE FEATURES – MORE CHECKPTS
    • BEST FOR .NET AND OTHER WEB BASED APPLICATION
    • KEYWORD DRIVEN TESTING SOLUTION
  • 3. DIFFERENT PANES IN QTP
    • TEST PANE – SCRIPTS ARE GENERATED
    • ACTIVE SCREEN – SNAP SHOTS
    • DATA TABLE – PARAMETRIZATION
    • DEBUGGER – BREAKPOINTS, WATCHLIST, COMMANDS
  • 4. WHAT TYPE OF TOOL IS QTP
    • RECORD AND PLAYBACK TOOL
    • IT HAS ADDITIONAL FEATURES LIKE SYNC PT, CHECK PT, OUTPUT VALUES
    • IT HAS STEP GENERATOR – BUILT IN FUNCTIONS
    • IT HAS FUNCTION DEFINITION GENERATOR – USER DEFINED FUNCTIONS
  • 5. ADD-INS
    • ADD-INS ARE SIMILAR TO HEADER FILES IN C LANGUAGE
    • THEY ARE INCLUDED AT THE BEGINNING OF TESTING SESSIONS SO THAT CLASSES, FUNCTIONS OF PARTICULAR APPLICATION ARE LEARNT BY QTP
    • FOR TESTING JAVA APPLICATION, JAVA ADDIN HAD TO BE INCLUED.
    • ADDIN MANAGER ENABLES TO MANAGE THE ADDINS INCLUSION.
  • 6. TYPES OF VIEWS IN TEST PANE
    • TWO TYPES
    • KEYWORD VIEW – ACTIONS ARE GENERATED IN TABULAR FORMAT SIMILAR TO MANUAL TEST CASES
    • EXPERT VIEW – ACTIONS ARE GENERATED IN VB SCRIPTING
  • 7. MODES OF RECORDING
    • NORMAL MODE – RECORDING BASED ON PROPERTIES OF GUI
    • ANALOG MODE – MOUSE MOVEMENTS, CLICKS, KEYBOARD STROKES
    • LOW LEVEL – COMBINATION OF ABOVE TWO – MAINLY FOR RECORDING CUSTOM OBJECTS
  • 8. OBJECT RECOGNITION
    • MANDATORY PROPERTIES – QTP ALWAYS LEARNS FOR DIFFERENTIATING OBJECTS
    • ASSITIVE PROPERTIES – OPTIONAL PROPERTIES LEARNT WHEN MANDATORY COULDN’T ABLE TO DIFFERENTIATE
  • 9. OBJECT RECOGNITION
    • ORDINAL IDENTIFIER – THIS IS USED WHEN BOTH MANDATORY AND ASSITIVE COULDN’T HELP TO DIFFERENTIATE OBJECTS
    • ORDINAL IDENTIFIER USES LOCATION INDICATOR AND INDEX INDICATOR TO DIFFERENTIATE OBJECTS
  • 10. OBJECT IDENTIFICATION
    • OBJECT IDENTIFICATION IS ANOTHER COMPONENT IN QTP SIMILAR TO GUI CONFIGURATION IN WINRUNNER
    • THIS IS USED TO CONFIGURE THE MANDATORY AND ASSITIVE PROPERTIES DEPENDING ON APPLICATION TO BE TESTED.
  • 11. OBJECT REPOSITORY
    • OBJECT REPOSITORY IS SIMILAR TO GUI MAP FILE IN WINRUNNER
    • STORES THE PROPERTIES AND VALUE OF THE OBJECTS LEARNT DURING RECORDING
    • WHILE PLAYBACK OF SCRIPTS, QTP REFERS OBJECT REPOSITORY FOR IDENTIFYING THE OBJECTS
  • 12. OBJECT REPOSITORY
    • TWO TYPES – PER ACTION, SHARED REPOSITORY
    • SHARED IS COMMONLY USED AS SAVES TIME
    • LOAD”PATH OF REPORSITORY” IS FUNCTION USED TO LOAD REPOSITORY RELATED FILES DURING RUNTIME
  • 13. WHAT ARE TYPES OF PROPERTIES?
    • TEST OBJECT – PROPERTIES LEARNT BY QTP WHILE RECORDING THAT IS USED FOR MAPPING WITH ACTUAL OBJECTS
    • RUNTIME – PROPERTIES OF ACTUAL OBJECT IN THE APPLICATION
  • 14. OBJECT SPY
    • OBJECT SPY IS A COMPONENT IN QTP THAT HELPS TO LIST THE TEST OBJECT AND RUNTIME PROPERTIES OF THE GUI
    • LISTS THE METHODS AND SYNTAX THAT COULD BE IMPLEMENTED ON THAT PARTICULAR OBJECT
    • LISTS THE HEIRARCHY OF THE OBJECT IN THE AUT
  • 15. CHECK POINTS
    • STANDARD CHECK POINT – STANDARD PROPERTIES OF GUI INCLUDES TABLES
    • BITMAP CHECK POINT – VERIFIES IMAGES AND BITMAPS
    • TEXT CHECKPT – WORKS ONLY IN CERTAIN APPLICATION, BEST TO USE STANDARD CHECK PT
    • XML CHECK PT- USED TO VERIFY XML FILES
    • DATABASE CHECK PT – CUSTOM AND DEFAULT CHECKS ON DATABASE
  • 16. CHECK POINTS
    • ACCESSIBILITY CHECK PT – USED TO VERIFY WHETHER THE PAGE IN THE WEBSITE IS BUILD AS PER W3 CONSORTIUM STANDARD OR NOT
  • 17. SMART IDENTIFICATION
    • MAINLY USED FOR VERIFYING DYNAMIC OBJECTS
    • THIS CAPTURES BASE FILTER AND OPTIONAL FILTER PROPERTIES INORDER TO RECOGNIZE THE DYNAMIC OBJECTS
    • CAN BE ENABLED THROUGH TOOLS > OBJECT IDENTIFICATION
  • 18. OUTPUT VALUES
    • OUTPUTS THE VALUE OF PROPERTIES OF GUI DURING RUNTIME
    • CAN BE VIEWED IN RUNTIME DATATABLE IN RESULTS WINDOW
    • MAINLY USED TO GET COLLECTION OF PROPERTY VALUE OF DYNAMIC OBJECTS
  • 19. PARAMETRIZATION
    • PARAMETRIZATION - PASSING MULTIPLE SET OF VALUES FOR TESTING
  • 20. HOW CAN WE PARAMETRIZE?
    • IDENTIFY THE FIXED VALUE THAT NEEDS TO BE PARAMETRIZED
    • REPLACE WITH PARAMETER
    • PASSING VALUE FROM DATA TABLE
  • 21. WHAT IS DATA TABLE
    • INBUILT XL SHEET IN QTP FOR PASSING VALUES TO PARAMETERS IN RUNTIME
    • TWO SHEETS – GLOBAL AND ACTION
    • GLOBAL – DATAS ARE PASSED TO ALL ACTIONS WITHIN THE SCRIPT
    • ACTION – DATAS ARE PASSED TO ONLY PARTICULAR ACTION
  • 22. WAYS TO PARAMETRIZE..
    • DATA TABLE PARAMETER – PASSING THROUGH DATA TABLE
    • ACTION/COMPONENT PARAMETER – BY DECLARING INPUT AND OUTPUT PARAMETER IN ACTION PROPERTIES
    • ENVIRONMENT PARAMETER – EXTERNAL HOST, URL, VUSER ETC…
    • RANDOM PARAMETER – WITHIN NUMERIC RANGE
  • 23. Synchronization
    • Problem due to mismatch between tool time and application time is sorted using synchronization
    • Wait(seconds)
    • Exist – returns boolean value
    • Waitproperty(property, value, timeout)
    • Sync – waits until all objects are downloaded in a webpage
  • 24. TYPES OF ACTIONS
    • REUSABLE ACTION – THAT CAN BE CALLED TO ANY SCRIPT
    • NON REUSABLE – THAT CAN BE CALLED TO ANY ACTION WITHIN THE SCRIPT AND ONLY ONCE
    • EXTERNAL – REUSABLE ACTIONS BUT ARE READ ONLY
  • 25. CALLING ACTION
    • INSERT CALL TO EXISITING ACTION – CALLS A REUSABLE ACTION, BUT ANY CHANGES WILL BE REFLECTED ON ORIGINAL CALLED ACTION
    • INSERT CALL TO COPY OF ACTION – CALLS A REUSABLE ACTION, BUT CHANGES ARE NOT REFLECTED ON ORIGINAL CALLED ACTION
  • 26. TRANSACTIONS
    • TRANSACTIONS ARE NOTHING BUT TIMER FOR MEASURING TIME TAKEN FOR EXECUTING PARTICULAR TASK
    • SERVICES.START TRANSACTION “T1”
    • SERVICES.END TRANSACTION “T1”
    • CAN BE USED ANY NUMBER OF TIMES
  • 27. DEBUGGING
    • DEBUGGING – FINDING ERRORS IN THE SCRIPT
    • BREAKPOINTS – POINT WE CREATE IN THE SCRIPT WHERE THE EXCUTION OF SCRIPT IS PAUSED
    • WATCHLIST – MAINLY FOR BETTER DEBUGGING. USED TO VIEW THE VALUES OF THE PARAMETERS/VARIABLES DURING RUNTIME
  • 28. HOW TO HANDLE CUSTOM OBJECTS???
    • SOLUTION IS VIRTUAL OBJECT WIZARD
    • THIS HELPS TO MAP THE CUSTOM OBJECT WITH THE STANDARD GUIS. HENCE WHILE RECORDING QTP RECOGNIZES EVEN THESE NON STANDARD OBJECTS
  • 29. HANDLE THE CHANGING WINDOWS/ OBJECT PROPERTIES??
    • THE SOLUTION IS “REGULAR EXPRESSION”
    • REGULAR EXPRESSION IS AN EXPRESSION THAT MAKES QTP TO RECOGNIZE THE OBJECTS THAT HAVE VARYING PROPERTY DURING RUNTIME
  • 30. REGULAR EXPRESSION
    • – SYMBOL TO INDICATE IT IS AN REGULAR EXPRESSION
    • . – PERIOD MATCHES ONE CHARACTER !WELCOME. CAN MATCH WELCOMES, WELCOMED
    • * - MATCHES ANY NUMBER OF CHARACTER !W*-WHO, WE
    • [] – TO INDICATE COLLECTION LIKE
    • !W[E3] – WE, W3
  • 31. REGULAR EXPRESSIONS
    • - INDICATES RANGE LIKE [0-9]
    • ^ INDICATES EXCLUSION LIKE [^A-Z] WILL NOT ACCEPT UPPER CASE ALPHABETS
    • + indicates one or more occurrence of preceding character ca+r – car, caaar and not cr
    • w matches all characters except alphanumeric and underscore
  • 32. WHAT ARE EXCEPTIONS???
    • EXCEPTIONS ARE NOTHING BUT UNEXPECTED ERRORS THAT CAUSES HINDERANCE DURING THE EXECUTION OF SCRIPTS
    • COULD BE DUE TO POP UPS, OBJECT PROPERTY CHANGE, APPLICATION CRASH, TEST RUN
  • 33. HOW TO HANDLE EXCEPTION???
    • SIMPLE USING RECOVERY SCENARIO MANAGER.
    • RECOVERY SCENARIO MANAGER IS A WIZARD THAT GUIDES STEPS TO HANDLE EXCEPTIONS
  • 34. RECOVERY SCENARIO MANAGER
    • THREE STEPS
    • TRIGGER EVENT – DEFINE THE EXCEPTION
    • RECOVERY OPERATION – DEFINING THE HANDLER FUNCTION
    • POST RECOVERY OPERATION.
  • 35. FUNCTION? PROCEDURE???
    • FUNCTION CAN BE INBUILT OR USER DEFINED. IT IS ONE THAT RETURNS A VALUE
    • PROCEDURE IS SIMILAR TO FUNCTION BUT DOESN’T RETURN VALUE
  • 36. SOME IMPORTANT FUNCTIONS - SetTOProperty
    • SETTOPROPERTY()
    • PROPERTYNAME, VALUE
    • DIALOG(“Login”).WinEdit(“Username”).SETTOPROPERTY(“Enabled”,”True”)
  • 37. GETTOPROPERTY()
    • GetTOProperty( propertyname)
    • Returns the value of the property
    • Example,
    • A = Dialog(“Login”).Winbutton(“OK”).GetTOProperty(“Enabled”)
  • 38. GETTOPROPERTIES( )
    • GetTOProperties()
    • Lists all the properties and property values of particular object
  • 39. GetROProperty()
    • GetROProperty(Propertyname)
    • Returns the runtime property of the particular object
    • Dim a
    • A = dialog(“login”).Winbutton(“OK”).GETROPROPERTY(“nativeclass”)
  • 40. Can we connect database through QTP???
    • Answer is yes not through wizard but through scripting
    • Set a = createobject(“ADODB.connection”)
    • A.open”DSN = Employee.mdb, Username = xxx, Password = xxxx”
    • Set b = createobject(“ADODB.RecordSet”)
    • B.open”Select * from table1”,a
    • Msgbox b.recordcount
  • 41. File handling
    • Using QTP it is possible to pass datas from various files and write data into file
    • Example to read data from a file
    • Set a = createobject(“Scripting.FileSystemObject”)
    • Set b = a.opentextfile(“path”,0/1/8,”true”)
    • Str = b.readline
    • 0 – write mode 1- read mode 8 – append
    • True/false – file exist or create new
  • 42. ChildObjects()
    • This function is used to return the list of all objects within the window
    • Example to count no of objects within dialog
    • Set c = dialog(“Login”).childobjects()
    • Msgbox c.count
  • 43. POPUP()
    • POPUP(“MSG”,WAIT TIME, “TITLE”,BUTTON)
    • EXAMPLE
    • SET A = POPUP(“HI”,10,”GREETING”,4)
    • A WILL BE RETUNED VALUE 6(YES) AND 7(NO)
  • 44. MAXIMIZE WINDOW
    • MAXIMIZE IS KEYWORD FOR MAXIMIZING WINDOW/DIALOG
    • FULLSCREEN IS THE KEYWORD FOR MAXIMIZING THE BROWSER
  • 45. DATATYPE CONVERSION
    • CINT() – CONVERTS VAR TO INTEGER
    • CLNG() – CONVERTS CURRENCY TO INTEGER
    • CCUR()- CONVERTS TO CURRENCY FORMAT
  • 46. IS IT POSSIBLE TO OPEN APPLICATION THROUGH SCRIPTING???
    • YES!!!
    • SYSTEMUTIL.RUN “PATH” FOR OPENING ANY APPLN
    • INVOKE “PATH” FOR EXE APPLICATION
    • EXECUTE “PATH”
  • 47. USER DEFINED FUNCTION
    • FUNCTIONS THAT ARE REPEATED FOR MANY TIMES
    • EXAMPLE
    • PUBLIC FUNCTION SUM(X, Y, Z)
    • Z = X+Y
    • END FUNCTION
    • DIM A, B, C
    • A = INPUTBOX (“ENTER A”)
    • B = INPUTBOX(“ENTER B”)
    • SUM (A,B,C)
    • MSGBOX C
  • 48. FRAMEWORKS
    • FRAMEWORKS ARE SET OF DEFINED RULES FOR AUTOMATING A TESTING PROCESS
    • IT COULD BE SAID AS AUTOMATION TEST APPROACH
  • 49. FRAMEWORKS
    • LINEAR FRAMEWORK – RECORDING, ENHANCEMENT , PLAYBACK
    • HERE U CREATE SCENARIOS, DO RECORDING BASED ON SCENARIOS, ENHANCEMENT IS DONE FOR VERIFICATIONS, AND PLAYBACK FOR EXECUTION
  • 50. FRAMEWORK
    • DATA DRIVEN – HERE AN EXTERNAL DATABASE IS MAINTANINED FOR PASSING VALUES TO THE ACTIONS IN QTP
    • VALUES ARE COMPLETELY PASSED ONLY THRO THIS DATA SETS
  • 51. FRAMEWORK
    • KEYWORD DRIVEN – USING THE MANULLY ENTERED TABLE THAT DEFINES TESTOBJECT, OPERATION, DATA AND DESCRIPTION, VB SCRIPTS ARE AUTOMATICALLY GENERATED BY QTP
  • 52. FRAMEWORK
    • DESCRIPTIVE PROGRAMMING – IT IS A CONCEPT OF EXECUTION OF SCRIPTS WITHOUT THE REFERENCE OF OBJECT REPOSITORY
    • DIALOG(“CLASS = DIALOG”,”CAPTION = Login”).Winbutton(“class = Button”,”Text = OK”).Click
  • 53. FRAMEWORKS
    • FUNCTIONAL/MODULAR – HERE THE ACTIONS ARE DECLARED AS USER DEFINED FUNCTIONS
    • THESE FUNCTIONS ARE CALLED WHEREVER NEEDED.
  • 54. FRAMEWORK
    • HYBRID FRAMEWORK – MIX OF ANY OF THE ABOVE FRAME WORKS ARE CLASSED AS HYBRID.
    • DEPENDING ON COMPLEXITY OF THE APPLICATION, MIXES ARE CHOSEN.