QTP Training Session IPresented By : Aisha Mazhar
Agenda - Basic• Manual testing v/s Automation.• Introduction to QTP and its purpose.• Key Elements of QTP.• Testing Process• Recording Test.• Playback
Manual testing v/s AutomationDisadvantages of Manual Testing• Time consuming• More resource(s) required• Human errors• Repetition of task is not much• Tiredness• Simultaneous of tasks is not possible (parallel)
Manual testing v/s AutomationAdvantages of Automation• Fast – tools are fast in execution than human users• Reliable – in complex calculation & tasks.• Reusable – reuse at any no. of times.• Repeatable – can repeat some steps for required no. of time.• Programmable – can use flow control statements to apply logic.• Comprehensive – can execute test batch without humaninteraction.
Introduction to QTP and its purpose• Quick Test Professional, abbreviated as QTP.• Launched in Nov 2002 by Mercury interactive• Provides functional and regression test automation• An object based testing tool.• Follows keyword driven approach• Supports windows operating environment only• Latest version 11.0
Key Elements of QTPKey elements of QTP tool window are:• Test Pane – Expert View , Keyword View• Active screen• Data Table – Global sheet, Action sheet• Debug Viewer• Missing resources• Information
Testing Process1. Analyzing your application• Applications development environments• Business processes and functionality do you want to test• Consider how to divide these business processes into smaller units
Testing Process2. Preparing the testing infrastructure• What resources are required• Configure QuickTest settings so that QuickTest will perform the tasks you need
Testing Process3. Building your tests and adding steps to them• Add actions
Testing Process4. Enhancing your test• Inserting checkpoints• Replacing fixed values with parameters• Adding logic and conditional or loop statements
Testing Process5. Debugging, running, and analyzing your test• To ensure that it operates smoothly and without interruption• Examine the test results to pinpoint defects in your application6. Reporting Defects
Recording Test• Process of recording user operations on AUT(Application under test)• Creates steps in keyword view• Generates script in Expert view• Adds objects identification in object repositryTypes of recordings1. Normal2. Analogue3. Low level
Recording Test - TypesNormalDefault mode of recording which takes full advantage of Quick Test Professionals test objectmodel. It recognizes objects in application regardless of their location on the screen. Itrecords the objects in your application and the operations performed on themAnalogue - Automation > Analogue recordingExact keyboard and mouse operations are recorded in relation to either screen or the applicationwindow. Records and tracks every movement of the mouse for e.g recording a signatureproduced by dragginf the mouseLow level - Automation > Low level recordingRecords at the object level and records all run-time objects as either Window or WinObject testobjects. It is used when the exact coordinates of the object are important for your tests. Lowlevel mode records the x,y coordinates of any clicks
PlaybackReads statements one by one and gets object informationfrom the object repository, based on that informationperforms operations in AUT.
References• Build in QTP Tutorial. Help > Quick Test ProfessionalTutorial• http://www.gcreddy.com/