QTP Interview Questions - DOC

Document Sample
QTP Interview Questions - DOC Powered By Docstoc
					for more QTP scripts, visit                   www.ramupalanki.com

Question Explain about V-model? © ALL Interview .com
Answer V-model is a model in wch we do verification and validation parallely...
Answer V-Model is one of the software development model, it is suitable for short-term
projects.
here both verification & validation activities are done parallely as soon as get the
requirement from the customer.In v-model, left side of v is Verification done and right
side of v is validation done.
In verifiction side, get the requirement from customer(CRS)& then that CRS is extracted as
Software Requirement Specification(SRS)& then SRS is converted to Arctect design(HLD)ie,gh
level design document it's done by Senior Arctect & then HLD is divided as LLD(low level
design document)is done by Senior software enggr.and then coding will be done based on
LLD.here all documents are verified and reviewed. and other side of v-model is Validation
activity, here from bottom to up like wise unit tesing is done based on LLD document,then
Integration testing is done based on HLD document, then System testing is done based on SRS
document after finish the System testing , end project move across to Customer side, here
customer done Acceptance testing based on CRS.it consists of two testing one is
alpha testing is done controlled environment at developer's site with customer involvement,
and another one is beta testing is done by end user at real world condition.
Who will repare SRS?
What is the basis for SRS preparation? © ALL Interview .com
Answer The System Analyst/Project Manager/Technical Manager prepare SRS
They are going to check the application on below areas
1. Feasibility of application
2. Tentative Planning
3. Technology Selection
4. Requirrement Analysis
Question what is regression testing? © ALL Interview .com
Answer After the Bug fixed ,testing the application whether the fixed bug is affecting
remaining functionality of the application or not.
Question         How will you prepare Test plan. What are the techniques
involved in preparing the Test plan. © ALL Interview .com
Answer Test Plan will prepared bt TEST lead& as a Test engineer we
involves in
1)desigining the test cases
2)Executing the test cases
3)bug tracking
d)report defect
Answer Test plan means planning for the release. Ts includes Project background
Test Objectives: Brief overview and description of the document
Test Scope: setting the boundaries
Features being tested (Functionalities)
Hardware requirements
Software requirements
Entrance Criteria (When to start testing): Test environment established, Builder received
from developer, Test case prepared and reviewed.
Exit criteria (when to stop testing):    All bug status cycle are closed, all
functionalities are tested, and all gh and medium bugs are resolved. Project milestones:
dead lines
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)
How does Parameterization and Data-Driving relate to each other in QTP?

www.ramupalanki.com
for more QTP scripts, visit          www.ramupalanki.com

To datadrive we have to parameterize.i.e. we have to make the constant value as parameter,
so that in each iteraration (cycle) it takes a value that is supplied in run-time
datatable. Through parameterization only we can drive a transaction(action) with different
sets of data. You know running the script with the same set of data several times
is not suggestable, & it's also of no use.
Discuss QTP Environment.
QuickTest Pro environment using the graphical interface and ActiveScreen technologies - A
testing process for creating test scripts, relating manual test requirements to
automated verification features - Data driving to use several sets of data using one test
script.
What is a Run-Time Data Table? Where can I find and view this table
In QTP, there is data table used , which is used at runtime.

