Qtp-training A presentation for beginers

80
QTP 8.2 QTP 8.2 QUICK TEST PROFESSIONAL QUICK TEST PROFESSIONAL 8.2 8.2 06/07/22 06/07/22 www.ramupalanki.com www.ramupalanki.com

description

QUICK TEST PROFESSIONAL 8.2 Mercury Quick Test Professional 8.2 provides the industry’s best solution for functional test and regression test automation - addressing every major software application and environment

Transcript of Qtp-training A presentation for beginers

Page 1: Qtp-training  A presentation for beginers

QTP 8.2QTP 8.2

QUICK TEST QUICK TEST PROFESSIONAL 8.2PROFESSIONAL 8.2

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 2: Qtp-training  A presentation for beginers

1. Introduction1. Introduction

2. Recording a Session2. Recording a Session

3. Running a Session3. Running a Session

4. Object Management4. Object Management

5. Synchronization5. Synchronization

6. Check Points6. Check Points

7. Output Values7. Output Values

8. Parameterization8. Parameterization

9. Actions9. Actions

10. Recovery Scenario Manager 10. Recovery Scenario Manager

11. Debugging11. Debugging

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 3: Qtp-training  A presentation for beginers

IntroductionIntroduction

Mercury Quick Test Professional 8.2 Mercury Quick Test Professional 8.2 provides the industry’s best solution for provides the industry’s best solution for functional test and regression test functional test and regression test automation - addressing every major automation - addressing every major software application and environment.software application and environment.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 4: Qtp-training  A presentation for beginers

Why QTPWhy QTP Ease of use:Ease of use:

1.1. QTP allows even novice testers to be productive in minutes. You QTP allows even novice testers to be productive in minutes. You can can create a test script by simply pressing a Record button create a test script by simply pressing a Record button and using an and using an

application to perform a typical business process. application to perform a typical business process.

2.2. Using the Active Screen facility, several types of Using the Active Screen facility, several types of checkpointscheckpoints for any for any object to verify that components behave as expected can be created object to verify that components behave as expected can be created

simply by simply by clicking on that object in the Active Screenclicking on that object in the Active Screen..

3.3. Data TableData Table, an integrated spreadsheet with the full functionality of , an integrated spreadsheet with the full functionality of Excel, is used Excel, is used to manipulate data setsto manipulate data sets and create multiple test and create multiple test iterations, without programming, to expand test case coverage.iterations, without programming, to expand test case coverage.

QuickTest Professional supports QuickTest Professional supports functional testing functional testing of all popular of all popular environments, including Windows, Web, .Net, Visual Basic, ActiveX, environments, including Windows, Web, .Net, Visual Basic, ActiveX, Java, SAP, Siebel, Oracle, PeopleSoft, terminal emulators, and Web Java, SAP, Siebel, Oracle, PeopleSoft, terminal emulators, and Web services .services .

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 5: Qtp-training  A presentation for beginers

Add-in ManagerAdd-in Manager

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 6: Qtp-training  A presentation for beginers

Keyword ViewKeyword View

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 7: Qtp-training  A presentation for beginers

Expert ViewExpert View

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 8: Qtp-training  A presentation for beginers

Create the Basic TestCreate the Basic Test

Record user actionsRecord user actions Save the testSave the test Verify successful playbackVerify successful playback

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 9: Qtp-training  A presentation for beginers

Record User ActionsRecord User Actions

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 10: Qtp-training  A presentation for beginers

Start recording on the Mercury Tours Web site.Start recording on the Mercury Tours Web site.Choose Choose Test > RecordTest > Record or click the or click the RecordRecord button. The Record and button. The Record and

Run Settings dialog boxRun Settings dialog box

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 11: Qtp-training  A presentation for beginers

In the Windows Applications tab, confirm that In the Windows Applications tab, confirm that Record and run on Record and run on these applications (opened on session start)these applications (opened on session start) is selected, and that is selected, and that

there are no applications listed.there are no applications listed.

This setting prevents you from inadvertently recording operations performed on This setting prevents you from inadvertently recording operations performed on various Windows applications (such as e-mail) during a recording session. various Windows applications (such as e-mail) during a recording session.

