Automation notes

47
Ome sai Ram Ome namo venkatesaya Srinivasaya Govindaya Narayanaayaaaaaaaaaaaaah Ways of Testing: There are two ways of Testing 1.Manual Testing 2.Automation Testing 1.Manual Testing: It is a way of testing in which one will perform all the phases of software testing life cycle like Test planning, Test development, Test execution, Result analysis, Bug tracking, and Reporting are accomplished manually, successfully with human efforts Drawbacks of Manual Testing: More number of people are required Time consuming Human mistakes (no accuracy) Tiredness Simultaneous action are not possible Cannot repeat the same task again and again in a perfect manner. 2.Automation Testing: Automation testing is a process in which all the drawbacks of manual testing are addressed properly and provides speed and accuracy to the existing testing process. Drawbacks of Automation Testing: Tools are expensive Cannot automate all the area Lack of experts Automated Tool: Automated tool is an assistant of a test engineer, which works based on the instructions and information given by a test engineer. General Frame Work to learn any automated Tool: A test engineer should learn the following to work with any automated tool How to give the instructions? Hoe to give the information? How to use its recording facility? Hoe to use its play back facility? How to analyze the results? [email protected]

Transcript of Automation notes

Page 1: Automation notes

Ome sai RamOme namo venkatesaya

SrinivasayaGovindaya

Narayanaayaaaaaaaaaaaaah

Ways of Testing:There are two ways of Testing

1.Manual Testing2.Automation Testing

1.Manual Testing: It is a way of testing in which one will perform all the phases of software

testing life cycle like Test planning, Test development, Test execution, Result analysis, Bug tracking, and Reporting are accomplished manually, successfully with human effortsDrawbacks of Manual Testing:

• More number of people are required • Time consuming• Human mistakes (no accuracy)• Tiredness• Simultaneous action are not possible• Cannot repeat the same task again and again in a

perfect manner.2.Automation Testing:

Automation testing is a process in which all the drawbacks of manual testing are addressed properly and provides speed and accuracy to the existing testing process.Drawbacks of Automation Testing:

• Tools are expensive• Cannot automate all the area• Lack of experts

Automated Tool:Automated tool is an assistant of a test engineer, which works based on the

instructions and information given by a test engineer.

General Frame Work to learn any automated Tool:A test engineer should learn the following to work with any automated tool

• How to give the instructions?• Hoe to give the information?• How to use its recording facility?• Hoe to use its play back facility?• How to analyze the results?

[email protected]

Page 2: Automation notes

Types of Automated Tools:A black box testing tools are broadly divided in to Three types

1. Functional tools (QTP, Win runner)2. Management Tools (Test Director/Quality

Center)3. Performance tools (Load Runner)

QTP (Quick Test Professional)Type Of The Tool: Functional ToolCompany: Mercury Interactive incorporationScripting Language: VB- ScriptVersion: #5.5,#6.5,#7.0,#7.6,#8.0,#8.2(2005),#9.0,#9.1,#9.2

Anatomy of QTP:

Vbwindow(“emp”).vbedit(“ename”).set ”Sri Balaji”Vbwindow(“emp”).vbedit(“eage”).set”27”Vbwindow(“emp”).vbedit(“esal’).set”20000”Vbwindow(‘emp”).vbedit(“edeisig”).set”TE”Vbwindow(“emp”).vbedit(“submit”).set click.

[email protected]

E name

E age

E Sal

E Desig

Submit

EMP

Page 3: Automation notes

VbWindow("VbWindow").VbEdit("VbEdit").Set "10"VbWindow("VbWindow").VbEdit("VbEdit_2").Set "20"VbWindow("VbWindow").VbButton("ADD").ClickVbWindow("VbWindow").VbButton("SUB").ClickVbWindow("VbWindow").VbButton("MUL").ClickVbWindow("VbWindow").VbButton("DIV").ClickVbWindow("VbWindow").VbButton("CLEAR").Click

Adding Manager:Adding manager is a feature provided by QTP which is used for showing

all the list of adding’s while opening the QTP so that the user can select the desired adding’s and then enter in to the QTP, Before the user access the QTP the adding manager will make the QTP compatible with all the selected environments.

By default QTP is always compatible with standard window’s environment.Whenever we purchase QTP we get Three built-in adding’s.

1.Activex2.Visual Basic3.Web.

A part from the above add-ins one needs to purchase the add-inns by paying extra cost.

QTP screen can be divided in to five parts1.Test Pane2.Active screen3.Data Table4.Debug Viewer Pane5.Tool Options

1.Test Pane:Test pane is an area provided by QTP, which is used for developing,

viewing, and modifying the test screen. It represents the test scripts in two views

[email protected]

Page 4: Automation notes

(a). Expert view (b). Key word view(a). Expert view: It represents the script in VB script format(b). Keyword view: Keyword view represents the script using a graphical user interface (GUI) which is further divided in to four parts.

• Item• OperationValue• Documentation

2.Active Screen:Active screen is an area provided by QTP, which holds the snapshots of each and

every script statements and used for the following.• Easily understanding the script• Easily enhancing the script.

3.Data-Table:The date table is originally called as formula1 sheet developed by third party and

integrated with QTP.Features:

• It is used for holding the test data• It isolates the test script from the data source.• It provides the facility to import the test data from

different data sources like excel files, data base and flat files (a file with out having format)

• It allows the user to interact with the data directly

Note: QTP maintains two copies of data tablesi. Design time data tableii. Run time data table

4. Debug Viewer Pane:Definition of Debugging: Debugging Is a process of executing the script or a

program in a user desired passion with some temporary breaks in order to identify the errors.

Debug viewer pane is an area provided by QTP which is used for viewing, modifying or setting the current values of variables or expressions during the execution break with the help of three Tabs by name Watch expression, Variables and Command

5.Tool- Options:All the options available in the menu bar, file tool bar and testing tool bar are

known as tool-options.

RECORDING AND [email protected]

Page 5: Automation notes

Record and Run Settings:For every new test one has to compulsorily do this settings before recording or

running. These settings will make to understand on which applications it need to concentrate while recording or running.

Navigation:• Activate the menu item test• Select the option record and run settings• Select one of the following options

Record and run test on any opened windows based applicationRecord and run on these application (opened on session start)

• If at all second option is selected then click on add button• Browse the desired application part• Click on OK• Click on apply & OK.

Operational overview of Recording:During recording QTP will do the following..

1. It will generate corresponding script statements for every user action on the application.

2. It will store the required related information in the object repository.

Operational overview of Running:During running QTP will doing the following..

1. It will read the script statement and understands what action to be performed on which object.

