Test automation

Test automation
AUtomation

Friday, March 28, 2008

QTP FAQs

Explain the need to use analog recording in qtp?
This mode records exact mouse and Key Board operations you perform in relation to the screen /Application Window. This mode is useful for the operation which you can record at Object Level, such as drawing a picture, recording signature. The steps recorded using Analog Mode is saved in separated data file, Quick Tests add to your Test a Run Analog File statement that calls the recorded analog File. This file is stored with your action in which these Analog Steps are created. The Step recorded in Analog mode can not be edited within QT.

how to execute qtp script from command prompt?
You need to create a vbs file... then create a batch file....that's it
i think this is possible by the using CScript.exe "filename" in the command prompt.

how do we record a pop up window in QTP
we can record a pop up window through Recovery Management

I am facing one problem in my .net qtp application.In one page My script has to select order menu item from Add dropdown menu ex:Add->order.There is a bug in the page which opens up a pop up dialog box saying \
Hi Your question is not very clear ?What do u mean by "Add dropdown box" ? is that a combo box ? what exactly u want ?Kaps

How to make QTP to recognise the activeX controls
In the Expert View, you can use the Object property to activate the method for an ActiveX control. The list of available methods depends on the ActiveX control.
QuickTest records and runs steps on ActiveX controls as it does on any other object. Using the Insert>Step Option , we can activate ActiveX control methods, retrieve and set the values of properties and check the object exists. It is recommended that to begin recording session before opening the application containing the ActiveX controls on which you want to record.

what is keyword driventest ?
Keyword driven test has been introduced in QTP 8.0. Its like tree view.

How you write scripts in QTP? What's the main proc...
Main process in QTP is Recording, stores the properties in object repository then Running the script and then Test Results. Recording: QTP 'looks' at the object on which we are recording and stores it as a test object, determining in which test object class it fits like standard window dialog box or web button etc. Then for each test object class, QTP has list of mandatory properties that it always learns. When we record an object, QTP learns these default property values, and then 'looks' at the rest of the objects in the page , to distinguish and identify the object uniquely.If not it adds assistive properties , one ny one, to the description, until it has compiled a unique description.If no assistive properties are not available , it adds a special 'ordinal identifier' such as objects location on the screen.Running the scripts: While running the script, QTP searches for a run time object that exactly matches the description of the test object it learned while recording. If it is not matching, QTP uses ' smart identification' mechanism to identify the object.
What is the command in QTP to invoke IE Brow?
InvokeApplication "The path of the browser EXE file"
The following example uses the InvokeApplication function to open Internet Explorer.
InvokeApplication "E:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE"
SystemUtil.Run "iexplore"
Well SystemUtil.Run "iexplorer.exe","","","" command can be used for this purpose. The other alternative can be choose the menu item record from Test --> Record which opens up a Run and record settings dialog , Choose web tab from that dialog . Select the radio button "Open the following browser when a record/run session begins" Type the required URL to be opened in address field of the dialog and click ok This open the required url in the browser every time in the run/record sessions
I am going to tell you all one another way of invoking IE.
Set IE1=CreateObject("InternetExplorer.Application")IE1.visible=TrueSet IE1=nothing

To invoke the IE browser we can use- Systemutil.Run"C:\Program Files\Internet Explorer\IExplore.exe"
The above statement would take you to the about:blank webpage where you navigate to the URL required
SystemUtil.Run"C:\Program Files\Internet Explorer\IExplore.exe"
The above statement would take you to the about:blank webpage and you can navigate to any URL as required.

I am new to QTP, please tell me how.. I am new to QTP, please tell me how to invoke an application in QTP. Forexample: In winrunner we use syntax's like "web_url_valid, web_browser_invoke", like the same way i want in QTP. Else please let me know where can i find these syntaxs in QTP..
Use SytemUtil Object's Run Method ex:SystemUtil.Run "iexplore" will open the IE Browser.
How would u manipulate the script so that when the...
External datatable can be used for the login name so that it takes a new login name whenever the test is run.