Click Click OKOK..

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 12: Qtp-training  A presentation for beginers

Recording ModesRecording Modes

• NormalNormal: recognizes the objects in the application : recognizes the objects in the application irrespective of their location in the screen.irrespective of their location in the screen.

• AnalogAnalog: records the exact keyboard and mouse : records the exact keyboard and mouse operations with respect to the screen coordinates or operations with respect to the screen coordinates or the application window.the application window.

• Low levelLow level: records any object irrespective of support : records any object irrespective of support from QTP. Recognizes all run time objects as from QTP. Recognizes all run time objects as windows objects. It is used when an object is not windows objects. It is used when an object is not identified by Quick test.identified by Quick test.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 13: Qtp-training  A presentation for beginers

Save the TestSave the Test The test can be saved into a Windows file system (as below).The test can be saved into a Windows file system (as below). If TestDirector is available and connected with QTP, the test can be saved If TestDirector is available and connected with QTP, the test can be saved

there.there. QTP creates an entire structure of files and directories to support a single QTP creates an entire structure of files and directories to support a single

QuickTest script for each saved test.QuickTest script for each saved test.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 14: Qtp-training  A presentation for beginers

Verify Successful PlaybackVerify Successful Playback

Use the ‘Run’ button to begin playback from the top of the test.Use the ‘Run’ button to begin playback from the top of the test. Select the location of the test results- either a new results folder or a temporary folder.Select the location of the test results- either a new results folder or a temporary folder.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 15: Qtp-training  A presentation for beginers

Running a SessionRunning a Session

The The RunRun option can be used to run the test from start to end. option can be used to run the test from start to end. The The RunRun from Stepfrom Step option in the Test menu is used to run the test option in the Test menu is used to run the test

from a selected step to the end of the current action, if running from a selected step to the end of the current action, if running from the Expert View, or to the end of the test , if running from the from the Expert View, or to the end of the test , if running from the Keyword View. Thus it enables us to check a specific part of the Keyword View. Thus it enables us to check a specific part of the application or to confirm that a certain part of the test runs application or to confirm that a certain part of the test runs correctly. correctly.

The The Update Run Update Run option in the Test menu is used to update the option in the Test menu is used to update the Active screens, Checkpoints and the test object descriptions.Active screens, Checkpoints and the test object descriptions.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 16: Qtp-training  A presentation for beginers

Viewing the Test ResultsViewing the Test Results

Test results can be stored in their own location (for documentation) or in a Test results can be stored in their own location (for documentation) or in a temporary location that is overwritten each time the test is run (debugging).temporary location that is overwritten each time the test is run (debugging).

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 17: Qtp-training  A presentation for beginers

How QuickTest Works with ObjectsHow QuickTest Works with Objects

What are Object Properties?What are Object Properties?

A set of characteristics that defines an object’s appearance, values, state A set of characteristics that defines an object’s appearance, values, state and identity in an application.and identity in an application.

– QTP captures these object properties during recording.QTP captures these object properties during recording.– Logical Name – Logical name is a value QuickTest usually takes from Logical Name – Logical name is a value QuickTest usually takes from

one of the object properties (like TEXT) to refer to the object in the one of the object properties (like TEXT) to refer to the object in the recorded script.recorded script.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 18: Qtp-training  A presentation for beginers

Object RepositoryObject Repository What is Object Repository?What is Object Repository?

Object Repository is a location within the test structure Object Repository is a location within the test structure where QuickTest stores object information captured during where QuickTest stores object information captured during recording.recording.

The Object Repository can be used to:The Object Repository can be used to:

– Rename logical names for readability.Rename logical names for readability.

– Add a new object in the repository.Add a new object in the repository.

– Configure the object properties used to identify an object.Configure the object properties used to identify an object.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 19: Qtp-training  A presentation for beginers

Object RepositoryObject Repository

Object List Object Properties

Object Name and Class

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 20: Qtp-training  A presentation for beginers

Object RepositoryObject Repository

The Object Repository can be Per Action or The Object Repository can be Per Action or Shared. Shared.