2. Then it realizes it need to identify the object first to perform the action

3. To identify the object it requires some information for that information it will go the object repository and search.

4. Once the information is found using this information it will try to identify the original object.

5. Once the object is identified it will perform the action on it.

Recording Modes:There are there types of recording mode

(a). Context sensitive recording mode or Normal recording mode(b). Analog Recording Mode(c). Low-level Recording mode.

(a). Context sensitive Recording mode:It is used for recording the operations performed on the standard GUI

object in different situations

[email protected]

Page 6: Automation notes

(b). Analog Recording Mode:It is a special recording mode provided by QTP, which is used for

recording the continuous operations

Navigation:• Keep the tool under normal recording mode• Activate the menu item test• Select the option analog recording• Select one of the following option

o Record relative to the screeno Record relative to the following window

• If at all second option is selected specify the window title with the help of the Hand Icon

• Click on start analog record

(c). Low-Level Recording:It is a special recording mode provided by QTP, which is used for

recording at least some minimum operations on the non-supported environments also.

OBJECT REPOSITORY

Object Repository:Object repository is a storage place where one can store the objects

information and it also acts as interface betweenn the test script and the AUT(application under test) in order to identify the original objects during execution

Types of Object Repository:There are two types of object repository they are

1. Per-Action Repository2. Shared Repository

(1). Per-Action Repository:If at all this type is selected as an object repository then the QTP will be

automatically creating and managing an individual repository for every action.(2). Shared Repository:

Shared repository has to be created and managed manually once a shared repository to created it can be shared among number of tests

Advantages:• Easy to maintain

[email protected]

Page 7: Automation notes

• Re-usability

Navigation for creating a shared Repository or Converting a per action in to shared:

• Collect the objects information in to the object repository• Click on export• Browse the desired location• Specify the file name with .TSR extension• Click on save button

Navigation for Creating the Shared Repository to the currant test:• Activate the menu item test• Select the option settings• Select the resources tab• Select the option shared in the object repository type

section• Browse the desired repository file• Click on apply & OK

Note: .TSR means Test Shared Repository

OPERATIONS ON OBJECT REPOSITORY

Navigation for adding the objects in to the object repository:

• Open the object repository • Click on add objects button• Click on the title bar of the window• Click on ok• Select one of the following options

o Only the selected objectso Selected objects and all its direct childreno Selected objects and all its descendents

• Click on OK

Navigation for deleting the objects form the object repository:• Select the desired object to be deleted in the object

hierarchy• Right click on it• Select the option delete• Confirm the deleting by clicking on

Navigation for Re naming the objects:

[email protected]

YES

Page 8: Automation notes

Select the desired object in the object hierarchy• Right click on it • Select the option Rename• Specify the desired name

Navigation for updating the properties list:• Select the desired object in the object hierarchy• Click on add/Remove button• Select the desired properties to be added in to the

properties list• Deselect the properties to be removed from the properties

list• Click on OK

Highlight:Highlight button is used for highlighting the corresponding object in the

AUT so that a test engineer can clearly understand which objects information is that.

OBJECT IDENTIFICATION

Object identification:Object identification is based on four types of properties and an ordinal

identifier

Types of properties:1. Mandatory Properties2. Assistive properties3. Base-Filter Properties4. Optional Filter properties

A test engineer can specify the list of mandatory properties, List of assistive properties, List of base filter properties, list of ordinal filter properties and an ordinal identifier.

QTP learns the information in the following in case only normal brain:First of all the QTP will learn all the mandatory properties at a time and then think weather these properties are sufficient to identify the object uniquely. If it feels sufficient then it will stop learning otherwise it will learn the first assistive property and once again stops and thinks weather these properties are sufficient to identify the object uniquely. If it feels sufficient then it stops learning otherwise learns the second assistive property and checks weather these properties are sufficient or not. This process continuous till the QTP satisfies or up to the end of the assistive properties list. At the end of the assistive properties list also if it feels not satisfied then it will finally learn the ordinal identifier and stops [email protected]

Page 9: Automation notes

QTP learns the information in the following way in case of smart brain also:While learning the mandatory properties along with them it will learn the

base filter properties, optional filter properties and stores them in the secret place.It considers the mandatory properties only and check weather these

properties are sufficient to identify the object uniquely. and repeats the above process.

Note: In the above learning process except base filter properties and optional filter properties all the remaining information learnt will be stored in the object repository.

QTP will use the information in the following way to identify the object during execution:

First of all QTP will use all the properties present in the object repository except ordinal identifier and try to identify the object. If at all the object is not identified then it will forget about all these properties and freshly enters in to the secret place.

QTP will consider all the base filter properties and try to identify the object and forms a list of all the objects that are matched with the base filter properties.If the list contains only one object then that is the object otherwise it will take the support of first optional filter property and try to match with all the object present in the list and forms a new list of all the objects that are matched with that property and then check weather the list is containing one object or more that one object. If the list is containing more than one object then it will consider the second optional filter property and repeats the whole procedure till the list contains on object or up to the end of the optional properties list. At the end of the optional filter properties list also if the list is containing more than one object then it will finally go to the object repository and check weather the ordinal identifier is available or not. If at all the ordinal identifier is available it will identify the object roughly using that otherwise HANDSUP.

Ordinal Identifiers:There are three types of ordinal identifiers

1.Location2.Index3.Creation time

1.Location:If at all the location is selected, as an ordinal identifier then the QTP will

generate a sequence of numbers from 0,1,2,3 based on the sequence of the objects located in AUT.

2.Index:If at all the index is selected as an ordinal identifier than the QTP will

generate the numbers from 0,1,2,3…. Based ob the sequence of the programs of the objects.

[email protected]

Page 10: Automation notes

3.Creation Time (specially for web pages):If at all creation time is selected as an ordinal identifier the QTP will

generate the number from 0,1,2,3,… based on the loading time of the web pages

Smart Identification:When ever the QTP is unable to identify the objects with the help of the

properties present in the object repository then the special mechanism provided by QTP to identify the object smartly with some other properties is known as smart identification.

Navigation for Object identification Configuration:

• Activate the menu item tools• Select the option object identification• Select the desired environment • Select the desired object type• Specify the desired list of mandatory properties and assistive

properties with the help of corresponding add/ remove buttons• Select the ordinal identifier• Smart identification• Select the check box enable smart identification• Click on configure button• Specify the desired list of base filter properties and optional filter

properties with the help of add/remove buttons• Click on OK• Click once again on Ok

Object Spy:Object spy is a handy feature provided by QTP which is used for showing

