IMP QTP FAQS

March 1, 2008

1.      What is Object Spy?
we can view the object properties of an open application ,test object methods and run time object methods, and also we can view selected object hirarchy tree properties and values in objectspy dialod box.

2. What is the extension of script and object repositary files?

The extension for Script file is .mts and the extentsion of the repository file is .tsr mtr : Modular Test Repository mts : Mercury Test Script tsr : Test Script Repository vbs : vb Script   What are the file extensions for per-action, shared object repository files and what is the extension for library files? Per-Action Object Repository - .mtr(Mercury test Script) Shared Action object Repository - .tsr(Test repository)  Library files - .vbs or .txt  
3.      What is the difference Between LowLevel and Normal Recording Modes?
Low-Level Recording: Is useful if the exact coordinates of the object are important for your test.
Normal recording: Is useful when the recording operations that cannot be recorded at the level of an object.
Low level record is used to record the session even the object is not recognized by the QTP.
 
2nd answer
Normal Level Is Object Context Level ; where QTP recognize object with Physical Description Of only interacted object.
 
Low-Level Recording—enables you to record on any object in your application, whether or not QuickTest recognizes the specific object or the specific operation. This mode records at the object level and records all run-time objects as Window or WinObject test objects. Use low-level recording for recording in an environment or on an object not recognized by QuickTest. You can also use low-level recording if the exact coordinates of the object are important for your test or component.
 
 
4.      What are the challenges do we face while testing webbased applcations using the automation tool QTP or any?
1)Unable to understand custom object, then we have to map that object to standard object. 2)To handle the runtime objects. 3)Using Regular Expressions.
 
5.How we can add actions in the test using QTP?
There are four actions call to action ,copy of action,call to exesitng action,call to winner,split action just right click on any one select it

6.Does QTP provides any tools for parametarization?

Yes, QTP uses Microsoft Excel for parameterization  
118.What is batch testing?
The SeQuential execution more than one test case is called as Batch testing. Every test Batch is consists of mutiple dependent test cases. In those batches every end state is base state to next case .Test batch is also known as Test suit or Test belt.  

7.what are recovery management techiniques?

Recovery scenario manager is used to handle exception. exception is run time error,three steps to handle exceptions. 1 .trigger event:-pop-up window,object state,test run error and application crash 2.recovery operations:-select an operation to perform when the trigger event occurs they are 1.keyboard or mouse peration 2.close application process 3. fuction call  4.restart miscrosoft windows 
3.post recovery:- select the last run operation you want to perform when the recovery operation is complect  .test run options:
1.      repeate current step and continue
2.      preceed to next step
3.      proceed to next action or component
4.      proceed to next iteration 
5.      restart current test run
6.      stop the test run

8.what is the difference between link and hyperlink?

The HyperLink control immediately navigates to the target URL when the user clicks on the control. The form is not posted to the server.
The LinkButton control first posts the form to the server, then navigates to the URL. If you need to do any server-side processing before going to the target URL, use a  LinkButton. 
On the other hand, if there is no server-side processing necessary, don't waste a round trip and use the HyperLink control.

9.In qtp,how to interact tool & application build? by using descriptive programing

10.HOW TO DO THE BATCH TESTING USING QTP?

GO  to tools ,options and select the tet batch runner and select the scripting functions one by one by keeping it in wait mode and execute it.

11.WHAT IS THE USE OF “FUNCTION GENERATOR” IN QTP?

1)the use of functional generator in qtp is which lists out the all the built in functions in qtp and helps you to write the vb script for un known objects.
2)it is also used to reduce the typing mistakes & syntax errors.

12.WHAT IS ENVIRONMENT VARIABLES?

the variable which you have in one action cant be used in some other action .so by using environment variables we can use the variables in one action in to another action.
environment variables are 3 types,
1. user defined internal
2. user defined external
3. builtin
 

13.what is the use of VIRTUAL OBJECTS? explain ?

The use of virtual objects in qtp is identifies the objects including pixels(with co-ordinates.)