The shared repository can be used by multiple The shared repository can be used by multiple actions of the same test or by actions from actions of the same test or by actions from different tests. Test object properties are prone different tests. Test object properties are prone to frequent updation.to frequent updation.

Per Action object repository is used by one or Per Action object repository is used by one or very few tests.Test object properties are very few tests.Test object properties are modified less frequentlymodified less frequently. .

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 21: Qtp-training  A presentation for beginers

Object Spy Object Spy

It can be used to view the properties and values It can be used to view the properties and values of an object in any open application. Click the of an object in any open application. Click the pointing hand to select the object in the pointing hand to select the object in the application. The object’s properties (Test object application. The object’s properties (Test object properties and Run-Time object properties) and properties and Run-Time object properties) and methods can be identified. The object’s methods can be identified. The object’s hierarchy tree is also displayed. To perform hierarchy tree is also displayed. To perform other events such as mouse clicks or window other events such as mouse clicks or window focus hold the CTRL key.focus hold the CTRL key.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 22: Qtp-training  A presentation for beginers

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 23: Qtp-training  A presentation for beginers

Object IdentificationObject Identification

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 24: Qtp-training  A presentation for beginers

SynchronizationSynchronizationWHAT IS SYNCHRONIZATION ?WHAT IS SYNCHRONIZATION ?

Synchronization refers to adding a step in the script that instructs Synchronization refers to adding a step in the script that instructs Quick Test to wait for a particular object before proceeding to the Quick Test to wait for a particular object before proceeding to the next step during playback.next step during playback.

When do you need SYNCHRONIZATION ?When do you need SYNCHRONIZATION ? When you observe that the application takes a longer time to When you observe that the application takes a longer time to

process information sent or respond to a client request, add a process information sent or respond to a client request, add a synchronization step while recording. For example:synchronization step while recording. For example:- A progress bar to reach 100%.- A progress bar to reach 100%.- A button to become enabled.- A button to become enabled.- A window or pop-up message to open.- A window or pop-up message to open.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 25: Qtp-training  A presentation for beginers

How to ADD SynchronizationHow to ADD Synchronization

Synchronization can be added ONLY during recording.Synchronization can be added ONLY during recording.

Identify the object to be synchronized.Identify the object to be synchronized.

Navigate to the window where the object is located.Navigate to the window where the object is located.

Locate the step in the test that corresponds to the object.Locate the step in the test that corresponds to the object.

Start recording and add the synchronization point. Start recording and add the synchronization point.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 26: Qtp-training  A presentation for beginers

Two ways to set SynchronizationTwo ways to set Synchronization Global synchronization value for all Objects.Global synchronization value for all Objects.

Instructs Quick Test to wait for all the objects for a Instructs Quick Test to wait for all the objects for a specific amount of time.specific amount of time.

Synchronization of a specific Object.Synchronization of a specific Object.

Instructs Quick Test to wait for a specific object only.Instructs Quick Test to wait for a specific object only.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 27: Qtp-training  A presentation for beginers

Global synchronization value Global synchronization value for all Objectsfor all Objects

Menu Menu Test Test Settings Settings Run Run

For every object For every object in the test, Quick in the test, Quick Test can wait a Test can wait a maximum maximum number of number of milliseconds milliseconds specified in the specified in the settingssettings

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 28: Qtp-training  A presentation for beginers

Synchronization of a Specific ObjectSynchronization of a Specific Object Menu Menu Insert Insert Step Step

Synchronization Synchronization PointPoint

Quick Test shall pause Quick Test shall pause the test until the object the test until the object property achieves the property achieves the value specified here (or value specified here (or until the specific until the specific timeout amount is timeout amount is exceeded).exceeded).

Quick Test uses one of Quick Test uses one of the object’s properties the object’s properties as the waiting criteria. as the waiting criteria. E.g. ‘Text’ property for E.g. ‘Text’ property for window, ‘Label’ window, ‘Label’ property for buttons property for buttons etc.etc.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 29: Qtp-training  A presentation for beginers

Checkpoints In QTPCheckpoints In QTP