the complete objects information like list of properties and their values, list of methodology, syntax for methodology and description of methods then and there on the spot immediately of both test objects as well as runtime objects.Navigation for Object SPY:

• Activate the menu item tools• Select the option object spy• Click on the hand icon• Click on the desired object

Types Of Objects:There are two types of objects 1.Run time objects

2.Test objects

1.Run time objects:

[email protected]

Page 11: Automation notes

All the original objects present in the AUT are known as run time objects

2.Test Objects:Test objects are the reference objects created by the QTP for run time

objects, stored in object repository and used by the QTP for the original objects

QTP LIFE CYCLE

QTP life cycle contains Six phasesI. Test planningII. Generating the basic testIII. Enhancing the test IV. Debugging the testV. Executing the testVI. Analysis the Results

I. Test Planning:In this phase the automation test lead will do the following

1. Under standing the requirements2. Identifying all the areas to be automated3. Analyzing both the negative and positive flow of the

application4. Preparing the automation test plan document based on the

analysis5. Preparing the tool ready with all the pre configurational

settings for the further operations

[email protected]

Page 12: Automation notes

II. Generating the basic test:In this phase the automation test engineer will generate the basic test

engineer will generate the basic test for both the +ve and –ve flow of the applicationIIII. Enhancing the Test:

One can enhance the script in the following ways1. Inserting the check points2. Synchronizing the test3. Parameterising the test (Data Driven Testing)4. Inserting the out put value statements5. Inserting the transactional points for measuring

transactions6. Inserting the programmatic statements7. Adding comments8. Inserting the script statement manually

1.Check Point:Checkpoint is defined as validation pointer test point which checks the

objects state or bitmap state or data state during execution at any point of time

Operational over view of checkpoint:Checkpoint works in two phases

i. Pre-execution Phase:• It captures the expected value• Generates the corresponding test script statement

ii. While-execution phase:• It captures the actual value• Compared the actual value with the expected value• Displays the result

Types Of Checkpoints:

a. Standard checkpointsb. Bitmap checkpointc. Text checkpointd. Text area checkpointe. Data base checkpointf. XML checkpointg. Page checkpointh. Table checkpointi. Image checkpointj. Accessibility checkpoint

[email protected]

Hidden CheckpointsFor Web Checkpoints

Page 13: Automation notes

a. Standard Checkpoints:

Standard checkpoint is used for checking the standard GUI objects properties value, it can be inserted in two ways

i. Through applicationii. Through Active Screen

Navigation through application:

• Keep the cursor in the desired location• Keep the tool under recording mode• Activate the menu item insert• Go to checkpoint• Select the option standard checkpoint• Click on the desired object in the AUT• Click on OK• Select the desired properties to be checked• Specify the desired expected values• Click on OK• Stop Recording

Navigation through active screen:

• Keep the cursor on the desired statement so that the corresponding snapshot is displayed in the active screen

• Go to active screen right click on the desired object• Select the option insert standard check point• Click on OK• Select the desired properties to be checked• Specify the desired expected values• Select one of the following options• Select one of the following options

o Before current stepo After current stepo Click on OK

(b) Bitmap checkpoints:Bitmap checkpoint is used for checking the complete bitmap or apart

of a bitmap. It can be inserted in two waysi. Through applicationii. Through Active Screen

[email protected]

Page 14: Automation notes

Navigation through application:• Keep the cursor in the desired location of the screen• Keep the tool under recording mode• Activate the menu item insert• Select the option bitmap check point• Click on the desired bitmap• Click on OK• If at all one need select a part of bitmap then select it using the

select area button• If at all one need save only the selected part then select the check

box save only selected area • Click on OK

Navigation Through Application:• Keep the cursor on the desired statement so that the corresponding

is displayed in the active screen• Go to the active screen• Right click on the bit map• Select the option insert bitmap check point • Click on OK• If at all one need to select a part of bitmap then select it using

select area button• IF alt all one need to save only the selected part select the check

box save only selected area• Select one of the following option

o Before currant stepo After currant step

• Click on OK

(C). Text Checkpoint:Text checkpoint is used for checking the text present on a specified

object. It can be inserted in two waysi. Through applicationii. Through Active

Navigation through application:• Keep the cursor in the desired location of the screen• Keep the tool under recording mode• Activate the menu item insert• Click on check point• Click on text checkpoint• Click on the desired text• Select the following option

[email protected]

Page 15: Automation notes

o Match caseo Exact matcho Ignore spaceo Text not displayedClick on OK

Navigation through Active Screen:• Keep the cursor on the desired location so that the

corresponding snapshot is available in the active screen• Right Click on the desired position• Click on insert text checkpoint• Click on desired text• Select the following option

o Match caseo Exact matcho Ignore space

Text not displayedClick on ok

(d) Text Area Check Point:Test area checkpoint is used for checking the test presenting

a specified area. It can be inserted only through the application but not through the active screen

Navigation through application:

• Keep the cursor on the desired location of the screen• Keep the tool under recording mode • Activate the menu item insert• Select the opinion text area checkpoint• Select the exact area through cross hair pointers• Choose the following options

o Match caseo Exact matcho Ignore spaceo Text not displayed• Click on OK• Stop Recording

(e) Data Base Checkpoint:Data base check point is used for checking the contents of the data base

Navigation:• Activate menu item insert

[email protected]

Page 16: Automation notes

• Go to check point • Select the option data base checkpoint• Select the option specify AQL statement manually• Click on meet• Click on create• Click on new• Select the desired driver• Slick on next• Click on finish• Click on select• Select the desired database• Click on ok• Click on ok• Click on ok• Specify the designed query statement• Click on finish• Select the desired contents to be checked• Select one of the following option

o Before current stepo After current step

• Click on ok

(f) XML Check Point:XML is an universally understandable language which is mainly

used for data informationNote: XML check point is used fro checking the contents of an XML file

Navigation:• Activate the menu item insert go to check point• Select the option XML check point• Browse the desired XML file• Click on OK• Select the desired contents to de checked• Select one of the following option

o Before current stepo After current stepClick on OK

(g) Table Check Point:This is used for checking the contents of a table

Navigation:• Keep the cursor on the desired statements, so that the

corresponding page will be displayed in the active screen• Go to active screen

[email protected]

Page 17: Automation notes

• Right click on the page• Select the option, Insert standard check point• Select the desired table in the object hierarchy • Click on ok• Select the desired properties to be checked• Select one of the following option

o Before currant stepo After currant step

• Click on ok

(h) Image Check Point:This is used for checking the properties of an image

Navigation:• Keep the cursor on the desired statement, so that the corresponding page will be