-In QTP, select the option View->Data tabke.
-This is basically an excel file, which is stored in the folder of the test created, its
name is Default.xls by default.
How to handle dynamic objects in QTP?
by using reguler expressions we can handle dynamic objects in qtp   OR
QTP has a unique feature called Smart Object Identification/recognition. QTP generally
identifies an object by matching its test object and run time object properties. QTP may
fail to recognise the dynamic objects whose properties change during run time. Hence it has
an option of enabling Smart Identification, wherein it can identify the objects even if
their properties changes during run time.
Check this out-
If QuickTest is unable to find any object that matches the recorded object description, or
if it finds more than one object that fits the description, then QuickTest ignores
the recorded description, and uses the Smart Identification mechanism to try to identify
the object.While the Smart Identification mechanism is more complex, it is more flexible,
and thus, if configured logically, a Smart Identification definition can probably help
QuickTest identify an object, if it is present, even when the recorded description fails.
The Smart Identification mechanism uses two types of properties:
Base filter properties—The most fundamental properties of a particular test object class;
those whose values cannot be changed without changing the essence of the original
object. For example, if a Web link's tag was changed from to any other value, you could no
longer call it the same object. Optional filter properties—Other properties that
can help identify objects of a particular class as they are unlikely to change on a regular
basis, but which can be ignored if they are no longer applicable.
Explain in brief about the QTP Automation Object Model.
Essentially all configuration and run functionality provided via the QuickTest interface is
in some way represented in the QuickTest automation object model via objects, methods, and
properties. Although a one-on-one comparison cannot always be made, most dialog boxes in
QuickTest have a corresponding automation object, most options in dialog boxes can be set
and/or retrieved using the corresponding object property, and most menu commands
and other operations have corresponding automation methods. You can use the objects,
methods, and properties exposed by the QuickTest automation object model, along with
standard programming elements such as loops and conditional
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.
What are the different scripting languages you could use when working with QTP ?
Visual Basic (VB),XML,JavaScript,Java,HTML
What does VBS file contain...??? what is VBS file.. ???

www.ramupalanki.com
for more QTP scripts, visit          www.ramupalanki.com

vbs file contains the user defined functions which are reusable that can be used in our
test or compnent according to our requirement
What are the properties you would use for identifying a browser & page when using
descriptive programming ?
"name" would be another property apart from "title" that we can use.
OR
We can also use the property "micClass".
ex: Browser("micClass:=browser").page("micClass:=page")..
What is the file extension of the code file & object repository file in QTP?
File extension of
-- Per test object rep :- filename.mtr
-- Shared Oject rep :- filename.tsr
Code file extension id script.mts
what is the use of Text output value in Qtp?
Output values enable to view the values that the application talkes during run time.When
paramaterised, the values change for each iteration.Thus by creating output
values, we can capture the values that the application takes for each run and output them
to the data table.
What are the Features & Benefits of Quick Test Pro (QTP)..?
(a). Key word driven testing
(b). Suitable for both client server and web based application
(c). Vb script as the scriot language
(d). Better error handling mechanism
(e). Excellent data driven testing features
By default Action1 runs first in QTP. Is it possible to start the run with Action2?
es it is possible. Place the cursor at the start of your Action2 and right click, select
Run from Step.
What is parameterization? What is syncronization pt.?
QuickTest enables you to expand the scope of a basic test or component byreplacing fixed
values with parameters. This process, known as parameterization,it greatly increases the
power and flexibility of your test or component.
synchronization point is that which handles anticipated timing problems by ensuring that QT
waits for some times until the application is ready for the next step
what is descriptiveprograming? how to do object identification thrugh Descriptive and is
possible smart identification or not
Descriptive Programming: Whenever QTP records any action on any object of an
application, it adds some description on how to recognize that object to a repository of
objects called object repository. QTP cannot take action on an object until unless its
object description is in the Object Repository. But descriptive programming provides a way
to perform action on objects which are not in Object repository
What are accessibility check point and xml check point?
Identifies areas of a Web site to check for Section 508 compliancy.
Check if the images on a Web page include ALT properties, Activex checks, Applet check,
Frame work, multimedia links, serverside images required by the W3C Web Content
Accessibility Guidelines
XML check point id used to check the statistical information of webpage or web page frame.
   XML Check point has two modes
   1.XML check point for Page
   2.XML check point for Frame.
 XML check point for Page,It verifies broken links
 XML check point for Frame,It verifies no of links No of Bitmaps,...etc
when qtp recognizes a web link like (hyper link)wich properties it is going to take to
identify the objects unquely? what is Ini file in QTP?
QTP recognises the web link with following object properties
             Name :