A checkpoint is a verification point that A checkpoint is a verification point that compares a current value for a specified compares a current value for a specified property with the expected value for that property with the expected value for that property. property.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 30: Qtp-training  A presentation for beginers

Types Of CheckpointsTypes Of Checkpoints

Standard CheckpointStandard Checkpoint Bitmap checkpointBitmap checkpoint Text checkpointText checkpoint Text Area checkpointText Area checkpoint Database checkpointDatabase checkpoint XML CheckpointXML Checkpoint

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 31: Qtp-training  A presentation for beginers

Types and Their UseTypes and Their Use

Standard CheckpointStandard Checkpoint

Bitmap CheckpointBitmap Checkpoint

Checks the property Checks the property value of the object in value of the object in an application or an application or Webpage. It checks Webpage. It checks buttons,Radiobuttons,buttons,Radiobuttons,Comboboxes etcComboboxes etc

Checks the value of Checks the value of an image in the an image in the application.application.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 32: Qtp-training  A presentation for beginers

Text CheckpointText Checkpoint

Checks whether the Checks whether the text string is text string is displayed in the displayed in the appropriate place in appropriate place in your application or your application or on a Web pageon a Web page

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 33: Qtp-training  A presentation for beginers

Database CheckpointDatabase Checkpoint

XML CheckpointXML Checkpoint

ChecksChecks thethe contentscontents ofof a a databasedatabase accessed by the accessed by the applicationapplication

Checks the data Checks the data content of XML content of XML documents in the documents in the applicationapplication..

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 34: Qtp-training  A presentation for beginers

When to Use CheckpointsWhen to Use Checkpoints

Before creating checkpoints on web Before creating checkpoints on web objects we have to select web-test objects we have to select web-test option in ADD-IN Manager.option in ADD-IN Manager.

If the objects developed in HTML we If the objects developed in HTML we can use Standard Check point.can use Standard Check point.

If the Objects developed in XML we If the Objects developed in XML we can use XML Check point.can use XML Check point.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 35: Qtp-training  A presentation for beginers

How Checkpoints Work - How Checkpoints Work - PlaybackPlayback

ScriptScript Expected ResultExpected Result

Execute checkpoint

Object: ButtonLogical Name : OKProperty: EnabledValue: True

Actual = expected ?

Test Results

PASS

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 36: Qtp-training  A presentation for beginers

Sample Objects that QuickTest can Sample Objects that QuickTest can VerifyVerify

WINDOWSWINDOWS WEBWEBWindowWindow BrowserBrowser

Edit FieldEdit Field Text AreaText Area

Drop down listDrop down list Text LinkText Link

Menu commandMenu command ImagesImages

Radio ButtonRadio Button Image LinkImage Link

CheckboxCheckbox Edit FieldEdit Field

Windows ObjectWindows Object Drop down listDrop down list

Status BarStatus Bar CheckboxCheckbox

Text AreaText Area Radio ButtonRadio Button

Tables/ GridsTables/ Grids

Web ElementWeb Element04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 37: Qtp-training  A presentation for beginers

How to Add a CheckpointHow to Add a Checkpoint1.Select the object in the Active

Screen

2.Right Click on it and Select ‘Insert Standard Checkpoint’

or Menu Insert Checkpoint Standard Checkpoint

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 38: Qtp-training  A presentation for beginers

How to Add a Checkpoint… set How to Add a Checkpoint… set expected valueexpected value

» Do not automatically select the pre-defined list of properties to check.

» Scroll down the property list to find the property( or properties) that best meets the test requirement.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 39: Qtp-training  A presentation for beginers

Table CheckpointTable Checkpoint

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 40: Qtp-training  A presentation for beginers

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 41: Qtp-training  A presentation for beginers

Database CheckpointDatabase Checkpoint Choose Choose Insert > Checkpoint > Database CheckpointInsert > Checkpoint > Database Checkpoint. .

The Database Query Wizard opensThe Database Query Wizard opens..

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 42: Qtp-training  A presentation for beginers