How would u manipulate the script so that when the...
You can parameterize the values in the Gobal data table sheet, whatever the number of rows you enter in this data table will instruct QuickTest to run same number of new login name you've enter.

The answer is very easy .you need to do only parameterize the login window object in object repository and there you need to specify datatable parameter name or else qtp specify default papramter name

How can i add a action (external action) programatically?
if action is reusable then only u can call only in other test with "runaction" command and in folder option u hv to gv information regarding test from where u r takin action.u can do it programatically also.
You can add an external Action programatically using the Command RunAction ActionName, [IterationMode , IterationRange] Before you can use the RunAction statement in the Expert View for an external action, you must first call or copy the external action into your test by choosing Insert > Copy of Action or Call to Action. If the external action does not exist in your test, the RunAction statement is not recognized. Example
The following example calls the SearchFlight action, and runs all iterations of the action. Call RunAction "SearchFlight", rngIterations, rngAll
How can i call a external action which is not added external action of an action. Means I want to call ActionC from ActionA. but ActionC is not an exteranl action of ActionA.
Yes u can do it by copying the Action c to Action A...In QTP 8.2 there is an menu called insert-Copy of Action...

what is meant by SOURCE CONTROL ?
It is used to hold all the bulids of diff versions

how and what kind of Vb functions do u use in qtp?...
You can use all kinds of VBScript functionalities...and also VBAYou can use The following functions
Asc Function====,CBool Function===,CByte Function===,CCur Function===,CDate Function===,CDbl Function===,,Chr Function===,,CInt Function===,,CLng Function, CSng Function, CLng Function CSng Function, CStr Function, Hex Function, Oct Function===etc
ther r 2 types of functions in QTP 1.User Defined 2.Pre defined
how can u discribe the basic flow of automation with conditional and programatic logic?
I think ur Question is Executing of operators flow in the automation code if the question is that then my answer is For example Z = 78 * (96 + 3 +45)
There are five operators in this expression: =, *, (), +, and another +. According to the rules of operator precedence, they are evaluated in the following order: (), +, +, *, =.
Evaluation of the expression within the parentheses occurs first. Within the parentheses, there are two addition operators. Since the addition operators both have the same precedence, they are evaluated from left to right. 96 and 3 are added together first, then 45 is added to this total, resulting in a value of 144.
Multiplication occurs next. 78 is multiplied by 144, resulting in a value of 11232.
Assignment occurs last. 11232 is assigned to z.

How to recall a function in QTP
Assume that U are calling a funtion in QTP Script, & if u want to recall that same fuction in some other part of the same script..... What would u do ?
There also u follow the same procedure. See the sample code
Function addition(x,y) z= x+y msgbox zEnd Function
Call addition(1,2)Call addition(2,2)
Give one example where you have used Regular Expression
for the date format "dd/mm/yyyy" the equivalent regular expression would be
Set regExp_Term = New RegExpregExp_Term.pattern = "11/11/1981"validation=regExp_Term.test("date to be validated")
if validation="True" Then
-----------------
End If
We can use Regular Expression where ever required, like in my Web Testing, my browser name changes oftnely, so I used Regular expression in Name property like... Set Browser= (Title:=Browser.*)
generaly regular expressions r used when the data is dynamically changing .for example take a flights application in the QTP samples. we can use regular expression for the Date field ,FaxOrder no,etc
How can I implement error handling in QTP, I know with Recovery Mangaer but how please give me detailed execution to how to handle giving an example?
By Using Recovery Scenario MAnager it has the following things1.Trigger Event 1.Pop-Up Window 2.Object State 3.TestRun Error 4.Application Crash2.Recovery Operation 1.Keyboard/mouse input 2.Function Call 3. 4.Restart Windows3.Post Recovary Operation4.Scenario Nameuse the Scenario Name in Resourcesmay this infor is helpful to u.
Record the 7 test objects (dropdown boxs) and there will be many 70 properties ( and their associated bvalues) Drop Down Box 1