displayed in the active screen• Go to the active screen• Right click on the page• Select desired image in the object hierarchy• Click on ok• Select on ok• Select the desired properties to be checked• Select the one of the properties to be checked

o Before currant stepo After currant step

• Click on ok

(i) Accessibility Check point:Accessibility check point is used for checking the w3c standards( for web

consortium standards) in order to confirm weather the page can be accessed all over the world or not

Navigation:• Keep the cursor on the desired statement sot heat the corresponding page is

displayed in the active screen• Go to the active screen • Right click on the page• Select one of the following options

o Before currant stepo After currant step

• Click on ok

[email protected]

Page 18: Automation notes

2.Synchroniztion:Synchronization is a process of matching the speeds of both the tool and the

application in order to keep them in sync with each other to obtain proper testing resultsHere the main concept is making the tool to wait till the application finishes its work it

can be done in three ways1. Inserting the synchronization point2. Increasing the default time3. Inserting the wait statement

Navigation for inserting the synchronization point:

• Keep the cursor in the desired location• Keep the tool under recording mode• Activate the menu item insert• Go to step select the option sync point• Click on desired object• Click on ok• Select the desired property• Specify the desired property value• Specify desired extra time• Click on ok• Stop recording

In order to avoid above navigation one can directly type the statement in the desired location with the following syntax:SYNTAX: Object hierarchy. Wait property ”Property name” property value, extra time in millisecondsExample: Window (“flight reservation”).win button(“delete order”).wait property”enabled”,true,17000

Navigation for increasing the default time:-• Activate the menu item test• Select the option settings• Select the run tab• Specify the desired time in milliseconds in the object synchronization

time out field• Click on apply and ok

Syntax for Wait Statement:Wait (time in seconds)

Example: Wait (17)

Data Driven Testing: -Data driven testing is a concept introduced in the automation in order to implement re-

testing

Steps to be followed to perform data driven testing:[email protected]

Page 19: Automation notes

• Collect the test data in to the data table• Generate the basic test• Parameterize the test• Execute the Test• Analyze the result

Parameterization:Parameterization is a process of replacing the constant values with parameters or

variables in order to increase the scope of the test. Parameterize can be done in three ways1.Through data driver wizard2.Through key word view3.Manually

Navigation Through Data Driver Wizard:• Activate the menu item tools• Select the option data driver• Click on parameterize• Click on next• Click on the parameter option button• Select the desired column name• Click on ok• Click on next• Click on finish• Finally click on ok

Navigation Through Key word view:• Go to key word view• Select the desited constant value• Click on configure the value button• Select the option parameter• Select the desired column name• Click on ok

To avoid the above navigation one can directly type manually as follows:

A= datatable(“v1”,1)Vbwindow(“form1”).vbedit(“val1”).set AVbwindow (“form1”).vbedit(“val2”).set datatable(“v2,1)Vbwindow(“form1”).vbbutton(“Add”).ClickVbwindow(“form1”).vbedit(“res”).check checkpoint(“RES”)

Navigation for parameter zing the check point:• Right click on the check point statement• Select the option check point properties• Select the option parameter• Click on the parameter options button

[email protected]

Page 20: Automation notes

• Select the desired column name• Click on ok• Once again click on ok

4.OUT PUT VALUE: -Out put value is a feature provided by QTP, which is used for capturing a value from an

application or from a database or from a XML file and stores it under specified column in the runtime data table

Operational overview of out put value: -The out put value feature works in two phases

1. Pre-Execution Phase2. While –Execution Phase

1.Pre-Execution phase:It will capture the field name from which it need to capture the valueIt will generate the corresponding script

2.While-Execution phase:Captures the actual value from the fieldStores it under a specified column in the run time data table

Types of Out Put Values:There are five types of out put values…

1.Standard Out Put Value: - It is used for capturing property value of a standard GUI object2.Text Out Put Value: - It is used for capturing the text present on a specified object3.Text-Area Out Put Value: - It is used for capturing the Text present in a specified area4.Data Base Out Put Value: - It is used for capturing a value from the database5.XML Out put Value: - It is used for capturing a value from the XML file

Navigation for Standard Out put value through application:• Keep the cursor in the desired location• Keep the tool under recording mode• Activate the menu item insert• Go to out put value• Select the option standard out put value• Click on the desired object in the AUT• Click on OK• Select the desired property to be captured• Click on modify• Specify the desired column name• Click on Ok• Once again click on ok

[email protected]

Page 21: Automation notes

• Stop recording

Navigation For standard check point through Active Screen

• Keep the cursor under the desired location• Click on active screen• Right click on desired location• Click on insert output value• Click on ok• Select the desired property• Click on modify• Specify the desired column name• Click on ok• Once again click on ok.

5.Inserting the transaction points for measuring the transaction: -

It is a concept introduced in QTP which is used for calculating the time taken by an application to perform a specific task or the execution time of a block of statementTo do the same QTP has provided two options

1.Start transaction2.End transaction

Navigation for inserting transaction points:• Keep the cursor in the desired location• Activate the menu item insert• Select the option start transaction• Specify the transaction name• Select one of the following option

o Before currant stepo After currant step

Click on ok

To avoid the above navigation one can directly type the following statements manually in the desired location

Services.start transaction ”transaction name”----------------------------------------------------------------------------------------------------------Services.end transaction ”transaction name”

6.Inserting the Programmatic statements: -

There are five types of programmatic statements in the V.B script

[email protected]

Page 22: Automation notes

1.Normal statements (or) Object calls2.Conditional statements3.Looping statements4.Comments5.Utility statements

Reporter utility object: -

It is used for reporting an user defined message to the result window

SYNTAX: Reporter.reportevent status,”object name”,”message”Example:Reporter.reporevent micdone,”my report”,”add button is working fine”.

Status:Pass 0Fail 1Done 2Warning 3

IV. Debugging The Test:

Debugging:Debugging is a process of executing the script or aprogram in a user desired passion

with some temporary breaks in order to identify the errorsTo do the same QTP has provided step commands and break point feature.

Step commands: -There are three step commands

1.Step into2.Step Out3.Step over

1.Step into:Step into is used for executing a single statement then it will step in to the function or

action and stops the execution.2.Step Out:

Step out is used for executing all the remaining statements from the position of pointer in the function of the action and comes out of the function or action and stops execution 3.Step Over:

[email protected]

Page 23: Automation notes

Step over is used for executing the single statement if that statement is a function call or action call then it will execute all the statements in side the function or action once and stops the execution

Break Point:Break point is the feature provided by QTP, which is used for breaking the execution

temporarily

Navigation:• Activate the menu item debug• Select the desired option