14.what is a test strategy & what is the difference between test strategy & test plan?

TestPlan is controlled document which describes entire testing process. It includes
Scoping of the test, Test deliverables, Test schedule, Entry criteria, Exit criteria, Risks and contingencies and also Test strategy.
Test Strategy or Test Methodolgy is a set of guide lines that describes test design.

15.WHAT IS THE DESCRIPTIVE programming when it is useful? & when to use this ?

1st
Descriptive Programming is all about identifying an object uniquely.
 
descriptive programming in QTP means whenever qtp facing dificulty with obj identification then we will go with regular exp or desc prog it means identifying obj unique prop from the script itself.ex:vbwindow("").vbedit("attached text:=username").set cdbjd

2nd answer

without using the objectrepository, and by using the objectspy we will write the DESCRIPTIVE programming .when ever we will go to DESCRIPTIVE programming :-
1.when ever objects are dynamicaly changing.
2.when ever QTP is not going to recognise the objects.
3.when ever objectrepository size is huge automatically QTP 
wil get down slow.
4.when ever not yet develop the build then only we will use
  DESCRIPTIVE programming .

16.HOW to invoke any recorded script in QTP with out using RECORD & PLAYBACK CONCEPT?

1.invoke_record (path of the record)
2.by using reusable functions and calling them in the program

17.can we run the scripts of qtp 8.2 in the qtp7.0?

No,becse 8.2 is the advansed version(add some additional properties) of 7.0.so,we run the scripts of qtp 7.0 in qtp 8.2

18.How to handle Recovery scenario in QTP. give detailed explanation about recovery scenario.

Recovery scenario manager is used to handle exception.exception is run time error,three steps to handle exceptions.
1 .trigger event:-pop-up window,object state,test run error and application crash
2.recovery operations:-select an operation to perform whenthe trigger event occurs they are 1.keyboard or mouse peration 2.close application process 3. fuction call
4.restart miscrosoft windows
3.post recovery:- select the last run operation you want to perform when the recovery operation is complect .test run options:
                   1.repeate current step and continue
                   2.preceed to next step
                   3.proceed to next action or component
                   4.proceed to next iteration 
                   5.restart current test run
                   6.stop the test run
 
How u perform exception handling in QTp,what is other name for ths
The other name for Exception handling is Recovery scenario.
There are 4 Triggers
1.Popup Window.
2.Object State.
3.Test Error.
4.System Crash.
The solution are 
1.Function call.
2.Keyboard or mouse Operation.
3.Restart.
 
 

19.how we can take data in the username field text box into variable in web application explain with example and give all functions to get data into variables

Any Application, it may be web or it may be window based applications, we use getroproperty() method to get the data from the Editbox.Same way if u want to set the data to the editbox we use set()method.
for example:
Dim variable name
variable name =  Browser(browser).page
(pagename).GetROproperty("Logical name")
 
if u want to print in dialogbox use msgbox()function OR
if u want to print in test result use reporter.reporter 
event() function

20.What are the most frequent errors you faced while executing your scripts?

We face different types of error during testing. i explain different errors below. we face these errors regularly
Unit Test : Control Statement Errors,
Integration Errors : 
            Duplicate Variables, Passing values one module to another module. Memory leakage
Blockbox testing : Object Status, Data Integration errors, 
pick values from database, Replacement of data, Boundary value errors, UI errors.

21.Among all the check points what is the most important checkpoint?

Each checkpt is impin its own respect.According to me , databaase checkpts are more imp than the other.

22.how to write script in qtp(vbscript)..i mean with out application deployed..and how to call script1 into script2?

runaction actionname(iteration mode,iteration range,parameters)

23.What is iteration? How it is related to Test Results in QTP

Here iteration means repeat the processes, with same values or different values,when You take the datadriven test with different values... the test process repeats that much of time.

24.Is it possible to map an image as standard Object or u’ve to treat as virtual? how to map an Dynamic image into standard object?

We can record the dynamic objects by using smartIdentification process.
 