If you have the same application screen with 7 dro...
record the 7 test objects and parameterize them with the 70 values either by using data table option if all 70 has to be executed or by choosing random variable option if it needs to be cjhecked by random values

When there is a task that gets repeated in multiple scripts, what do you do in QTP?

Split the action related to that task, make it Reusable & then call that Action as many times as needed.

How to instruct QTP to display errors and ther description in the test results instead of halting execution by throwing error in the mid of execution due to an error(for example Object not found)?
Use Recovery senarios to accomplish that.
Use Exception Handling technique of QTP: can be achieved by any one of the following two methods:1. Using Recovery Scenario Manager2. scripting by using :if-else-then OR Select Case

I have the same problem. However, My issue deals with waiting for an object. I'm not a programmer. How can I manipulate the Wait function to wait without me having to specify the seconds. For instance in Rational Functional Tester, I used to use wait.untilExistence.
Make use of Reporter.Reportevent eg.
var=statement
if var="True" Then
Reporter.Reportevent 0,"Step Name","Description of the Passed step"
else
Reporter.Reportevent 1,"Step Name","Description for the failed step"
End If
I hope thats it :)
How you write scripts in qtp?what's the main process in qtp?How do you run scripts in Qtp?Please anyone can answer my questions.......
In Qtp we have to use script language Vb-script.
mainly QTP hepls us to test .net applications & we have more check points also we have automatic recovery manager
We can scripts in VB ,Java Script,Visual Studio n etc..
Key Word Driven Approach
There is an RUN command button...
How to add run-time parameter to a datasheet?
HI use the following code Datatable..addparameter ,
example, datatable.localsheet.addparameter "Col1","Column" hope this will work
Try using this line of code. DataTable("Col Name",dtGlobalSheet/LocalSheet)="Col Value"
The only disadvantage with tihs code is, u will be able to see the parameter till the script is running, once stopped the parameter will vanish from the data table.
1. enter the data in data sheet(global/action).2.right click on actionbutton it showing all possible codition.
3. choose run all Iteration row by row. in Qtp8.2 just choose optiones and run
how to load the *.vbs or test generating script in a new machine?
You can use the any one of the following two methods:1. goto : Tools --->settings --->Resources and add the .vbs file2. in the QTP script u can write : Dim App 'As ApplicationSet App = CreateObject("QuickTest.Application")App.LaunchApp.Test.Settings.Resources.Libraries.Add("")
Execute File statement can be included as part of the test script inorder to execute the vbs files.

how can u write a script without using a GUI in QTP?
GUI in Qtp?do you mean to say Object repository?without OR,tester need to write descriptive tests,where you would directly assign property values and write methods.you do not need to save OR.
by descriptive programming

Using BRD ans functional and Design docs we Build the test scripts,which should be able to find the deffects on AUT at the time of Test Run

QTP provides the Active Screen Technology i.e it will take snapshots of the Application when u r going thru' the appl. by using the snapshots u can able to write the script for that particular appl.

Can we update the database though Qtp.
Ofcourse u can if u have authority to do so.
set ObjConn=CreateObject("ADODB.Connection")
set ObjRec=CreateObject("ADODB.Recordset")
ObjConn.open "DriverName","UserId","Password","Server"
set ObjRec.activeConnection=ObjConn
ObjRec.source="SQL Query"
ObjRec.open
yes u can but it will be done thru scripting.