ExampleFunction my func( )Msg box “Hai”Msg box “hellow”Msg box “How r u”End function

• My funcMsg box “bye”My funcMsg box”see u”My funcMsg “welcome”

Debug viewer Pane:Debug viewer pane is used for viewing, modifying or setting the currant value of

the variables or expressions during the execution break with the help of three tabs by name1.watch expressions2.Variables3.Command

Dim aA= 10B= 20

• Msg box a• Msg box b• Msg box a

V. Executing the Test:In this phase one will execute the test

[email protected]

Page 24: Automation notes

VI. Analyzing the results:In this phase one will analyze the results..

*******************************End Of QTP Life Cycle**************************************************

ADVANCED CONCEPTS

[email protected]

Page 25: Automation notes

Regular Expressions: -When ever the QTP is unable to identify the objects due to the regular changes in the

objects properties values dynamically during the execution then to overcome this problem one need to replace the corresponding property value in the object repository with a suitable regular expression

Navigation:• Open the object repository• Select the desired object in the object hierarchy• Select the desired property in the properties list• Click on the constant value options button• Replace the constant value with suitable regular expression• Select the check box regular expression• Click on ok• Click on ok

Batch Testing Or Batch execution: -Executing a group of script files at a time is known as batch execution. To do the same

QTP has provided a special tool by name test batch runnerBefore using the test batch runner one need to do the following settings in QTP

• Activate the menu item tools• Select the opt option• Select the run tab• Select the check box allow other mercury products to run tests

and components• Click on ok

Navigation for test batch runner:

• Start ProgramsQuick test ProfessionalToolsTest batch runner

• Once the test batch runner is opened add all the desired script files and save it as a batch file with .mtb extension

When ever required open the batch file and execute it

Recovery Scenarios:During the execution QTP may face some problematic situation where in it needs to

recover by itself and continue the execution. To do the same a test engineer would have defined a solution well in advance and made it available to the currant test before starting the execution.

[email protected]

Page 26: Automation notes

QTP may face four types of problematic situations1.Problems related to pop-up window2.Problems related to object state3.Problems related to test execution4.Problems related to application crash

To define the solution for the above problems QTP has provided four trigger events1.Pop up window2.Object state3.Test run error4.Application crash

Navigation for object test:• Activate the menu item tools• Select the option recovery scenario manager• Click on new scenario button• Click on next• Select the trigger event as object state• Click on next• Clixk on next• Click on the hand icon• Click on the desired object in the AUT• Click on ok• Click on next• Specify the desired properties with the help of add/remove button• Click on next• Once again click on next• Select the recovery operation as function call• Click on next• Browse the desired library file• Select the option define new function• Specify the desired function name• Write the body of the function• Click on next• Deselect the check box add another recovery operation• Click on next• Specify the desired scenario name• Click on next• Select the desired check boxes

o Add scenario to the currant testo Ass scenario to default test settings

• Click on finish• Click on save• Browse the desired location and save the file by specifying a file

name with .QRS extension

[email protected]

Page 27: Automation notes

• Click on closeEnvironment Variables:

The variables that may be varied in different environments and need to be used in the multiple scripts, should not be directly used in the scripts. They need to be declare separately in an environment file that file need to be associated to the test and then the variables in that file need to be used in those test so that when ever the values need to be updated in different environments one can update them very easily in the environment

So all the tests using those variables will be automatically updated such kind of variables separately declared in the environment file are known as environment variablesThere are two types of environment variables

1.Built in variables2.User defined variables

1.Built in variables:These variables will be by default available with all the tests so that on can

directly use them in any test with the following syntax

SYNTAX: environment.value(“built invariable name”)Example: var = environment.value(“05”)

Msg box var

2.User defined variables:These variables need to e declared by us according tour need and need to be

stored in a separate environment file. Whenever required one need to associate these files to the currant test and use those variables

Navigation for creating an environment file with environment variables:• Activate the menu item test• Select the option settings• Select the environment tab• Select the variable type as user defined• Click on new• Specify the variable name and the value• Click on ok• Click on export• Browse the desired location• Specify the desired file name with .XML extension• Click on save

To avoid the above navigation one can directly develop the XML file as follows

[email protected]

Page 28: Automation notes

<environment><variable><name> flight path </name><value>”d:\program files\mercury” </value></variable><variable><name> b </name><value>203</value></variable></environment>

Navigation for associating an environment file to the currant test:• Activate the menu item test• Select the option settings• Select the environment tab• Select the variable types as user defined• Select the check box load variables and value from ecternal files• Browse the path of the environment file • Click on apply and ok

In order to avoid the above navigation one can directly type the following script statement in the starting of the script

Syntax: environment. Load from file “path of the env file”

Example: environment. Load from file”d:\envfile122.xml” invoke application environment. Value(“flight Path”)

Virtual object configuration:

Virtual object configuration is a process of making the QTP t treat a specified area or an user defined object as a specific object

Navigation:• Activate the menu item tools• Go to virtual objects• Select the option new virtual object• Click on next• Specify the desired class(type) of the object• Click on next• Mark the area in the application with the help of mark object button• Click on next• Select one of the following options

o Entire parent [email protected]

Page 29: Automation notes

o Parent only• Click on next• Specify the desired object name• Specify the desired collection name• Click on finish

Virtual object manager:Virtual object manager is a feature provided by QTP which is used for creating

and managing the virtual objects

Once a virtual object is created it will be available to all the tests unless until we delete it.

Framework:Framework is a generic work (outline work) or a set of guidelines designed by an expert

to perform a task in an effective, efficient and optimized way

Types of frame works: - (Mainly)1. Linear frame work2. Modular frame work3. Key-word driven frame work4. Hybrid frame work5. Data frame work

1.Linear Framework• Generate the basic test• Enhance the test• Debug the test• Execute the test• Analyze the test

2.Modular Framework:• Develop the individual components for each and every task• Make them as reusable components• Prepare the required drivers based on the end to end scenarios• Execute the drivers• Analyze the result

ActionsACTIONS: Action is a set of script statements used for performing a specific taskTypes of Actions:

There are three types of actions1.Normal actions2.Re-usable actions3.External actions

[email protected]

Page 30: Automation notes

Note: External actions are not editable .The re-usable actions called in another test are known as external actions

Operations On Actions:

Navigation for inserting a new action:• Activate the menu item insert• Select the option call to new action• Rename the desired action• Select the one of the following options

o At the end of the testo After the currant step

• Click on okNavigation for splitting an action in to two actions:

• Save the action• Keep the cursor on the first statement of the second path• Activate the menu item step• Select the option split action• Select one of the following options

o Independent of each othero Nested