25.Difference between image checkpoint and bitmap checkpoint

In Bitmap checkpoint, we can compare the exact images,means the source image(in Build1) with the destination image(in build2). So it compare the exact image between both the 
builds. Here, even we can check the part of images between source and destination.
where as in Image check point, we can check all the values and properties of an image. Ex. The destination address once we click on the image, image type etc.

26.what is descriptive.create()in qtp?

To create properties collection and we can create properties object(MYDescription).once we have filled properties collection with a  set of properties objects(properties,values) we can specify properties object in place of an obj name

27.how to merge object repositories?

In QTP8.2 provide a facility to add repositories.   when u installed qtp 8.2 software to show a option in Tools Merge object Repositories. Through U can add object Rep.
 

28.what is the Command used to start the QTp from Run.(start-> Run)

systemutil.run"path of the file"

29.What does VBS file contain..? what is VBS file.?

vbs file contains the user defined functions which are reusable that can be used in our test or compnent according to our requirement

30.what is Unicode Compatibility ? HOw does this makes a diffrence from Winrunner.?

u can Test Applns which are developed in other than English Language also. i.e QTP Supports Japanise,chinese language appls also.where as winrunner doesn't support unicode compatibility.
 
31.what is the Exact Meaning of Environment Variables? 2)what is Compile Module in QTP? what exactly it contains Functions or Actions?
win runner contains compile module.but qtp does not support complie module.compile module means library files in qtp ,which contains functions not the actions
 
32.what is the Exact Meaning of Environment Variables?
Environment Variables enables you to use the variable values from other sources during the run session. the variable values can be specified by the users or QTP can specify depending upon the conditions and options u choose.
 
 
33.Tell me the QTP Advantages and Disadvatages ?
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). 
·  Uses a real programming language (Microsoft’sVBScript) 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 QuickTest. 
·  Parameterization easier than WinRunner. 
·  Can enhance existing QuickTest scripts without the “Application Under Test” being 
   available; by using the ActiveScreen. 
·  Can create and implement the Microsoft Object Model (Outlook objects, ADO objects, 
   FileSystem objects, supports DOM, WSH, etc.). 
·  Better object identification mechanism. 
·  Numerous existing functions available for implementation – both from within QuickTest Pro 
   and VBScript. 
·  QTP supports .NET development environment (currently WinRunner 7.5 does not). 
·  XML support (currently WinRunner 7.5 does not). 
·  The Test Report is more robust in QuickTest 
   compared to WinRunner. 
·  Integrates with TestDirector and WinRunner (can kick off WinRunner scripts from
   QuickTest). 
Cons:
·  Currently there are fewer resources (consultants and expertise) available due to QTP being a 
   newer product on the market and because there is a greater Demand than Supply, thus fewer 
   employee/consulting resources. 
·  Must know VBScript in order to program at all. 
·  Must be able to program in VBScript in order to implement the real advance testing tasks 
   and to handle very dynamic situations. 
·  Need training to implement properly. 
·  The Object Repository (OR) and “testing environment” (paths, folders, function libraries, OR) can be difficult to understand and implement initially. 
 
34.How to get the column count and column name from the resultset in the database connection program?
you use following sql query
select column name, count(column name)from table name.
 
35.How to Test the mainframe application?(tell me few basic things)
In Order to test the mainframe applications u need to install the TERMINAL EMULATOR add-in in QTP.
 
36.What is throw object?
It is exception handling
 
37.How will you handle the situation when object is not captured during record?
While recording the object is not recognised--go for low level recording.
 
virtual object vizard too right. But, if u find object not 
recognised by tool before start generating script.
 
38.What kind of errors can b handled in QTP in real time scenario?
1)      Pop-up Window
2)      Object state
3)      Test run error
4)      Application Crash
 
39.What is smart identification?
Smart identification comes into picture when Quick Test fails to recognize an object uniquely using the recorded properties. It follows the following process to identify the object:  
1.  QuickTest “forgets” the recorded test object description and creates a new object candidate list containing the objects (within the object’s parent object) that match all of the properties defined in the base filter property list.
 
