Professional Documents
Culture Documents
5. How to recognise the objects during runtime in new build version (test
suite) comparing with old guim
Update GUI map file by teaching the Winrunner the new objects in the
application while it is running.
6. sample code: wait(20)what is the minimum and maximum time the above
mentioned synchronization statements
The maximum time is 20 seconds and the minimum time is one second
8. In a modular test tree,each test will receive the values for the parameters
passed from the main test.These
13. what is the new feature add in qtp 8.0 compare in qtp 6.0
•Advanced Key word Driven •Auto Documentation •Business Process Testing
•Added Parameters for parameterization •Step Generator for adding
programmatic statements with having programming knowledge. •Highlight option
in Object Repository •Results file in XML format
15. How to recognise the objects during runtime in new build version (test
suite) comparing with old guim
new build version runtime wizard same like a gui
17. without using the datadriven test, how can we test the application with
different set of inputs?
no
20. How to find the length of the edit box through WinRunner?
The question is quite ambiguous. Yet, the answer is in 2 fold.1. If you are seeking
for length of the text, then there is length function avialable in winrunner.2. If you
are looking for the edit box's (as a control) length, which is nothing but width,
then here is the code:obj_get_info(edit_box, "width"
23. what type of variables can be used with in the TSL function???
tiger Wrote: auto , static public,extern variables.auto: An auto variable can be
declared only within a function and is local to thatfunction. It exists only for as
long as the function is running. A new copy of thevariable is created each time
the function is called.static: A static variable is
32. how can we get the day of the week for specific date in winnrunner? is
it possible?
time_str([expression]) function will give the day of the week for specific date in
winnrunner.I appreciate your deep and excellence work in winrunner.
33. How do you check thecurrent item value in the list after I open a web
page with this list in WinRunner
list_get_selected ( list, out_item, out_num );will solve the problem that I have.It
will return an item (out_item) and the postion(out_num ) that is currently shown
on the list.To check the with the previous values I can store theprevious values in
file and then read it from the filelater to compare
34. how can we remove the data driven wizard script from the existing
script ? if there any settings available
There is no Wizard to remove DDT, you need to remove manually the following
statementsddt_open, ddt_get_row_count, ddt_set_row, ddt_val, ddt_close
36. What are the test case that we go for automate? What is the process
that we go while we are going before
41. What does Entry criteria and Exit criteria in the test plan means?
entry criteria: sign off proposal document by the client.exit criteria: sign off of test
plan document by the client (test strategy document)
45. what is the difference between winrunner 7.0 version and winrunner 7.5
version.
66. How do you run your script with multiple sets of expected results?
through DDT
71. How do you test a web application without opening the webbrowser?
Use Web_Browser_Invoke(IE, URL); to invoke the browser through the test script
instead of opening the application.
72. How do you view and evaluate test results for various check points?
Once the script is executed which has multiple checkpoints, the test results
window shows a detailed information of whether the chekpoint passed or
failed.As we know, checkpoints compare the expected results with the actual
results, we can evaluate the result.
73. What is the purpose of step, step into, step out, step to cursor
commands for debugging your scrip
The purpose of the commands are : STEP--> Runs a single lline of the TSL
script. STEP INTO--> Calls and displays another test/user-defined
function. STEP OUT-->Used in conjunction to STEP INTO and completes the
execution of the called test/user defined function. STEP TO CURSOR-->Runs
74. How do you declare external functions in TSL?
External functions are declared using the "extern" declaration that references an
external function. The syntax is: extern (parameter1,parameter2....). type-->
refers to the return type of the function.
79. Write TSL functions for the following interactive modes: i. Creating a
dialog box with any message you
Answers: 1. Dialog box with any message, and edit field create_input_dialog
( message ); message - Any expression. This expression will appear in the
dialog box as a single line. Return Values - This function returns a string. If no
string is found or if the Cancel button is
80. What TSL function you will use to pause your script?
we can also pause the script using pause() command.
86. Have you created test scripts and what is contained in the test
scripts?
It contains the statement in Mercury Interactive’s Test Script Language (TSL).
These statements appear as a test script in a test window. You can then enhance
your recorded test script, either by typing in additional TSL functions and
programming elements
95. What are the reasons that WinRunner fails to identify an object on the
GUI?
WinRunner fails to identify an object in a GUI due to various reasons. i. The
object is not a standard windows object. ii. If the browser used is not compatible
with the WinRunner version, GUI Map Editor will not be able to learn any of the
objects displayed in the browser window.
97. If the object does not have a name then what will be the logical name?
If the object does not have a name then the logical name could be the attached
text.
98. What is the different between GUI map and GUI map files?
The GUI map is actually the sum of one or more GUI map files. There are two
modes for organizing GUI map files. i. Global GUI Map file: a single GUI Map file
for the entire application ii. GUI Map File per Test: WinRunner automatically
creates a GUI Map file for each test created. GUI Map file
100. When you create GUI map do you record all the objects of specific
objects?
If we are learning a window then WinRunner automatically learns all the objects
in the window else we will we identifying those object, which are to be learned in
a window, since we will be working with only those objects while creating scripts.
103. What is the disadvantage of loading the GUI maps through start up
scripts?
If we are using a single GUI Map file for the entire AUT then the memory used by
the GUI Map may be much high. If there is any change in the object being
learned then WinRunner will not be able to recognize the object, as it is not in the
GUI Map file loaded in the memory. So we will have to learn
109. What different actions are performed by find and show button?
To find a particular object in the GUI Map file in the application, select the object
and click the Show window. This blinks the selected object. To find a particular
object in a GUI Map file click the Find button, which gives the option to select the
object. When the object is selected, if the
110. How do you identify which files are loaded in the GUI map?
The GUI Map Editor has a drop down “GUI File” displaying all the GUI Map files
loaded into the memory.
111. How do you modify the logical name or the physical description of the
objects in GUI map?
You can modify the logical name or the physical description of an object in a GUI
map file using the GUI Map Editor.
112. When do you feel you need to modify the logical name?
Changing the logical name of an object is useful when the assigned logical name
is not sufficiently descriptive or is too long.
115. How do you copy and move objects between different GUI map files?
We can copy and move objects between different GUI Map files using the GUI
Map Editor. The steps to be followed are: i. Choose Tools > GUI Map Editor to
open the GUI Map Editor. ii. Choose View > GUI Files. iii. Click Expand in the
GUI Map Editor. The dialog box expands to display two GUI
116. How do you select multiple objects during merging the files?
Use the Shift key and/or Control key to select multiple objects. To select all
objects in a GUI map file, choose Edit > Select All.
117. How do you clear a GUI map files?
We can clear a GUI Map file using the “Clear All” option in the GUI Map Editor.
125. What is the purpose of location indicator and index indicator in GUI
map configuration?
In cases where the obligatory and optional properties do not uniquely identify an
object, WinRunner uses a selector to differentiate between them. Two types of
selectors are available: i. A location selector uses the spatial position of objects.
126. How do you handle custom objects?
A custom object is any GUI object not belonging to one of the standard classes
used by WinRunner. WinRunner learns such objects under the generic “object”
class. WinRunner records operations on custom objects using obj_mouse_
statements. b. If a custom object is similar to a standard
127. What is the name of custom class in WinRunner and what methods it
applies on the custom objects?
WinRunner learns custom class objects under the generic “object” class.
WinRunner records operations on custom objects using obj_ statements.
128. In a situation when obligatory and optional both the properties cannot
uniquely identify an object what
In cases where the obligatory and optional properties do not uniquely identify an
object, WinRunner uses a selector to differentiate between them. Two types of
selectors are available: i. A location selector uses the spatial position of objects.
ii. An index selector uses a unique number to identify
130. How do you find out which is the start up file in WinRunner?
The test script name in the Startup Test box in the Environment tab in the
General Options dialog box is the start up file in WinRunner.
131. What are the virtual objects and how do you learn them?
Applications may contain bitmaps that look and behave like GUI objects.
WinRunner records operations on these bitmaps using win_mouse_click
statements. By defining a bitmap as a virtual object, you can instruct WinRunner
to treat it like a GUI object such as a push button, when you record and run
137. How do you maintain the document information of the test scripts?
Before creating a test, you can document information about the test in the
General and Description tabs of the Test Properties dialog box. You can enter the
name of the test author, the type of functionality tested, a detaileddescription of
the test, and a reference to the relevant functional specifications
138. What do you verify with the GUI checkpoint for single property and
what command it generates, explain
You can check a single property of a GUI object. For example, you can check
whether a button is enabled or disabled or whether an item in a list is selected.
To create a GUI checkpoint for a property value, use the Check Property dialog
box to add one of the following functions to the test script
139. What do you verify with the GUI checkpoint for object/window and
what command it generates, explain
You can create a GUI checkpoint to check a single object in the application being
tested. You can either check the object with its default properties or you can
specify which properties to check. b. Creating a GUI Checkpoint using the
Default Checks i. You can create a GUI checkpoint that performs
140. What do you verify with the GUI checkpoint for multiple objects and
what command it generates, explain
To create a GUI checkpoint for two or more objects: i. Choose Create > GUI
Checkpoint > For Multiple Objects or click the GUI Checkpoint for Multiple
Objects button on the User toolbar. If you are recording in Analog mode, press
the CHECK GUI FOR MULTIPLE OBJECTS softkey in order to avoid extraneous
141. What information is contained in the checklist file and in which file
expected results are stored?
The checklist file contains information about the objects and the properties of the
object we are verifying. b. The gui*.chk file contains the expected results which is
stored in the exp folder
142. What do you verify with the bitmap check point for object/window and
what command it generates, explain
You can check an object, a window, or an area of a screen in your application as
a bitmap. While creating a test, you indicate what you want to check. WinRunner
captures the specified bitmap, stores it in the expected results folder (exp) of the
test, and inserts a checkpoint in the test script. When
143. What do you verify with the bitmap checkpoint for screen area and
what command it generates, explain
You can define any rectangular area of the screen and capture it as a bitmap for
comparison. The area can be any size: it can be part of a single window, or it can
intersect several windows. The rectangle is identified by the coordinates of its
upper left and lower right corners, relative to the
144. What do you verify with the database checkpoint default and what
command it generates, explain synta
By adding runtime database record checkpoints you can compare the information
in your application during a test run with the corresponding record in your
database. By adding standard database checkpoints to your test scripts, you can
check the contents of databases in different versions of your
145. How do you handle dynamically changing area of the window in the
bitmap checkpoints?
The difference between bitmaps option in the Run Tab of the general options
defines the minimum number of pixels that constitute a bitmap mismatch
146. What do you verify with the database check point custom and what
command it generates, explain synta
When you create a custom check on a database, you create a standard
database checkpoint in which you can specify which properties to check on a
result set. b. You can create a custom check on a database in order to: i. check
the contents of part or the entire result set ii. edit the expected results
147. What do you verify with the sync point for object/window property and
what command it generates, explain
Synchronization compensates for inconsistencies in the performance of your
application during a test run. By inserting a synchronization point in your test
script, you can instruct WinRunner to suspend the test run and wait for a cue
before continuing the test.b. You can a synchronization point
148. What do you verify with the sync point for object/window bitmap and
what command it generates, explain
You can create a bitmap synchronization point that waits for the bitmap of an
object or a window to appear in the application being tested. b. During a test run,
WinRunner suspends test execution until the specified bitmap is redrawn, and
then compares the current bitmap with the expected one captured
149. What do you verify with the sync point for screen area and what
command it generates, explain synta
For screen area verification we actually capture the screen area into a bitmap
and verify the application screen area with the bitmap file during execution
Syntax: obj_wait_bitmap(object, image, time, x, y, width, height);
150. How do you edit checklist file and when do you need to edit the
checklist file?
WinRunner has an edit checklist file option under the create menu. Select the
“Edit GUI Checklist” to modify GUI checklist file and “Edit Database Checklist” to
edit database checklist file. This brings up a dialog box that gives you option to
select the checklist file
160. What check points you will use to read and check text on the GUI and
explain its syntax?
You can use text checkpoints in your test scripts to read and check text in GUI
objects and in areas of the screen. While creating a test you point to an object or
a window containing text. WinRunner reads the text and writes a TSL statement
to the test script. You may then add simple programming
162. Explain Get Text checkpoint from screen area with syntax?
We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text
from a window.
163. Explain Get Text checkpoint from selection (web only) with syntax?
Returns a text string from an object. web_obj_get_text (object, table_row,
table_column, out_text [, text_before, text_after, index]); i. object The logical
name of the object. ii. table_row If the object is a table, it specifies the location of
the row within a table. The string is preceded by
164. Explain Get Text checkpoint web text checkpoint with syntax?
We use web_obj_text_exists function for web text checkpoints.
web_obj_text_exists ( object, table_row, table_column, text_to_find [,
text_before, text_after] ); object The logical name of the object to search. b.
table_row If the object is a table, it specifies the location of the row within a table.
165. Which TSL functions you will use for
Searching text on the window i. find_text ( string, out_coord_array, search_area [,
string_def ] ); string The string that is searched for. The string must be complete,
contain no spaces, and it must be preceded and followed by a space outside the
quotation marks. To specify a literal, case-sensitive
167. Record a data driven test script using data driver wizard?
You can use the DataDriver Wizard to convert your entire script or a part of your
script into a data-driven test. For example, your test script may include recorded
operations, checkpoints, and other statements that do not need to be repeated
for multiple sets of data
180. Which TSL function you will use to compare two files?
We can compare 2 files in WinRunner using the file_compare function. Syntax:
file_compare (file1, file2 [, save file]);
183. What is the use of treturn and texit statements in the test script?
The treturn and texit statements are used to stop execution of called tests. i. The
treturn statement stops the current test and returns control to the calling test. ii.
The texit statement stops test execution entirely, unless tests are being called
from a batch test. In this case, control is
184. Where do you set up the search path for a called test.
The search path determines the directories that WinRunner will search for a
called test. b. To set the search path, choose Settings > General Options. The
General Options dialog box opens. Click the Folders tab and choose a search
path in the Search Path for Called Tests box. WinRunner searches
185. How you create user-defined functions and explain the syntax?
A user-defined function has the following structure: [class] function name ([mode]
parameter...) { declarations; statements; }b. The class of a function can be either
static or public. A static function is available only to the test or module within
which the function was defined. c. d. Parameters
189. What does auto, static, public and extern variables means?
auto: An auto variable can be declared only within a function and is local to that
function. It exists only for as long as the function is running. A new copy of the
variable is created each time the function is called. b. static: A static variable is
local to the function, test, or compiled module
190. How do you declare constants?
The const specifier indicates that the declared value cannot be modified. The
class of a constant may be either public or static. If no class is explicitly declared,
the constant is assigned the default class public. Once a constant is defined, it
remains in existence until you exit WinRunner.
195. What are batch tests and how do you create and run batch tests ?
A batch test is a script that contains call statements to other tests.A batch test is
created by selecting the "Run in batch mode" from the run tab in the Tools--
>General Options. A batch test runs as a regular test. The only difference being
that all messages like pause,wait...etc are suppressed
196. How do you execute your tests from windows run command?
u can execute ur test in c compiler with window run command.as tsl is c based
language
198. During debugging how do you monitor the value of the variables?