I am using the QTPlus Repositories Merge Utility to merge all my different repositories into a single one. After having merged some repositories, I notice that, from the test, you can't see the web objects that were merged into the reposotory.If you open the merged repository in the Merge Utility, the web objects appear there.Has anyone encountered this problem? Am I missing something obvious? Does anyone have a solution?
Merge Utility have a lot of problems, try don't use this for file biggest the 8 MB
What is the procedure to test flash applications using QTP?
By using multimedia plug in we can test animation or flash applications
QuickTest supports Macromedia Flash 4 or 5 objects that are ActiveX controls in Internet Explorer. You can also test Macromedia Flash 6 clips containing Flash 4 or 5 commands
You can use the test object methods and properties associated with the FlashControl object to test Flash objects in your multimedia application.
how to fetch test data from Database by using QTP
right click ont he database table. sheet->import->database create the connection write the sql
how to handle java tree in QTP
first of all we need to have a java add-in to handle a java tree.In tools option we have the "object identification" drop down list.There we have the java option to recognise the objects there select the tree option.Add the properties to be recognised.Then the QTP will start recognising the tree.
If not use the DOM to detect the tree.Here select code from the back ground and manipulate accordingly
what if storage limit of shared object repository exceeds its limit(2 MB).how this kind of situation can be handled?
One can use advanced object repository Editor from Sirus SQA
how many types of recording modes in QTP?describe each type with an example where we use them?
There are three types of recording modes available in QuickTest Pro.1.Normal mode2.Analog mode3.Low-level recording modeNormal mode: This is the default mode of recording in QTP ,Object and the Operation associated/performed with Object can be recorded.This mode takes full advantage of QuickTest's test object model,recognizing the objects in AUT regardless of their location on the screen.Analog mode:This mode records exact mouse and keyboard operations you perform in relation to the screen / application window.This mode is useful for the operation which you can record at object level,such as drawing a picture,recording signature.the steps recoded using Analog mode are saved in seperate data-file,Quick tests adds to your test a Run Analog file statement that calls the recorded Analog file.This file is stored with your action in which these Analog steps are created.The steps recorded in Analog mode can not be edited within QuickTest.Low-level recording mode:enables you to record any object or operation in your AUT whether or not QuickTest recognizes the it.This Low-level recording is useful when the exact location of an Object/operation in your AUT is important for your test.This mode records in terms of X,Y co-ordinates.Unlike in Analog mode,the steps can be seen in Test script,as well in Keyword view.
What is the file extension of the code file & object repository file in QTP?

.vbs is the extension of the code file, for object repository file the extension is .tsr , The code file extension: script.MTS ,