www.ramupalanki.com
for more QTP scripts, visit          www.ramupalanki.com

           Class:
FOR example if you click on web link like www.yahoo.com,
QTP recognised the link with folling attributes:
           Name:Yahoo!
           class:page
           inthis way it identies the web link.
How to load a object repository(using VBScript) ... very urgent....
Dim app
Set app =CreateObject("QuickTest.application")
app.test.settings.resources.ObjectRepositoryPath
= "C:\Documents and Settings\\aa.tsr"
Can any body tell me how can I choose the share object repository and per action object
repository mode. Please give me with steps.
In QTP, default mode is per-action. We have a multiple actions within the same script,
each and every action contains separate object repository. In per-action both
script and object repository both are tied with each other.
     If you choose as shared object repository, all actions contains only one object
repository. We can use this object repository to any actions, and memory is also save. Here
script and object repository both are independent with each other.
     Go to test menu --> click resources tab --> you can view shared or per-action object
repository.(In QTP 8.2 version)
What are FAST and NORMAL modes in qtp ? Why r these modes intended for ?
When ur running from QC it is in Fast Mode and Normal Mode is when execute from QTP.
Main Difference is in Fast Mode QTP doesn't show Execution marker where as in Normal Mode
it will show the Execution Marker.
What is the difference between "call to action" and "call an existing action"
call to action : the changes made in call to action, will be reflected in original
action(from where the script is called).But where as in call to copy Action , the changes
made in the script will not effect the original script(Action).call an existing action
means calling a reusable action that is stored in same test or in some other
test wich is like a function call.
Re: how do u retrieve data from a database ? i.e. i want to retrieve 2nd record only from a
database ? write code for this. by using ADODB connecton, RSOBJ and using a FOR loop we can
retrieve all the records( ex: if we give query as select * from emp). but i want only 2nd
record. so how to acheive this.
I think you need to set your for loop so that it reads only
2 records or as many records from the record set that you
want. i.e for i = 1 to 2
read the next record
next
 this way you have the 2nd record
how do check the links in a webpage ?
You can check it using
“if obj_ChkDesc(“html tag”).value = empty then”
How do u write regular expression for a window name which is changing for each build ? i.e.
in first build the window name is : "computer graphics are very ...." . in second build the
window name is : "computer graphics can be created" . - Appreciate proper replies
I think the right answer is "computer graphics.*".
Here “.” means any single character and “*” means 0 or more
occurrences of preceding character. So .* means 0 or more
occurrences of any character.
How do u write a regular expression for date (dd/mm/yyyy) field ?
[0-3][0-9]/[0-1][0-9]/[1-2][0-9][0-9][0-9][0-9]
 Pls let me know completely about descriptive programming, where it is used, pls explain
with a real time example of its occurence and the program code written in qtp.

www.ramupalanki.com
for more QTP scripts, visit          www.ramupalanki.com