2.  From that list of objects, QuickTest filters out any object that does not match the first property listed in the Optional Filter Properties list. The remaining objects become the new object candidate list.
 
3.  If the new object candidate list contains more than one object, then step 2 is repeated with the second property listed in Optional Filter Properties list.
 
5.      Step 3&4 are repeated until an the object in recognised uniquely.
 
40.in how many ways you perform batchtesting?
Another way to run a batch test is to accumaulate them in the Test lab tab of TestDirector and run from there
 
 
 
41.What is API
Application program interface
 
42.What is the differnce between action & script
A sequence of  related statements are called "Action".But a script will contain more than one Action
 
43.Synchronozation types in QTP
1. wait()
2. inserting Synchronization point.
 
44. What is User defined function in QTP
User defined functions are encapsulation of segments of code which is used several times in the script.They can be either within the QTP script or can be maintained in external .VBS or .TXT files.
 
45.How u call functions in QTP Function to calculate the length of characters in a word -
 
Function countChar(st)/*Vbscript Function
charLength = Length(st)
End Function
 
Assume above function countChar is written in VBscript, now you are getting the text from the Application and calling the Vbscript file and gets the length of the characters in the word
 
Dim textValue
textValue= Browser("Browser Name").Page("Page Name").Frame
("mainFrame_5").WebElement("12").GetROProperty("innertext")
 
executefile "*.*countChar(textValue)" /*calling the 
Vbscript file
textlength = charLength /*getting the text length
 
46.How you automate testscripts one by one or moduelwise or all at once
Test Automation is process which follows the framework designed for the company. This framework varies from one  organization to other. Here are some basic steps which are 
follwed in general...
Step1: Segregate the test cases to be automated.
Step2: Prepare the test data for the selected test cases
Step3: Make scripts for repeatable or functional scenarios
Step4: Convert those scripts as Reusable functions
Step5: Make test scripts by calling the reusable functions 
and adding the conditions as per your requirements.
 
 
47.After running scripts how you report results ,there is any specific report form
syntax is
report.reportevent event status,stepname,details
Argument-1 : event status are 4 types
             1)micpass or 0
             2)micfail or 1
             3)micdone or 2
             4)micwarning or 3
Argument-2 : The status of object we are going to report
Argument-3 : The details of the object.
 
reportstepname:
Name of the stepname in the report(object name)
 
details:
details of the object
 
Example:
Reporter.Reportevent 0,"custom step","step passed"
or
Reporter.Reportevent micpass,"custom step","step passed"
 
48.Anybody explain me, the concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables ?
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. Object, Page and Table checkpoints can be added using Standard check point.
 
1. A page checkpoint checks the characteristics of a Application 
2. An object checkpoint (Standard) checks the values of an object on a Application. 
3. A table checkpoint checks information within a table on a Application 
4. A text checkpoint checks that a text string is displayed in the appropriate place on a Application.
5.An image checkpoint checks the values of an image on a Application. 
6.An Accessiblity checkpoint checks the web page for Section 508 compliance. 
7.An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application.
8.A database checkpoint checks the contents of databases 
accessed by your web site
 
 
49.Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.
we can set the error or event in the recovery scenarion wizard and if the system faces such situation by the recovery scenario the system will get back to the desired action or events
 
50.how to test background color and dynamic images during runtime
It is possible only in web applications only.by using check points we have to test the back ground colour and dynamic images.
for eg: Yahoomail page
back ground colour is blue

Entry Filed under: QTP. .

3 Comments Add your own

  • 1. Ramesh  |  August 27, 2008 at 12:18 pm

    good

    Reply
  • 2. Rakesh  |  September 23, 2008 at 10:14 am

    Very good

    Reply
  • 3. satish rohan  |  October 16, 2008 at 8:23 am

    fantastic

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Blog Stats

Categories

Recent Posts

 

March 2008
M T W T F S S
« Jan   Jul »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Archives

Blogroll

Meta