File extension of -- Per test object rep :- filename.mtr ,-- Shared Oject rep :- filename.tsr ,Code file extension id script.mts
User Defined Libary File Extension -- .VBS
QTP Script File Extension -- .MTS
Object Repository File Extension -- .TSR
Test Batch Runner File Extension -- MTB
QTP Recovery Scenarion File Extension -- QRS
I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run command as well How do I do this?
U can still make the notepad open without using the record or System utility script, just by mentioning the path of the notepad "( i.e., where the notepad.exe is stored in the system) in the "Windows Applications Tab" of the "Record and Run Settings window. Try it out. All the Best.
1. insert->step->step generator->select a function invokeapplication,mention the path to notepad.exe file.
Run. 2.otherwise in Expert view write a builtin function invokeapplication"c:/whatever the path" Run
Another alternative to open a notepad is to use ShellObject. Check out with the following example:
Dim aSet a = WScript.CreateObject ("WSCript.shell")a.run "notepad.exe"
How many types of Actions are there in QTP?
There are three kinds of actions: non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once. reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests. external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action
How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?
Yes, there's an in-built functionality called "Step Generator" in Insert->Step->Step Generator -F7, which will generate the scripts as u enter the appropriate steps.
Explain the concept of object repository & how QTP recognises objects?
Object Repository: displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected). we can view or modify the test object description of any test object in the repository or to add new objects to the repository. Quicktest learns the default property values and determines in which test object class it fits.If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description.If no assistive properties are available, then it adds a special Ordianl identifier such as objects location onthe page or in the source code.
How do you data drive an external spreadsheet?
Import from External Spreadsheet File by selecting Import then From File . Which imports a tabbed text file or a single sheet from an existing Microsoft Excel file into the table. The sheet you import replaces all data in the currently selected sheet of the table, and the first row in the Excel sheet replaces the column headers in the corresponding Data Table sheet. It is therefore essential that the first row of your Microsoft Excel sheet exactly matches the parameter names in your test.
If it is a Database instead of Spreadsheet by selecting Import then From Database. It imports data from the specified database to the current sheet
Can anyone please let me know how exactly we record the script n use external datatable...i got from Anna's answer that we need to use import from file...but can anyone please let me know how to start and go about recording..and calling xls data table..
IF we use batch testing.the result shown for last action only.in that how can i get result for every action.
u can click on the icon in the tree view to view the result of every action
How to handle the exceptions using recovery secnario manager in Qtp?
You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps 1. Triggered Events 2. Recovery steps 3. Post Recovery Test-Run
There are 4 trigger events during which a recovery scenario should be activated. They are A pop up window appears in an opened application during the test run. A property of an object changes its state or value. A step in the test does not run successfully. An open application fails during the test run. These triggers are considered as exceptions and more details regarding how to use Recovery Manager is given in the QTP User Guide. Since there is hardly any space to put up snapshots
What are the Features & Benefits of Quick Test Pro(QTP)..?
1. Key word driven testing 2. Suitable for both client server and web based application 3. Vb script as the scriot language 4. Better error handling mechanism 5. Excellent data driven testing features
1.how to handle the exceptions using recovery secnario manager in Qtp? 2.what is the use of Text output value in Qtp?
QTp has got so many benefits compared to Winrunner.It enables evn an inexperienced tester to work with as it is GUI based.Major advantages it has are active screen which allows user to insert cheskpoints when the application is closed,testers job is made simple with different features it has,debug viewer where in we can see wht values variables carry when the test is running,and many features made simple
check point means inserting code to verify something existing in the application or not. output value means getting some information from the application and plasing in the output datatable(internal excel sheet). you can see the output data by opening the results file after the script execution. example: suppose if u want to check some text "QTP" existing in your application or not use checkpoint. suppose if you want get some text "QTP" from your application and to place that in some file use output values.
qtp is mainly used for functionality testing.qtp is user friendly both technical and non technical users can easily access.qtp has two views keyword view and expert view in keyword view when u record a test it genarates the script in tree format.it is very easy to understand.if u want to view the vbScript use the expert view. qtp has active screen using that u can enhance the script with out navigating to the application.like u can insert checkpoints and synchonization points. qtp has automated documentation.when u start recording it genarates the autodocumentation in plain english. using qtp we can parametarize objects,checkpoints,datadriventables.this will give more flexibility
QuickTest Pro offers a “Tree View” which is an icon-based view of the script. This is very easy to get used to and non-technical people adapt to it quicker and feel more comfortable working with it. For the technical user, they can always switch over to the “Expert View” in QuickTest and look directly at code, and program away using VBScript.
Will be getting the initial focus on development of all new features and supported technologies. Ease of use. Simple interface. Presents the test case as a business workflow to the tester (simpler to understand). Numerous features. Uses a real programming language (Microsoft’s VBScript) with numerous resources available. QuickTest Pro is significantly easier for a non-technical person to adapt to and create working test cases, compared to WinRunner. Data table integration better and easier to use than WinRunner. Test Run Iterations/Data driving a test is easier and better implement with QuickTe
What are the different scripting languages you could use when working with QTP ?
Visual Basic (VB),XML,JavaScript,Java,HTML
How do you test siebel application using qtp?
This answer is relevant to Siebel 7.7, and QTP 8.0. To test Siebel using QTP, you will need two components.
1. The Siebel Addin from Mercury for QTP (install this on the system with QTP on it).
2. The Test Automation Framework license keys from Siebel (install the license key on the Siebel server).
Now you will need to enable the automation API on the Siebel server. To do this,
The [SWE] section of the server .cfg file needs to be updated with the entries below
In SWE section u need to add
AutomationEnable = TRUE and
at the same time you need to use SWECmd= AutoOn in the URL
How the exception handling can be done using QTP
It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. FYI.. The wizard could be accesed in QTP> Tools-> Recovery Scenario Manager .......

Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps 1. Triggered Events 2. Recovery steps 3. Post Recovery Test-Run
What is the difference between check point and output value.
Check point is a verification point that compares a current value for a specified property with the expected value for that property. An outPut value is a value captured during the test run and entered in the run-time