Database Checkpoint ..contdDatabase Checkpoint ..contd

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 43: Qtp-training  A presentation for beginers

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 44: Qtp-training  A presentation for beginers

How to Add a Checkpoint… How to Add a Checkpoint… Test ResultTest Result

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 45: Qtp-training  A presentation for beginers

Output ValuesOutput Values

Output Value is used to retrieve the Output Value is used to retrieve the current value of any object in the current value of any object in the application and stores it in a application and stores it in a specified location.specified location.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 46: Qtp-training  A presentation for beginers

NavigationNavigation

InsertInsert

Output ValueOutput Value

Select the type of output value.Select the type of output value.

Right click the object in the Active screen Right click the object in the Active screen and select the type of output value to be and select the type of output value to be added added

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 47: Qtp-training  A presentation for beginers

Types of Output ValuesTypes of Output Values

Standard Output Standard Output ValuesValues

Text Output Values Text Output Values

To output the To output the property values of property values of most objects like most objects like editbox,button,radieditbox,button,radio button,list o button,list box,etc. box,etc.

To output text To output text strings displayed in strings displayed in the application the application

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 48: Qtp-training  A presentation for beginers

Text Area Output Text Area Output Values Values

Database Output Database Output Values Values

XML Output Values XML Output Values

To output text strings To output text strings displayed within a displayed within a defined area of the defined area of the application application

To output the To output the contents of database contents of database cells, based on the cells, based on the results of a query on results of a query on the database. the database.

To output the values To output the values of XML elements and of XML elements and attributes in XML attributes in XML documentsdocuments

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 49: Qtp-training  A presentation for beginers

How to use Output ValueHow to use Output Value

Select the output to be considered

Select the Property

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 50: Qtp-training  A presentation for beginers

How to use Output Value…How to use Output Value…Contd.Contd.

Output Value

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 51: Qtp-training  A presentation for beginers

Parameterization Parameterization

A parameter is a variable that is A parameter is a variable that is assigned a value from an external assigned a value from an external data source at run time. We use data source at run time. We use parameterization when we want to parameterization when we want to change the value of properties at run change the value of properties at run time.time.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 52: Qtp-training  A presentation for beginers

Types of ParameterizationTypes of Parameterization

Parameterization can be done in three Parameterization can be done in three ways using Quick Test.ways using Quick Test.

DatatableDatatable Environment variablesEnvironment variables Random numbersRandom numbers

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 53: Qtp-training  A presentation for beginers

DataTable ParametersDataTable Parameters The Test runs once for each line of data in The Test runs once for each line of data in

the DataTable. Each iteration takes a the DataTable. Each iteration takes a different value from the datatable. different value from the datatable.

choose the Run tab choose the Run tab TestTest

Settings Settings

Specify an option in the Datatable iterations Specify an option in the Datatable iterations frame.frame.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 54: Qtp-training  A presentation for beginers

Environment variable ParametersEnvironment variable Parameters

The Environment variables can have Quick Test The Environment variables can have Quick Test generated values or values supplied from external generated values or values supplied from external files.files.

TestTest SettingsSettings

EnvironmentEnvironment

Choose User-defined from the variable typeChoose User-defined from the variable type

Click Click NewNew to create your own internal variables to create your own internal variables

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 55: Qtp-training  A presentation for beginers

Random number Parameters Random number Parameters

It enables us to use random numbers It enables us to use random numbers as values in the test. We can specify as values in the test. We can specify the range from which the random the range from which the random number is generated. By default, the number is generated. By default, the random number range is between 0 random number range is between 0 and 100.and 100.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 56: Qtp-training  A presentation for beginers

How to Parameterize an Input How to Parameterize an Input ValueValue

» Select the step in the Tree View that contains the recorded input value.

» Click on the text under Value column.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 57: Qtp-training  A presentation for beginers

How to Parameterize an Input How to Parameterize an Input Value… contd.Value… contd.

-Select the source for paramterization.

-Select the parameter name.

-Select the data sheet to use.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 58: Qtp-training  A presentation for beginers

How to Parameterize an Input How to Parameterize an Input Value…contdValue…contd

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 59: Qtp-training  A presentation for beginers