• Specify the desired action name • Click on ok

Navigation for making an action as reusable action:• Select the desired action• Activate the menu item step• Select the option action properties• Select the check box reusable action• Click on ok

Navigation for renaming the action:• Activate the menu item step• Select the option action properties• Specify the desired name• Click on ok

Navigation for calling on existing action:• Activate the menu item insert• Select the option key word driven testingcall to existing action• Browse the desired test• Select the desired action• Select one of the following options

o At the end of the testo After the currant stepClick on ok

[email protected]

Page 31: Automation notes

Key word driven framework:• Create the folder structure as follows

• Crate the required test data file and save them in the corresponding folders

• Create the required shared repository files and save them in the corresponding folder

• Create the required library files and save them in the corresponding folder

• Create the required environment files and save them in the corresponding folder

• Create the required recovery files and save them in the corresponding folder

• Open the main test and associate all the required files to each• Develop the script in such a weather it executes based on the key

words specified in the data tableExample:

Var= data table (“keys”,1)Select case varCase “L1”Login( )Ins ord( )Logout( )

Case”L2”Openord( )Logout( )Case “L3”Login( )Logout( )End select

• Specify the desired key words under the corresponding column in the data table and save the test in the corresponding folder

When ever required open the test and execute it and analyze the result

[email protected]

Page 32: Automation notes

Methods

First method – Capture bitmap:It is used for capturing a snap shot of an object or an window during executin and

stores it in the desired location

Syntax: Object hierarchy.capturebitmap “Path of the location with a file name.bmpextension”Example: Window(“flight Reservation”).dailog(“openorder”).winbutton(“ok”).capturebitmap”D:\fl_automation\b1.bmp”

Second Method- Exist method:It is used for checking the objects existence if the object is existing then it will

return a value True, and make the QTP to continue the execution, If at all the object is not existing it will make the tool to wait till object exists. Once the object exists it will return true and make the QTP to continue the execution. If at all the object is not existing up to the maximum time then it will return false and make the QTP to continue the execution

Syntax: variable=object hierarchy.exists(time in seconds)Example: Var= window(“flight reservation”).exists(12)

Wait property:Wait property is used for making the tool to wait based on the object properties value

Syntax: object hierarchy.wait property “property name”, property value, extra time in mille seconds

Wait: it is used for making the tool to wait till the specified time is elapsed.Syntax: Wait” Time in seconds”

Simple and regularly used methods: -

The first method among those is click method.

1. Click method: -Click method is used for clicking on specified object

Syntax: Object hierarchy.click(x,y,[button] )

2. Double click: -It is used for double clicking on a specified object

Syntax: Object hirerarchy.dblclick(x,y, [button])[email protected]

Page 33: Automation notes

3.Set Method: - Set method is used for setting a value in to an edit box or selecting or deselecting acheck box or selecting a radio buttonSyntax: Object hirerearchy.set”value”

Object hierarchy of check box.set “on/off”Object hierarchy of radiobutton.set

Case study-1:Develop the script customer id, custname, currant age, cust phone number and clicking on

submit button

Cust

