80
QTP 8.2 QTP 8.2 QUICK TEST PROFESSIONAL QUICK TEST PROFESSIONAL 8.2 8.2

QTP TUTORIAL WITH PPT

Embed Size (px)

Citation preview

Page 1: QTP TUTORIAL WITH PPT

QTP 8.2QTP 8.2

QUICK TEST QUICK TEST PROFESSIONAL 8.2PROFESSIONAL 8.2

Page 2: QTP TUTORIAL WITH PPT

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

Page 3: QTP TUTORIAL WITH PPT

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.

Page 4: QTP TUTORIAL WITH PPT

Why QTPWhy QTP Ease of use:Ease of use:

1.1. QTP allows even novice testers to be productive in minutes. You can QTP allows even novice testers to be productive in minutes. You can create a test script by simply pressing a Record button and using an create a test script by simply pressing a Record button 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 checkpoints for any Using the Active Screen facility, several types of checkpoints 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 clicking on that object in the Active Screen.simply by clicking on that object in the Active Screen.

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

QuickTest Professional supports functional testing of all popular QuickTest Professional supports functional testing 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 .

Page 5: QTP TUTORIAL WITH PPT

Add-in ManagerAdd-in Manager

Page 6: QTP TUTORIAL WITH PPT

Keyword ViewKeyword View

Page 7: QTP TUTORIAL WITH PPT

Expert ViewExpert View

Page 8: QTP TUTORIAL WITH PPT

Create the Basic TestCreate the Basic Test

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

Page 9: QTP TUTORIAL WITH PPT

Record User ActionsRecord User Actions

Page 10: QTP TUTORIAL WITH PPT

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

Page 11: QTP TUTORIAL WITH PPT

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..

Page 12: QTP TUTORIAL WITH PPT

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.

Page 13: QTP TUTORIAL WITH PPT

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.

Page 14: QTP TUTORIAL WITH PPT

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.

Page 15: QTP TUTORIAL WITH PPT

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 option in the Test menu is used to run the

test from a selected step to the end of the current action, if running test 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.

Page 16: QTP TUTORIAL WITH PPT

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).

Page 17: QTP TUTORIAL WITH PPT

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.

Page 18: QTP TUTORIAL WITH PPT

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.

Page 19: QTP TUTORIAL WITH PPT

Object RepositoryObject Repository

Object List Object Properties

Object Name and Class

Page 20: QTP TUTORIAL WITH PPT

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..

Page 21: QTP TUTORIAL WITH PPT

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 applicationof an object in any open application. Click the . 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.

Page 22: QTP TUTORIAL WITH PPT
Page 23: QTP TUTORIAL WITH PPT

Object IdentificationObject Identification

Page 24: QTP TUTORIAL WITH PPT

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.

Page 25: QTP TUTORIAL WITH PPT

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.

Page 26: QTP TUTORIAL WITH PPT

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.

Page 27: QTP TUTORIAL WITH PPT

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

Page 28: QTP TUTORIAL WITH PPT

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.

Page 29: QTP TUTORIAL WITH PPT

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.

Page 30: QTP TUTORIAL WITH PPT

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

Page 31: QTP TUTORIAL WITH PPT

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.

Page 32: QTP TUTORIAL WITH PPT

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

Page 33: QTP TUTORIAL WITH PPT

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..

Page 34: QTP TUTORIAL WITH PPT

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.

Page 35: QTP TUTORIAL WITH PPT

How Checkpoints Work - How Checkpoints Work - PlaybackPlayback

ScriptScript Expected ResultExpected Result

Execute checkpoint

Object: ButtonLogical Name : OKProperty: EnabledValue: True

Actual = expected ?

Test Results

PASS

Page 36: QTP TUTORIAL WITH PPT

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 Element

Page 37: QTP TUTORIAL WITH PPT

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

Page 38: QTP TUTORIAL WITH PPT

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.

Page 39: QTP TUTORIAL WITH PPT