ActionsActions

A test is composed of actions or logical A test is composed of actions or logical sections. The steps we add to the test sections. The steps we add to the test are added within the test’s actions. By are added within the test’s actions. By default, default, each test begins with a single each test begins with a single actionaction. .

When we run a test with multiple When we run a test with multiple actions, the actions, the Test Results are divided by Test Results are divided by actions actions so that we can view the detailed so that we can view the detailed results for each action individually. results for each action individually.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 60: Qtp-training  A presentation for beginers

Each action has its own sheet in the Data Each action has its own sheet in the Data Table so that we can insert data that Table so that we can insert data that applies only to that action.applies only to that action.

Actions can be of three types:Actions can be of three types: Non-re-usableNon-re-usable: Action can be used in the : Action can be used in the

local test, only once.local test, only once.

ReusableReusable: Action can be used in the local : Action can be used in the local test, multiple times.test, multiple times.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 61: Qtp-training  A presentation for beginers

ExternalExternal: These are reusable actions : These are reusable actions created in another test. This can be of two created in another test. This can be of two types. If a types. If a call to an external actioncall to an external action is used is used the action is read only in the calling test. the action is read only in the calling test. But, any existing action can be inserted as But, any existing action can be inserted as a copy of the original action. In this case, a copy of the original action. In this case, we can modify this we can modify this copy of the external copy of the external

actionaction in the calling test. in the calling test.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 62: Qtp-training  A presentation for beginers

Actions on Quick Test Window Actions on Quick Test Window (Keyword View):(Keyword View):

Actions Tool Bar Actions Tool Bar contains buttons and a contains buttons and a list of actions, enabling us to view the list of actions, enabling us to view the details of an individual action or the entire details of an individual action or the entire test flow. The test flowtest flow. The test flow displays the overall displays the overall flow of the test with all the actions in the flow of the test with all the actions in the test.test.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 63: Qtp-training  A presentation for beginers

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 64: Qtp-training  A presentation for beginers

How to set an Action as How to set an Action as ReusableReusable

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 65: Qtp-training  A presentation for beginers

How to Call a Reusable ActionHow to Call a Reusable Action

Insert Call to existing Action

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 66: Qtp-training  A presentation for beginers

Recovery Scenario ManagerRecovery Scenario Manager The recovery scenario manager is used to :The recovery scenario manager is used to : defining the trigger event defining the trigger event that interrupts the run that interrupts the run

sessionsession specifying the recovery operation(s)specifying the recovery operation(s) required to required to

continuecontinue choosing a post-recovery choosing a post-recovery test run operationtest run operation specifying a name and descriptionspecifying a name and description for the for the

recovery scenariorecovery scenario specifying whether to associate the recovery specifying whether to associate the recovery

scenario to thescenario to the current test and/or to all new current test and/or to all new tests.tests.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 67: Qtp-training  A presentation for beginers

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 68: Qtp-training  A presentation for beginers

Components of a Recovery Components of a Recovery ScenarioScenario

The event that interrupts the test run (e.g. a pop up screen or run error)

The operation that needs to be performed in order to continue running the test.

The instructions on how the test should proceed once the recovery operation is performed.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 69: Qtp-training  A presentation for beginers

Steps to add a Recovery Steps to add a Recovery Scenario…contdScenario…contd

After clicking on HAND, select the message/ error window. The click on Next.04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 70: Qtp-training  A presentation for beginers

Steps to add a Recovery Steps to add a Recovery Scenario…contdScenario…contd

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 71: Qtp-training  A presentation for beginers

Steps to add a Recovery Steps to add a Recovery Scenario…contdScenario…contd

After clicking on HAND, select the OK button in the Error/Message window.04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 72: Qtp-training  A presentation for beginers

Steps to add a Recovery Steps to add a Recovery Scenario…contdScenario…contd

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 73: Qtp-training  A presentation for beginers

Steps to add a Recovery Steps to add a Recovery Scenario…contdScenario…contd

Give a name and description to the recovery scenario

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 74: Qtp-training  A presentation for beginers