I would like to add some stuff to Kalpana's comments. It is as follows:- An outPut value is a value captured during the test run and entered in the run-time but to a specified location. EX:-Location in Data Table[Global sheet / local sheet]

additional comment on Above comment:An output value is a value retrieved during the runsession and entered into runtime table or data table subsequently it can be used as input value in your test.
What are the properties you would use for identifying a browser & page when using descriptive programming ?
Title is the property we use.ex: Browser("Title:="xxx").page("Title:="xxxx").....

"name" would be another property apart from "title" that we can use. ex: Browser("name:="xxx"").page("name:="xxxx"")..... We can also use the property "micClass". ex: Browser("micClass:=browser").page("micClass:=page")....
For Browser : Name For Page : Title
Differentiate the two Object Repository Types of QTP.
Object repository is used to store all the objects in the application being tested.2 types of oject repositoy per action and shared. In shared repository only one centralised repository for all the tests. where as in per action.for each test a separate per action repostory is created.

In Qtp there are 2 object repositories, they are1.Shared Object Repository2.Per Action Mode,by default it's per action mode.we will use shared OR for calling a particular action,it's like calling external libraries.we will use per action for a particular action ie, for one action only.
Explain the concept of how QTP identifies object.
During recording qtp looks at the object and stores it as test object.For each test object QT learns a set of default properties called mandatory properties,and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run,QT searches for the run time obkects that matches with the test object it learned while recording.

QTP uses the Object Repository file to recognize objects on the application. When QTP runs a action, it uses the Object Repository to locate objects. It reads an object’s description in the Object Repository and then looks for an object with the same properties in the application being tested
What is the difference between Call to Action and Copy Action.?
Call to Action : The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)

when u insert a call to action,they r read only in the calling test.It can be modified in the original test.where as come to copy action,you can make changes to the copied action,your changes will not effect the original action where it created
have you ever written a compiled module? If yes tell me about some of the functions that you wrote.
in qtp the compiled modules are called library files .so write different files in a file extention with .vbs and call this in qtp test scipt file
Few basic questions on commonly used Excel VBA functions
common functions are: Coloring the cell Auto fit cell setting navigation from link in one cell to other saving