Whenever QTP records any action on any object of an application, it adds some description
on how to recognize that object to a repository of objects called object repository. QTP
cannot take action on an object until unless its object description is in the Object
Repository. But descriptive programming provides a way to perform action on
objects which are not in Object repository
There are two ways in which descriptive programming can be used
1.      By creating properties collection object for the description.
2.      By giving the description in form of the string arguments.
Hi guys, can anyone explain me whats the method for reporting the QTP test results to
teamlead or non-QA member (developer/PM)? Thanks in Advance!!!!!
Prepare a Text file with High Level results then report by mailing the same.
How do u retrieve data from a text file into different variables. i.e. in a text file named
"source" , the data is like : india,1000,japan,200,china,50,singapore,45050 this is given
in the first line of the text file. in the second line of the text file the dta is:
sun,moon,planet,river,earth,water if u use "readline" method by using FSO concept u can
retrieve the entire line in to a variable. but i want to import each field (ex: "india" in
one variable, "1000" in another variable etc..). Apprecitae proper replies.
set fso=createobject("scripting.filesystemobject")
set f=opentextfile(path,1)
set a=new regexp
a.pattren="[a-z]+|(\d)+"
a.ignorecase=true
a.global=true
do while f.atendofstream <>true
r=f.readline
set b=a.execute(r)
for each val in b
msgbox val
next
loop
f.close
dz will get u much information later u can modify as per ur requriment.
I am using excel sheet to export data to QTP but it selects just one row of data from excel
sheel how to import all rows of excel sheet to QTP during runtime
Here i am sharing a small snippet script, to import the data from Excel sheet to QTP during
runtime and using the values.
I have an Excel sheet which contains OrderNumber column and its values. After that i am
displaying the order numbers in excel during runtime.
datatable.Import("E:\Programming Samples\QTP Samples\OrderNumbers.xls")
datatable.GetSheet(1)
rowCount=datatable.GetRowCount
For i=1 to rowCount
        datatable.SetCurrentRow(i)
        val=datatable.Value("OrderNumber","Global")
        msgbox(val)
Next
While recording a login window QTP is identifying only parent window,then how can u
identify the child objects.
you can use "ChildObjects" method to to identify child objects
for Eg:It will click on all child objects
Set oDesc = Description.Create()
oDesc("html tag").Value = "INPUT"
 set hai=Browser("WinCraft2 - Enterprise_2").Page
("WinCraft2 - Enterprise").Frame("content").ChildObjects
(oDesc)

www.ramupalanki.com
for more QTP scripts, visit          www.ramupalanki.com

count1=hai.count()
msgbox hai1
For i=1 to count1
hai(2).click
Next
I want to check in the data table(Globalsheet) column exist or not through script .If
column not exist only proceeded to next step Pls tell me how to proceeded?
Function isParameterExists(sheetName, paramName)
isParameterExists = FALSE
ParamTotal = DataTable.GetSheet("Global").GetParameterCount

For i = 1 To ParamTotal
value = DataTable.GetSheet("Global").GetParameter(i).Name
Msgbox value
If strComp(paramName,value)=0 Then
isParameterExists=TRUE
Exit Function
End if
Next
End Function
'Example:
If isParameterExists("Global","hh") then
msgbox "Patameter exists"
Else
msgbox "Patameter does not exist"
<Your statements>
End if
what is QTP batch testing tool?
in qtp tool only one option is avaliable to do batch testing .(batch run, see in the amd
tool in qtp)batch testing is nothing but run the test suite(a set of
test scripts). In this just give the path of each script and run the batch.
suppose u hav a dialog or window which contains 10 buttons with same name & value. now how
to check each button? i.e. how qtp indetifies these objects separately?
QTP identifies object based on mandatory properties ,assitive properties which are present
in the object repositery and it also uses its smart identification if it is enable .if at
all it unable to find the object with this properties it will go for ordinal identifier OR

This Will Show the order used to identify the object when two or more objects get
duplicated.
tools -> object identification
select the environment
a) standard windows
b) active-X
c) visual basic
d) multi media
select the class if we select the environment as standard window and class as winbutton
then it will display
Mandatory properties Assistive properties ordinaliden-
                                            tifier
-------------------- ------------------- ------------
a)Native class         a)window-ID          a)location
b)Test                                      b)Index
what is the process to follow between writing the test cases & then atomating it?
Manual written test cases will help at the first execution of the build and it will be
consumed upto the get the stable build. It includes all the validations and the

www.ramupalanki.com
for more QTP scripts, visit          www.ramupalanki.com

behaviour of the application . In this scripts the Navigation steps should be clear.

Automation of scripts will happens after getting stable build to test regression effects.
The same scripts which we executed manually will be used for automation. Based on the
expected values we will be placing the check points. Automation is not a creation of test
cases but same written test cases will be automated by record and play back option.




www.ramupalanki.com