Steps to add a Recovery Steps to add a Recovery Scenario…contdScenario…contd

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 75: Qtp-training  A presentation for beginers

DebuggingDebugging The The PausePause option in the Debug menu is used to option in the Debug menu is used to

temporarily suspend the run. To resume running a temporarily suspend the run. To resume running a paused test, click the paused test, click the RunRun button. button.

The The StepIntoStepInto(F11) option in the Debug menu is (F11) option in the Debug menu is used to run the current line of the test. If the current used to run the current line of the test. If the current line of the active test or component calls another line of the active test or component calls another action or a function, the called action/function is action or a function, the called action/function is displayed in the QuickTest window, and the test or displayed in the QuickTest window, and the test or component pauses at the first line of the called component pauses at the first line of the called action/function.action/function.

Step Out Step Out Choose Choose Debug Debug > > Step Out Step Out or click the or click the Step Out Step Out button, or press button, or press SHIFT+F11SHIFT+F11 only after only after using using Step Into Step Into to enter a action or a user-defined to enter a action or a user-defined function. function. Step Out Step Out runs to the end of the called runs to the end of the called action or user-defined function, then returns to the action or user-defined function, then returns to the calling action and pauses the run session.calling action and pauses the run session.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 76: Qtp-training  A presentation for beginers

BreakpointBreakpoint

The The Insert\Remove BreakpointInsert\Remove Breakpoint(F9) option in the (F9) option in the Debug menu is used to stop a test run at a pre-Debug menu is used to stop a test run at a pre-determined place in a test.determined place in a test.

To set a breakpoint:To set a breakpoint:

1 1 Click a step or a line in the test or component Click a step or a line in the test or component where you want the run to stop.where you want the run to stop.

2 2 Choose Choose Debug > Insert/Remove BreakpointDebug > Insert/Remove Breakpoint, , press F9, or click the press F9, or click the Insert/Remove Insert/Remove Breakpoint Breakpoint button. The breakpoint symbol is button. The breakpoint symbol is displayed in the left margin of the Keyword View displayed in the left margin of the Keyword View and Expert View.and Expert View.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 77: Qtp-training  A presentation for beginers

Debug ViewerDebug Viewer

The The DebugViewerDebugViewer option in the View menu option in the View menu is used to view, set, or modify the current is used to view, set, or modify the current value of objects or variables in the value of objects or variables in the test,when a test stops at a breakpoint. test,when a test stops at a breakpoint.

To open the Debug Viewer pane:To open the Debug Viewer pane:1 1 Run a test or component with one or more Run a test or component with one or more

breakpoints.breakpoints.2 2 When it pauses at a breakpoint, choose When it pauses at a breakpoint, choose

View > Debug Viewer View > Debug Viewer or click the or click the Debug Viewer Debug Viewer button.button.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 78: Qtp-training  A presentation for beginers

Debug ViewerDebug Viewer

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 79: Qtp-training  A presentation for beginers

Debug Viewer ..CntdDebug Viewer ..Cntd Watch Expressions Tab: Watch Expressions Tab: Use the Watch Expressions Use the Watch Expressions

tab to view the current value of any variable or VBScript tab to view the current value of any variable or VBScript object that you enter in the Watch Expressions table. object that you enter in the Watch Expressions table. Paste or type the name of the object or variable into the Paste or type the name of the object or variable into the Name Name column and press ENTER to view the current column and press ENTER to view the current value in the value in the Value Value column.column.

Variables Tab :Variables Tab :Use the Variables tab to view the current Use the Variables tab to view the current value of all variables, in the current action or selected value of all variables, in the current action or selected subroutine, identified up to the point where the test or subroutine, identified up to the point where the test or component stoppedcomponent stopped

Command Tab :Command Tab :Use the Command tab to execute a line Use the Command tab to execute a line of script in order to set or modify the current value of a of script in order to set or modify the current value of a variable or VBScript object in your test or component.variable or VBScript object in your test or component.

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com

Page 80: Qtp-training  A presentation for beginers

ConceptsConceptsThank YouThank You

04/10/2304/10/23 www.ramupalanki.comwww.ramupalanki.com