Table CheckpointTable Checkpoint

Page 40: QTP TUTORIAL WITH PPT
Page 41: QTP TUTORIAL WITH PPT

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

The Database Query Wizard opensThe Database Query Wizard opens..

Page 42: QTP TUTORIAL WITH PPT

Database Checkpoint ..contdDatabase Checkpoint ..contd

Page 43: QTP TUTORIAL WITH PPT
Page 44: QTP TUTORIAL WITH PPT

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

Page 45: QTP TUTORIAL WITH PPT

Output ValuesOutput Values

Output Value is used to Output Value is used to retrieve the 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.

Page 46: QTP TUTORIAL WITH PPT

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

Page 47: QTP TUTORIAL WITH PPT

Types of Output ValuesTypes of Output Values

Standard Output Standard Output ValuesValues

Text Output ValuesText 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 applicationthe application

Page 48: QTP TUTORIAL WITH PPT

Text Area Output Text Area Output ValuesValues

Database Output Database Output ValuesValues

XML Output ValuesXML Output Values

To output text To output text strings displayed strings displayed within a defined area within a defined area of the applicationof the 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

Page 49: QTP TUTORIAL WITH PPT

How to use Output ValueHow to use Output Value

Select the output to be considered

Select the Property

Page 50: QTP TUTORIAL WITH PPT

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

Output Value

Page 51: QTP TUTORIAL WITH PPT

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 timetime..

Page 52: QTP TUTORIAL WITH PPT

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

Page 53: QTP TUTORIAL WITH PPT

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.

Page 54: QTP TUTORIAL WITH PPT

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

Page 55: QTP TUTORIAL WITH PPT

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.as values in the test. We can specify 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 100and 100..

Page 56: QTP TUTORIAL WITH PPT

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.

Page 57: QTP TUTORIAL WITH PPT

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.

Page 58: QTP TUTORIAL WITH PPT

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

Page 59: QTP TUTORIAL WITH PPT

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, each test begins with a single default, each test begins with a single actionaction. .

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

Page 60: QTP TUTORIAL WITH PPT

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-usable: Action can be used in the Non-re-usable: Action can be used in the

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

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

Page 61: QTP TUTORIAL WITH PPT

External: These are reusable actions External: 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.

Page 62: QTP TUTORIAL WITH PPT

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

Actions Tool Bar contains buttons and a Actions Tool Bar 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.

Page 63: QTP TUTORIAL WITH PPT
Page 64: QTP TUTORIAL WITH PPT

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

Page 65: QTP TUTORIAL WITH PPT

How to Call a Reusable ActionHow to Call a Reusable Action

Insert Call to existing Action

Page 66: QTP TUTORIAL WITH PPT

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

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

continuecontinue choosing a post-recovery test run operationchoosing a post-recovery test run operation specifying a name and description for the specifying a name and description 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.

Page 67: QTP TUTORIAL WITH PPT
Page 68: QTP TUTORIAL WITH PPT

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.

Page 69: QTP TUTORIAL WITH PPT

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.

Page 70: QTP TUTORIAL WITH PPT

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

Page 71: QTP TUTORIAL WITH PPT

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.

Page 72: QTP TUTORIAL WITH PPT

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

Page 73: QTP TUTORIAL WITH PPT

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

Give a name and description to the recovery scenario

Page 74: QTP TUTORIAL WITH PPT

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

Page 75: QTP TUTORIAL WITH PPT

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 > Step Out Debug > Step Out or click the or click the Step Out Step Out button, or press SHIFT+F11 only after button, or press SHIFT+F11 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.

Page 76: QTP TUTORIAL WITH PPT

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 testdetermined 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.

Page 77: QTP TUTORIAL WITH PPT

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.

Page 78: QTP TUTORIAL WITH PPT

Debug ViewerDebug Viewer

Page 79: QTP TUTORIAL WITH PPT

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.

Page 80: QTP TUTORIAL WITH PPT

ConceptsConceptsThank YouThank You