Vbwindow(“cust”).vbedit(“cust”).set.”Custid”Vbwindow(“cust”).vbedit(“custname”).set”name”Vbwindow(“cust”).vbedit(“custage”).set”age”Vbwindow(“cust”).vbedit(“custphno”).set”phoneno”Vbwindow(“cust”).vbutton(“submit”.click

Second Case studyDevelop the script of selecting Testing tools, sql server, live projects check boxes and clicking on next button..

[email protected]

Cust Id:

Cust Name:

Cust Age:

Cust Ph no:

Submit

Testing ToolsSQL ServerQTPLive Project

NEXT

Page 34: Automation notes

Vbwindow(“mindq”).vbcheckbox(‘testingtools”).set”on”Vbwindow(“mindq”).vbcheckbox(“sqlserver”).set”on”Vbwindow(“mindq’).vbcheckbox(“liveproject”).set “on”Vbwindow(“mindq”).vbbutton(“next”)click

Third Case Study

Develop the script for deselecting the testing tools check box,selecting the QTP and live project check boxes and clicking on next button

Vbwindow(“mindq”).vbcheckbox(“testing tools”).set “off”Vbwindow(“mindq”).vbcheckbox(“QTP”).set”ON”Vbwindow(“mindq”).vbcheckbox(“liveprojects”).set”on”Vbwindow(“mindq”).vbbutton(“next”).click

Fourth Case Study:

Develop the script for entering the name, age, country, and selecting the gender, selecting the check box photo profiles only and clicking on search button

Matrimony

[email protected]

Testing ToolsSQL ServerQTPLive Project

Name

Age

Country

o Maleo Female

Photo profiles only

SEARCH

Page 35: Automation notes

Vbwindow(“matrimony”).vbedit(“name”).set”sri balaji”Vbwindow(“matrimony”).vbedit(“age”).set”25”Vbwindow(“matrimony”).vbedit(“country”.set “India”Vbwindow(“matrimony”).vbradiobutton(“female”).setVbwindow(“matrimony”).vbcheckbox(“photo profile only”).set “on”Vbwindow(“matrimony”).vbbutton(“search”).click

Select Method:Select method is used for selecting an item in a combo box or a list box

Syntax:Object hierarchy.select”item name”

Fifth Case Study:

Develop the script for entering train number, train name, date of journey, selecting starting point, selecting destination point, selecting berth, selecting class

RES

[email protected]

Train No:

Train Name:

Date of Journey:

From

To

UB First A/cLB Second A/CMB Third A/C

Sleeper

Break Fast Lunch Dinner

NEXT

Page 36: Automation notes

Vbwindow(“res”).vbedit(”trainno”).set”2085”Vbwindow(“res”).vbedit(”Trainname”).set”Godavari” Vbwindow(“res”).vbedit(”Date of journey”).set”15-aug-08”Vbwindow(“res”).vbcombobox(“from”).select “Sec”Vbwindow(“res”).vbcombobox(“To”).select”Tpg”Vbwindow(“res”).vbradiobutton(“LB”).setVbwindow(“res”).vbradiobutton(“sleeper”).setVbwindow(“res”).vbcheckbox(“breakfast”).set onVbwindow(“res”).vbcheckbox(“dinner”).set onVbwindow(“res”).vbbutton(“next”).click

Activate Method:It is used for activating a window or a dialog.Syntax: Object hierarchy. Activate

Close Method:It is used for closing the window or a browserSyntax: Object hierarchy. Close

Set Secure:Set secure method is used for setting an encrypted data in to an edit box

Type Method:Type method is used for performing any kind of key board related operationSyntax: Object hierarchy. Type key valueExample:Dialog (“login”). Winedit(“agent name”).type mic tab

Descriptive Programming: -If at all the objects description is specified in the program itself then that type of

programming is known as descriptive programming

Dialog(“text:=login”,”width:=320”).windedit(“attached test:= Agent Name:”)Dialog(“text:=login”).winedit(“attachedtext:=password:”).setsecure xxxxxxDialog (“text:=login”).winbutton(“text:=ok”).clickWindow(“text:=flight reservation’).close

[email protected]

Page 37: Automation notes

GetRoProperty:It is used for getting the currant value of the runtime objects propertySyntax: Variable=Object hierarchy.getroproperty(“property name”)

Sixth Case Study:Develop the script for clicking on a ok button if it is existing and enabled otherwise the corresponding message should be reported to the result window

Form 1

Var= vbwindow.(‘form1”).vb button(“ok’).exixtsIf( var=true) thenVar2= vbwindow.(“form1”).vbbutton(“ok”).getroproperty(”enabled”)If(var2=true) thenVbwindow.(“form1”).vbbutton(“ok”).clickElse Reporter.report edit,3,”my report”,”Ok button is visible”End ifElseReporter.report edit,3,”my report”,”form dowsnot exists”End if

Seventh Case study:Develop the script for selecting the product id, entering quantity, clicking on cal button and checking weather it is working fine or not

PRODUCT

[email protected]

OK

PID

PNAME

PRATE

QUANTITY

AMOUNT

CAL

Page 38: Automation notes

Vbwindow(“product”).vbcombobox(“pid”).select “007”Q=5R=vbwindow(“product”).vbedit(“prate”).getroproperty “Text”EV=r*qVbwindow(“product”).vbedit(“quantity”.set qVbwindow(“product”).vb button(“cal”).clickAV=vbwindow(“product”).vbedit(“amount”).getroproperty “text”If (EV=AV) thenReporter.reportevent, 0,”my report”,”cal button is working”ElseReporter.report event,3,”my report”,”cal button is not working”End if

Simple VB script functions used for comparisons and calculation: -

1. CINT: Used for converting a value in to integer value

2.CSTR: It is used for converting a value in to string

3.CDBL: It is used for converting a value in to Boolean value

4.CBOOL:It is used for converting any value in to Boolean value

5.LTRIM: It is used for trimming the left side spaces

6.RTRIM: It is used for trimming the right side spaces

7.TRIM: It is used for trimming the both side spaces

8.LEFT: It is used for getting the left side sub stringSYNTAX::var=left(string or variable, no of chars)

9.RIGHT: It is used for getting for right side sub stringSYNTAX::var= Right(string or variable, no of chars)

10.MID: It is used for getting the middle sub stringSYNTAX: var=mid (string or variable, starting char no, no of chars)

11.UCASE: It is used for converting a string in to upper case

12.LCASE: It is used for converting a sting in to lower case

[email protected]

Page 39: Automation notes

13.Round: It is used for rounding any decimal value to nearest highest integer

Eight-case study:Develop the script for selecting product id, quantity, clicking on cal button, If it is existing and enabled and checking weather it is working fine or not

Product

Vbwindow(“procuct”).vbcombobox(“productid”).select “007”Q=10Vbwindwo(“product”).vbedit9”prate”).getroproperty(Text”)R= vbwindwo(“product”.vbedit(“prate”.getroproperty(“text”)Ev=R*QVar1= vbwindow(“product”).vbbutton(“cal”).existsIf cstr(var1)=cstr(true) thenVar2=vbwindow(“product”).vbbutton(“cal”).getroproperty”exists”If cstr(var2)=cstr(true) then

Vbwindow(“product”).vbbutton(“cal”).clickAv=vbwindow(“product”).vbedit(“amount”).getroproperty(“text”)If cint(Av)=cint(Ev) then Reporter.report event micpass,”myreport”,”result is pass”ElseReporter.reportevent mic fail,”my report”,”result is fail”End ifElseReporter.reportevent mic warning,”my report”,”cal button does not exists”End ifElseReporter.reportevent mic warning,”my report”,”cal button is disabled”

[email protected]

PID

PNAME

PRATE

QUANTITY

AMOUNT

CAL

Page 40: Automation notes

End if

Get to property:Gettoproperty is used for getting the text objects properties value

SYNTAX: var= object hierarchy.gettoproperty (“property name”)Example: var= vbwindow9”form1”).vbbutton(“add”).gettopropery(“text”)

Note: Text objects property means the properties present in the object repository+properties present in the secret place

Set to property:Settoproperty Is used for setting the text objects properties value temporarily during the

executionSYNTAX: Object hierarchy.settoproperty “property name”,”property value”

Tenth case study:Develop a script for clicking ona button for three times whose text property value will be dynamically changing from start to stop and stop to start

OR

Form 1

Vbwindow(‘form1”).vbbutton(“spb”).clickVbwindow(“form1”).vbbutton(“spb”).settoproperty “text”,”stop”Vbwindow(“form1”).vbbutton(“spb”).clickVbwindow(“form1”).vbbutton(“spb”).settoproperty “text”,”start”Vbwindow(“form1”).vbbutton(“spb”).click

DATA TABLE METHODS

Data table methods:Data table methods are used for performing the operations on the runtime data table

[email protected]

START SPBNC:ButtonText:start

Page 41: Automation notes

1. Add- sheet: It is used for adding the new sheet for the runtime data tableSYNTAX: Data table.add sheet”sheet name”

2.Delete- sheet: It is used for deleting a specified sheet from the run time data tableSYNTAX: Data table.delete sheet”sheet name”

3.Import: It is used for importing the data present in all the sheets in an excel file to the runtime data table

SYNTAX: Data table.import ”path of the excel file”4. Import Sheet: It is used for importing specified sheet of data from the excel file to the specified sheet in the runtime data table

SYNTAX: Data table. Import sheet “path of the excel file, source sheet id, destination sheet id”

5.Export: It is used for exporting the complete data present in the run time data table to a specified location

SYNTAX: Data table. export “Path of the location with a file name.xls extension

6.Export Sheet: It is used for exporting the data present in a specified sheet in the run time data table to a specified location

SYNTAX: Data table .export sheet “path of the location with a file name.xls extension”, sheet id to be exported.

7.Set currant row: It is used for making the QTP focus on a specified rowSYNTAX: Data table. Set currant row (row number)

8.Set next row: It is used for making the QTP focused on the next of the currently focused rowSYNTAX: Data table. Set next row

9.Set Prev Row: It is used for making the QTP focus on the previous row of the currently focused towSYNTAX: Data table. Set prev row

10. Value Method: It is used for getting a value from a specified sheet, specified column and currently focused row.

SYNTAX: Variable= Data Table. Value ( “column name”, sheet id)

11. Get Sheet: It is used for making the QTP to focus on a specified sheetSYNTAX: Data table. Get sheet (sheet id)

12Get Row Count: It is used for getting the row count of a global sheetIf at all one wants to get the row count of a specified sheet first of all they need to make

the QTP to focus on a specified sheet and then get the row count

SYNTAX 1: Variable= Data Table. Get row countSYNTAX 2: Variable= Data Table. Get sheet (“sheet id”). Get row count

Example:[email protected]

Page 42: Automation notes

Data table. Addsheet “ Sri”Data table.import sheet “e:\Sri\td122.xls,1,3N=Data table.get sheet( 3).getrowcountFor i= 1 to n

Data table. Set currant row( i )Vbwindow(“form1”).vbedit(“val1”).set data table(“v1”,3)Vbwindow(“form1).vbedit(‘val2’).set data table(“v2”,3)Vbwindow(”form1”).vbbutton(“add”).clickExp val= data table.value(“ev”,3)Act val= vbwindow(“form1”).vbedit(“res”).getroproperty(“text”)If (exp val= act val) thenData table (“res”,3)= “pass”ElseData table (“res”,3)= “fail”End ifNextData table.export sheet “D;\fl_automation\log\file2.xls”,3Data table.delete ‘Sri”

Input/Out put Parameters:

One ca pass number of values in to the function while calling and a function can return only one value.

Example:

Function add(a,b) Main programRes= a+b Add(10,20)Add= res Msg box varEnd function

Input/Out put parameters concept is used for passing some values in to the action to return some values once the execution is finish

To do the same one has to declare the desired number of input parameters and out put parameters at the action, which is about to be called

Navigation:• Activate the menu item test• Select the option action properties• Select the parameters tab

[email protected]

Page 43: Automation notes

• Declare the desired number of input/output parameters• Using the corresponding add buttons• Click on OK

Exmaplevbwindow("Form1").VbEdit ("val1").set parameter ("a")vbwindow("Form1").VbEdit("val2").Set parameter ("b")vbwindow("Form1").VbButton("ADD").Clickvar= vbwindow("Form1").VbEdit("res").GetROProperty "text"parameter ("c")= varvbwindow("Form1").Vbbutton("SUB").Clickvar1=vbwindow("Form1").VbEdit("res").GetROProperty "textA"parameter ("d")=var1vbwindow("Form1").VbButton("CLEAR").Click

At the calling point one need to specify the input values in a sequence separated by commas and the variable names in a sequence in order to catch the return value

Example: Take the new test

Run action "action1[inout122]", one iteration,20,30,r1,r2msg box r1msg box r2

Automation Object Model

Automation object model: (AOM)Automation object model is a concept provided to automate the operations on QTP through

scripting

Dim qtappDim qttestSet qtapp= create object (“quicktest.application”)Qtapp.launchQtapp.visible

Qtapp.open”d:\aom1”, trueSet qttest=qtapp.testQttest.runQttest.close

[email protected]

Page 44: Automation notes

Qtapp.open “d:\aom122”, trueSet qttest= qtapp.test

Qttest.runAttest.close

Qtapp.quit

Data Base Connection

M.S Access Connection:Dim con, rsSet con = createobject("adodb.connection")Set rs= createobject("adodb,recordset")con.provider= "microsoft.jet.oledb.4.)0"con.open "d:\test data.mbd"rs.open "select * from info", conDo while not rs.eof

vbwindow("Form1").VbEdit("val1").Set rs.fields("v1")vbwindow("Form1").VbEdit("val2".set rs.fields("v2")vbwindow("Form1").VbButton("add").Clickrs.movenext

Loop Oracle connection:Con .open “provider =oraoledb.1;server=local host;uid=scott;pwd=tiger;database=testdata;”

SQLServer connection:Con.open provider= sqloledb.1; server=local host; uid=sa; pwd=; database= test data;”

Happy learning… Best of Luck……

[email protected]

Page 45: Automation notes

QTP 9.0,9.1,9.2QTP 9.0:

Test menu item is renamed as Automation Settings option is moved from test menu item to file menu item Quality center connection option is moved from tools menu item to file menu

item Step menu item is removed and all the options present under it are kept in the

edit menu item A new menu item window is introduced used for managing the window A new option by name function definition generator is introduced which is used

for creating the functions easily New options are provided for commenting and un commenting the block of

statements A new option by name check syntax is introduced under tools menu item used

for checking the syntax of script Some of the options related to the resources like object repository, recovery

scenario manager are moved from tools menu item to a new menu item resources

A new menu item resourced is introduced with some new options like object repository manager and associate repositories

Object repository manager is used for creating and managing the shared repositories with out having any connection to the test

Anatomy of QTP 9.0:

QTP 9.0 screen can be divided in to 7 parts1. Test pane2. Active screen3. Data table4. Debug viewer pane5. Tool Options

[email protected]

Page 46: Automation notes

6. Information screen7. Missing resources screen

6.Information screen:Information pane is used for viewing the syntax related information during the syntax

CheckMain change: One can associate one or more shared repositories to an action a part from its local repository

7.Missing resources:When the test is being open if at all any associate resources like repositories, library

files, recovery files are missing then the complete information related to that will be shown in the missing resource pane

QTP 9.1: A new feature by name navigate and learn is introduced present in multiple

pages or windows continuously by navigating A new feature by name object repository comparison tool is introduced which is

used for comparing two shared repositories QTP 9.1 is compatible with windows vista operating system and .net frame 2.0

environment The script editor is made user friendly The company has announced that they will provide license for all the add ins

also

QTP 9.2: A new feature by name screen recorder is provided which is used for recording

the movie of the execution and that can be played back during the result analysis for better understanding

One can handle the object repositories dynamically through scripting with the help of an utility object repositories collection

Example:

Repath= “d:\r1.tsr Repositories collection.remove all( )

Repositories collection.add(repath)vbwindow("Form1").VbEdit ("val1").set “10”vbwindow("Form1").VbEdit("val2").Set “20”vbwindow("Form1").VbButton("ADD").Click

Pos= repositories collection.find(repath)Repositories collection.remove(pos)

[email protected]

Page 47: Automation notes

Object spy functionality is enhanced in such a weather one can view multiple objects information continuously by keeping the mouse pointer over the object

QTP 9.2 is compatible with the following browser Internet explorer 7.0 Mozilla fire fox2.0 Net space navigation 8.1.0

[email protected]