Explain the keyword createobject with an example
Creates and returns a reference to an Automation object syntax: CreateObject(servername.typename [, location]) Arguments servername:Required. The name of the application providing the object. typename : Required. The type or class of the object to create. location : Optional. The name of the network server where the object is to be created.
create object creates handle to the instance of the specified object so that we program can use the methods on the specified object. It is used for implementing Automation(as defined by microsoft). ex: set oDesc= createobject(Excel.application) odesc.activeworksheet=1
Createobject:Creates and returns a reference to an Automation object.Example:Dim ExcelSheetSet ExcelSheet = CreateObject("Excel.Sheet")
How to use the Object spy in QTP 8.0 version?
There are two ways to Spy the objects in QTP 1) Thru file toolbar ---In the File ToolBar click on the last toolbar button (an icon showing a person with hat). 2) Tru Object repository Dialog ---In Objectrepository dialog click on the button"object spy..." In the Object spy Dialog click on the button showing hand symbol. the pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object if at all the object is not visible..or window is minimised then Hold the Ctrl button and activate the required window to and release the Ctrl button. 1. How Does Run time data (Parameterization) is handled in QTP? A) You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files. 2) What is keyword view and Expert view in QTP? A) QuickTest’s Keyword Driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View. Advanced testers can view and edit their tests in the Expert View, which reveals the underlying industry-standard VBScript that QuickTest Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View. 3) Explain about the Test Fusion Report of QTP ? A) Once a tester has run a test, a TestFusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining TestFusion reports with QuickTest Professional, you can share reports across an entire QA and development team. 4) To which environments does QTP supports ? A) QuickTest Professional supports functional testing of all enterprise environments, including Windows, Web, ..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframe terminal emulators, and Web services. 5) What is QTP ? A) QuickTest is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, QuickTest Professional also enables you to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and .NET framework applications...
6) Explain QTP Testing process ? A) The QuickTest testing process consists of 6 main phases: Create your test plan Prior to automating there should be a detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application. Recording a session on your application As you navigate through your application, QuickTest graphically displays each step you perform in the form of a collapsible icon-based test tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form. Enhancing your test Inserting checkpoints into your test lets you search for a specific value of a page, object or text string, which helps you identify whether or not your application is functioning correctly. NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process. Broadening the scope of your test by replacing fixed values with parameters lets you check how your application performs the same operations with multiple sets of data. Adding logic and conditional statements to your test enables you to add sophisticated checks to your test. Debugging your test If changes were made to the script, you need to debug it to check that it operates smoothly and without interruption. Running your test on a new version of your application You run a test to check the behavior of your application. While running, QuickTest connects to your application and performs each step in your test. Analyzing the test results You examine the test results to pinpoint defects in your application. Reporting defects As you encounter failures in the application when analyzing test results, you will create defect reports in Defect Reporting Tool. 7) Explain the QTP Tool interface. A) It contains the following key elements: Title bar, displaying the name of the currently open test Menu bar, displaying menus of QuickTest commands File toolbar, containing buttons to assist you in managing tests Test toolbar, containing buttons used while creating and maintaining tests Debug toolbar, containing buttons used while debugging tests. Note: The Debug toolbar is not displayed when you open QuickTest for the first time. You can display the Debug toolbar by choosing View > Toolbars > Debug. Note that this tutorial does not describe how to debug a test. For additional information, refer to the QuickTest Professional User's Guide. Action toolbar, containing buttons and a list of actions, enabling you to view the details of an individual action or the entire test flow. Note: The Action toolbar is not displayed when you open QuickTest for the first time. You can display the Action toolbar by choosing View > Toolbars > Action. If you insert a reusable or external action in a test, the Action toolbar is displayed automatically. For additional information, refer to the QuickTest Professional User's Guide. Test pane, containing two tabs to view your test-the Tree View and the Expert View Test Details pane, containing the Active Screen Data Table, containing two tabs, Global and Action, to assist you in parameterizing your test Debug Viewer pane, containing three tabs to assist you in debugging your test-Watch Expressions, Variables, and Command. (The Debug Viewer pane can be opened only when a test run pauses at a breakpoint.) Status bar, displaying the status of the test
8) How QTP recognizes Objects in AUT? A) QuickTest stores the definitions for application objects in a file called the Object Repository. As you record your test, QuickTest will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by QuickTest), and will contain a set of properties (type, name, etc) that uniquely identify each object. Each line in the QuickTest script will contain a reference to the object that you interacted with, a call to the appropriate method (set, click, check) and any parameters for that method (such as the value for a call to the set method). The references to objects in the script will all be identified by the logical name, rather than any physical, descriptive properties. 9) What are the types of Object Repositorys in QTP? A) QuickTest has two types of object repositories for storing object information: shared object repositories and action object repositories. You can choose which type of object repository you want to use as the default type for new tests, and you can change the default as necessary for each new test. The object repository per-action mode is the default setting. In this mode, QuickTest automatically creates an object repository file for each action in your test so that you can create and run tests without creating, choosing, or modifying object repository files. However, if you do modify values in an action object repository, your changes do not have any effect on other actions. Therefore, if the same test object exists in more than one action and you modify an object's property values in one action, you may need to make the same change in every action (and any test) containing the object. 10) Explain the check points in QTP? A) . A checkpoint verifies that expected information is displayed in a Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP. A page checkpoint checks the characteristics of a Application A text checkpoint checks that a text string is displayed in the appropriate place on a Application. An object checkpoint (Standard) checks the values of an object on a Application. An image checkpoint checks the values of an image on a Application. A table checkpoint checks information within a table on a Application An Accessiblity checkpoint checks the web page for Section 508 compliance. An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application. A database checkpoint checks the contents of databases accessed by your web site 11) In how many ways we can add check points to an application using QTP. A) We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note : To perform the second one The Active screen must be enabled while recording). 12) How does QTP identifes the object in the application A) QTP identifies the object in the application by LogicalName and Class. For example : The Edit box is identified by Logical Name : PSOPTIONS_BSE_TIME20 Class: WebEdit 13) If an application name is changes frequently i.e while recording it has name “Window1” and then while running its “Windows2” in this case how does QTP handles? A) QTP handles those situations using “Regular Expressions”. 14) What is Parameterizing Tests? A) When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data. 15) What is test object model in QTP ? A) The test object model is a large set of object types or classes that QuickTest uses to represent the objects in your application. Each test object class has a list of properties that can uniquely identify objects of that class and a set of relevant methods that QuickTest can record for it. A test object is an object that QuickTest creates in the test or component to represent the actual object in your application. QuickTest stores information about the object that will help it identify and check the object during the run session. A run-time object is the actual object in your Web site or application on which methods are performed during the run session. When you perform an operation on your application while recording, QuickTest: ➤ identifies the QuickTest test object class that represents the object on which you performed the operation and creates the appropriate test object ➤ reads the current value of the object’s properties in your application and stores the list of properties and values with the test object ➤ chooses a unique name for the object, generally using the value of one of its prominent properties ➤ records the operation that you performed on the object using the appropriate QuickTest test object method For example, suppose you click on a Find button with the following HTML source code: QuickTest identifies the object that you clicked as a WebButton test object. It creates a WebButton object with the name Find, and records the following properties and values for the Find WebButton: It also records that you performed a Click method on the WebButton. QuickTest displays your step in the Keyword View like this: QuickTest displays your step in the Expert View like this: Browser("Mercury Interactive").Page("Mercury Interactive"). WebButton("Find").Click 16) What is Object Spy in QTP? A) Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box. 17) What is the Diff between Image check-point and Bit map Check point? A) Image checkpoints enable you to check the properties of a Web image. You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QuickTest captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk Space For example, suppose you have a Web site that can display a map of a city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one click on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly. You can create bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded). Note: The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings. 18) How many ways we can parameterize data in QTP ? A) There are four types of parameters: Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test. Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table. Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose. Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have QuickTest generate a random number and insert it in a number of tickets edit field. 20. How do u do batch testing in WR & is it possible to do in QTP, if so explain? Ans: Batch Testing in WR is nothing but running the whole test set by selecting "Run Testset" from the "Execution Grid".The same is possible with QTP also. If our test cases are automated then by selecting "Run Testset" all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in "Waiting" mode.
21. if i give some thousand tests to execute in 2 days what do u do? Ans : Adhoc testing is done. It Covers the least basic functionalities to verify that the system is working fine. 22. what does it mean when a check point is in red color? what do u do? Ans : A red color indicates failure. Here we analyze the the cause for failure whether it is a Script Issue or Envronment Issue or a Application issue. 23. what do you call the window testdirector-testlab? Ans : "Execution Grid". It is place from where we Run all Manual / Automated Scripts 24. how do u create new test sets in TD Ans : Login to TD. Click on "Test Lab" tab.
Give me an example where you have used a COM interface in your QTP project?
com inteface appears in the scenario of front end and back end.for eg:if you r using oracle as back end and front end as VB or any language then for better compatibility we will go for an interface.of which COM wil be one among those intefaces.