0% found this document useful (0 votes)
488 views

Winrunner QA4

The collection of objects is called object repository. Qtp is supported to xml. In QTP two types of chackpoints are there. Depending on project and application many test scripts can be generated. The number of test scripts is not fixed.

Uploaded by

api-3803253
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
488 views

Winrunner QA4

The collection of objects is called object repository. Qtp is supported to xml. In QTP two types of chackpoints are there. Depending on project and application many test scripts can be generated. The number of test scripts is not fixed.

Uploaded by

api-3803253
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 22

WINRUNNER

1. PLz tell me any another function in WinRunner for file comparison


except file_compare(,,)?. Or give

2. what is object repository


The collection of objects is called object repository. For example, text box,
calendar, button etc.

3. Is it possible in WinRunner to handle result dir path through WinRunner


script?
Yes its possible to handle a results directory in winrunner.

4. How do you parse xml?what tool do u use?


Winrunner is not support to XML. QTP is supported to XML. In QTP two types of
chackpoints are there one is web Xml chackpoint, document chackpoint.

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

7. Where in the user-defined function library should a new error code be


defined?1.At the begining of the

8. In a modular test tree,each test will receive the values for the parameters
passed from the main test.These

9. what is the scripting process in winrunner?


The testing proces in winrunner or In any typicall automation tools is 1. Learning
of objects/Creating Object Repository2. Record the Navigation Flow/Record The
User Action3. Edit Scripts/Placing user Check Points4. Debug Scripts/For Syntax
Check5. Run Scripts/Executed Scripts6. Analyze Results/Compare

10. how many scripts can we generate for one project?


Depending on project and application many test scripts can be generated. The
number of test scripts is not fixed.

11. What is the command in Winrunner ti invoke IE Browser?And once I


open the IE browser is there a unique
web_browser_invoke(IE,URL);
12. How do you load default comments into your new script like IDE's?

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

14. When will you go to automation?


And also depends on interface the application developed. No. of future versions
expected and maturity between the releases.

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

16. what is use of GUI files in winrunner.


GUI files consists of object's physical description( like class,label,MSW
class,window).

17. without using the datadriven test, how can we test the application with
different set of inputs?
no

18. How do you load compiled module inside a comiled module?


In the similar way as you do in the main script. Use load command in the
compile module itself.load("path");

19. can u tell me the bug life cycle

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"

21. What is file type of winruuner test files , its extension.?

22. what is candidate release??


When a tester has completed the testing of a project and the AUT has been
moved to production environment and been accepted by the stakeholders then
the tester is released or signed of from the project

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

24. how to test the stored procedure???


You first unit-test each procedure by feeding it appropriate test data, observing
the outcome, and retesting as needed to make sure the bug fixes contain no new
errors. Unit-testing a stored procedure involves a series of test-debug-retest
cycles. The number of cycles will depend on your company's defect

25. WinRunner is suitable for which type of applications?

26. Is it possible to conduct loadtesting with winrunner?I f possible how to


test?
SrujanWe can test performnace somehow using winrunner.Using TSL function
get_time();

27. What is the framework of winrunner?


Depending on the Project what Architecture we had Designed (Test Automation
Architecture For Winrunner) for the project.We will place all the folders in our
centralized repository like this
COMPANYNAME_PROJECTNAME_AUTOMATION this is the main folder and
the sub folders are Ex: Test Data,GUI

28. How WinRunner reads the color of the window/Object?


winrunner cannot read the colour of the objects but it can differentiate between
them by bitmap checkpoint and if there is a pixel difference between the images
it shows the image where the difference in images

29. Conduct a Testing Java application Which add-in's Selected in


Winrunneer?

30. what is the process of Functionality Testing?


when you do the testing in the project just we can check the functionality how to
work the project here we cant test the code just how it works this module.

31. how to conduct testing in Broken-links using Winrunner?

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

35. how to compile a module in winrunner?


Go to File-> Test Properties->General,Select Compiled Module from the Test type
list box and click Apply then OK Button.

36. What are the test case that we go for automate? What is the process
that we go while we are going before

37. What is the use of Framework?


The Template test provides a basic framework of an automated test that
navigates through your application. It opens and closes each window, leaving
space for you to add code (through recording or programming) that checks the
window WinRunner, Mercury Interactive and the Mercury Interactive

38. Explain WinRunner testing process?


WinRunner testing process involves six main stages: i. Create GUI Map File so
that WinRunner can recognize the GUI objects in the application being tested ii.
Create test scripts by recording, programming, or a combination of both. While
recording tests, insert checkpoints where you want to check

39. How you will make changes in thousands of automated scripts if


interface and functionality of application
If there are thousands of scripts and a CR forces all the scripts to modify
accordingly, it's always better to create the GUI files again and rerecord the
scenarios, where the CRs affects.

40. Write and explain compile module?

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)

42. What is the difference between set_window and window_activate?


set_window function is used for giving input to the window.win_activate function
is used for the activate window.Note: In scripts, important to use win_activate
function before set_window function in point of syncronization
43. Given a set_window("main",10); what is the essential of 10? what
difference it makes with synchronizatio
Given a set_window("main",10); what is the essential of 10?Anwer:The meaning
of 10 here is timing for the execution of that statement.If you are using
synchronization then the statement is wait untill the point given by u is not meets
but here the statement is using default time

44. In a winRunner script let say we have code sleep(10);


set_window("main",5); what will be the result?

45. what is the difference between winrunner 7.0 version and winrunner 7.5
version.

46. A screen with 10 records is displayed, On Clicking of each and every


column, it should sort all the records

47. What do you mean by "Regular Expressions" ? In Real time, where we


will use this? Give me some
While using an web application, if suppose u want to captured filed value that is
alphanumeric for one iteration and numeric for another iteration, so we can't able
to check/verify our result whether the field is alphanumberic/numberic,in this
situation we can use regular expression. Example

48. What do you mean by "Function Decomposition" in winrunner?

49. How to connect to Oracle DB using winrunner


We can also connect using db_connect("ses", "dsn") to get complete control on
DB

50. How you will write Test case in Winrunner?


Nobody will write test cases in WinRunner. Just we will write the Test Script for a
corresponding test case. Initially we write all manual test cases. We will write the
test scripts for the corresponding test cases.

51. How cache memory is released in winrunner?


Restart the winrunner.It will help you.

52. Which Type of GUI file is Preferable?


if you are new to winrunner then GUI map file per test is preferable and for
advanced users Global GUI map file is prefered

53. How do you call windows APIs, explain with an example?


LOAD THE DLL WHICH CONTAINS THE FUNCTIONS WHICH U WANT TO
USE (EX : USER32.DLL) DECLARE THE FUNCTION IN UR SCRIPT WITH
"EXTERN" KEYWORD. USE IT WHERE EVER IT IS REQUIRED.
54. Have you used WinRunner in your project?
WinRunner for creating automates scripts for GUI, functional and regression
testing of the AUT.

55. How you created you test scripts 1) by recording or 2) programming?


Programming. I have done complete programming only, absolutely no recording.

56. Difference Between set_window and win_activate


set_window: specifies the window to receive subsequent input and
(optionally)specifies the amount of time to wait for the specified
window.win_activate:The win_activate function makes the specified window the
activewindow by bringing it into focus and raising it to the top of the
display(equivalent to

57. How to make comments in GUI Map File?


make the comment in GUI map file by selecting the statements which you want
to comment and press Ctrl and T.

58. How an Argument is passed in WinRunner


Select File menu / Test Properties, click on Test Parameters Tab then click on
Add button to create a Parameter. You need to pass a value while calling this
script.

59. How do you view the results of file comparison?


file_compare(file_1,file_2[,save_file]);

60. What is the difference between script and compile module?


Test script contains the executable file in WinRunner while Compiled Module is
used to store reusable functions. Complied modules are not executable. b.
WinRunner performs a pre-compilation automatically when it saves a module
assigned a property value of “Compiled Module”. c. By default

61. How do you update your expected results?


help of updating mode

62. why choose winrunner , being it is costly tool ?


it depends on the choice of the end user. If the user feels that the AUT is
extensive and could really benefit from using WR and if there are plenty of
Versions/Data Driven Test/Regression cycles etc and it could be done with
minimal user interaction through WR ,they can go for it..

63. Why should we create Framework?

64. What are the contents of Framework?


65. What is the command in winrunner to get dos prompt?
The dos_system function executes a DOS system command from within a
WinRunner test script. dos_system ( expression ); Example dos_system("echo
dos_system demo > c:demo.tmp"); - writes a line to the file .

66. How do you run your script with multiple sets of expected results?
through DDT

67. How do you call a function from external libraries (dll).


if u want call dll file through Winrunner, u should use api controls. it is a special
functions

68. How do you store and view batch test results?


To store Batch test result When you run a regular, interactive test, results are
stored in a subfolder under the test. The same is true when a test is called by a
batch test. WinRunner saves the results for each called test separately in a
subfolder under the test. A subfolder is also

69. What are the stages in winrunner?


Learning the objects through guimapin the
application/Recording/Editing/Running/Analysis of results/Report the Defects

70. How WinRunner handles varying window labels?


We can handle varying window labels using regular expressions. WinRunner
uses two “hidden” properties in order to use regular expression in an object’s
physical description. These properties are regexp_label and regexp_MSW_class.
i. The regexp_label property is used for windows

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.

75. What is the purpose of tl_step command?


Used to determine whether sections of a test pass or fail. Syntax:
tl_step(step_name, status, description);

76. What is a watch list?


Watch list enables to monitor the values of variables, expressions and arrays
while we debug a test script.

77. What is the purpose of setting a break point?


we can use breakpoints to help debug our test scripts. A breakpoint stops a test
run at a specified line in the test script, or in a specified function. You may want to
stop a test run using a breakpoint in order to: 1.monitor the entries in the Watch
List 2.begin stepping through a test script

78. What is the purpose of load_dll?


Load_dll will help us to load dll into memory and call functions inside the dll

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.

81. What is the purpose of Wdiff utility?


WDiff v1.49 utility that displays differences between text files in directories
(folders) or zip archives.

82. Write and explain various loop command?


A for loop instructs WinRunner to execute one or more statements a specified
number of times. It has the following syntax: for ( [ expression1 ]; [ expression2 ];
[ expression3 ] ) statement i. First, expression1 is executed. Next, expression2 is
evaluated. If expression2 is true, statement is

83. When it is appropriate to change physical description?


Changing the physical description is necessary when the property value of an
object changes.
84. What is contained in the GUI map?
WinRunner stores information it learns about a window or object in a GUI Map.
When WinRunner runs a test, it uses the GUI map to locate objects. It reads an
object’s description in the GUI map and then looks for an object with the same
properties in the application being tested. Each of these

85. How does WinRunner recognize objects on the application?


WinRunner uses the GUI Map file to recognize objects on the application. When
WinRunner runs a test, it uses the GUI map to locate objects. It reads an object’s
description in the GUI map and then looks for an object with the same properties
in the application being tested.

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

87. How does WinRunner evaluates test results?


Following each test run, WinRunner displays the results in a report. The report
details all the major events that occurred during the run, such as checkpoints,
error messages, system messages, or user messages. If mismatches are
detected at checkpoints during the test run, you can view the expected

88. Have you performed debugging of the scripts?


We can debug the script by executing the script in the debug mode. We can also
debug script using the Step, Step Into, Step out functionalities provided by the
WinRunner.

89. How do you run your test scripts?


We run tests in Verify mode to test your application. Each time WinRunner
encounters a checkpoint in the test script, it compares the current data of the
application being tested to the expected data captured earlier. If any mismatches
are found, WinRunner captures them as actual results.

90. How do you analyze results and report the defects?


Following each test run, WinRunner displays the results in a report. The report
details all the major events that occurred during the run, such as checkpoints,
error messages, system messages, or user messages. If mismatches are
detected at checkpoints during the test run, you can view the expected

91. What is the use of Test Director software?


TestDirector is Mercury Interactive’s software test management tool. It helps
quality assurance personnel plan and organize the testing process. With
TestDirector you can create a database of manual and automated tests, build test
cycles, run tests, and report and track defects. You can also

92. How you integrated your automated scripts from TestDirector?


When you work with WinRunner, you can choose to save your tests directly to
your TestDirector database or while creating a test case in the TestDirector we
can specify whether the script in automated or manual. And if it is automated
script then TestDirector will build a skeleton for the script

93. What are the different modes of recording?


There are two type of recording in WinRunner. i. Context Sensitive recording
records the operations you perform on your application by identifying Graphical
User Interface (GUI) objects. ii. Analog recording records keyboard input, mouse
clicks, and the precise x- and y-coordinates traveled by

94. What is the purpose of loading WinRunner Add-Ins?


Add-Ins are used in WinRunner to load functions specific to the particular add-in
to the memory. While creating a script only those functions in the addin selected
will be listed in the function generator and while executing the script only those
functions in the loaded add-in will be executed

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.

96. What do you mean by the logical name of the object.


An object’s logical name is determined by its class. In most cases, the logical
name is the label that appears on an object.

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

99. How do you view the contents of the GUI map?


GUI Map editor displays the content of a GUI Map. We can invoke GUI Map
Editor from the Tools Menu in WinRunner. The GUI Map Editor displays the
various GUI Map files created and the windows and objects learned in to them
with their logical name and physical description.

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.

101. What is the purpose of set_window command?


Set_Window command sets the focus to the specified window. We use this
command to set the focus to the required window before executing tests on a
particular window. Syntax: set_window(<logical name>, time); The logical name
is the logical name of the window and time is the time the execution

102. How do you load GUI map?


We can load a GUI Map by using the GUI_load command. Syntax:
GUI_load(<file_name>);

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

104. How do you unload the GUI map?


We can use GUI_close to unload a specific GUI Map file or else we call use
GUI_close_all command to unload all the GUI Map files loaded in the memory.
Syntax: GUI_close(<file_name>); or GUI_close_all;

105. What actually happens when you load GUI map?


When we load a GUI Map file, the information about the windows and the objects
with their logical names and physical description are loaded into memory. So
when the WinRunner executes a script on a particular window, it can identify the
objects using this information loaded in the memory.

106. What is the purpose of the temp GUI map file?


While recording a script, WinRunner learns objects and windows by itself. This is
actually stored into the temporary GUI Map file. We can specify whether we have
to load this temporary GUI Map file should be loaded each time in the General
Options.

107. What is the extension of gui map file?


The extension for a GUI Map file is “.gui”.
108. How do you find an object in an GUI map.
The GUI Map Editor is been provided with a Find and Show Buttons. i. 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. ii. To find a particular object in
a GUI Map file click the Find button, which gives

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.

113. What is the purpose of regexp_label property and regexp_MSW_class


property?
The regexp_label property is used for windows only. It operates “behind the
scenes” to insert a regular expression into a window’s label description.The
regexp_MSW_class property inserts a regular expression into an object’s
MSW_class. It is obligatory for all types of windows

114. How do you suppress a regular expression?


We can suppress the regular expression of a window by replacing the
regexp_label property with label property.

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.

118. How do you filter the objects in the GUI map?


GUI Map Editor has a Filter option. This provides for filtering with 3 different types
of options. i. Logical name displays only objects with the specified logical name.
ii. Physical description displays only objects matching the specified physical
description. Use any substring belonging to the

119. How do you configure GUI map?


When WinRunner learns the description of a GUI object, it does not learn all its
properties. Instead, it learns the minimum number of properties to provide a
unique identification of the object.Many applications also contain custom GUI
objects. A custom object is any object not belonging to one

120. What is the purpose of GUI map configuration?


GUI Map configuration is used to map a custom object to a standard object.

121. How do you make the configuration and mappings permanent?


The mapping and the configuration you set are valid only for the current
WinRunner session. To make the mapping and the configuration permanent, you
must add configuration statements to your startup test script.

122. What is the purpose of GUI spy?


Using the GUI Spy, you can view the properties of any GUI object on your
desktop. You use the Spy pointer to point to an object, and the GUI Spy displays
the properties and their values in the GUI Spy dialog box. You can choose to
view all the properties of an object, or only the selected set of

123. What is the purpose of obligatory and optional properties of the


objects?
For each class, WinRunner learns a set of default properties. Each default
property is classified “obligatory” or “optional”. i. An obligatory property is always
learned (if it exists). ii. An optional property is used only if the obligatory
properties do not provide unique

124. When the optional properties are learned?


An optional property is used only if the obligatory properties do not provide
unique identification of an object.

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

129. What is the purpose of different record methods 1) Record 2) Pass up


3) As Object 4) Ignore.
Record instructs WinRunner to record all operations performed on a GUI object.
This is the default record method for all classes. (The only exception is the static
class (static text), for which the default is Pass Up.) b. Pass Up instructs
WinRunner to record an operation performed on this class

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

132. What are the two modes of recording?


There are 2 modes of recording in WinRunner i. Context Sensitive recording
records the operations you perform on your application by identifying Graphical
User Interface (GUI) objects.ii. Analog recording records keyboard input, mouse
clicks, and the precise x- and y-coordinates traveled by the mouse

133. What is a checkpoint and what are different types of checkpoints?


Checkpoints allow you to compare the current behavior of the application being
tested to its behavior in an earlier version. You can add four types of checkpoints
to your test scripts: i. GUI checkpoints verify information about GUI objects. For
example, you can check that a button is enabled or
134. What are data driven tests?
When you test your application, you may want to check how it performs the same
operations with multiple sets of dat

135. What are the synchronization points?


Synchronization points enable you to solve anticipated timing problems between
the test and your application. For example, if you create a test that opens a
database application, you can add a synchronization point that causes the test to
wait until the database records are loaded on the screen.

136. What is parameterizing?


In order for WinRunner to use data to drive the test, you must link the data to the
test script which it drives. This is called parameterizing your test. The data is
stored in a data table.

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

151. How do you edit the expected value of an object?


We can modify the expected value of the object by executing the script in the
Update mode. We can also manually edit the gui*.chk file which contains the
expected values which come under the exp folder to change the values.

152. How do you modify the expected results of a GUI checkpoint?


We can modify the expected results of a GUI checkpoint be running the script
containing the checkpoint in the update mode.

153. How do you handle ActiveX and Visual basic objects?


WinRunner provides with add-ins for ActiveX and Visual basic objects. When
loading WinRunner, select those add-ins and these add-ins provide with a set of
functions to work on ActiveX and VB objects.

154. How do you create ODBC query?


We can create ODBC query using the database checkpoint wizard. It provides
with option to create an SQL file that uses an ODBC DSN to connect to the
database. The SQL File will contain the connection string and the SQL statement.

155. How do you record a data driven test?


We can create a data-driven testing using data from a flat file, data table or a
database. i. Using Flat File: we actually store the data to be used in a required
format in the file.

156. How do you convert a database file to a text file?


You can use Data Junction to create a conversion file which converts a database
to a target text file.
157. How do you parameterize database check points?
When you create a standard database checkpoint using ODBC (Microsoft
Query), you can add parameters to an SQL statement to parameterize the
checkpoint. This is useful if you want to create a database checkpoint with a
query in which the SQL statement defining your query changes.

158. How do you create parameterize SQL commands?


A parameterized query is a query in which at least one of the fields of the
WHERE clause is parameterized, i.e., the value of the field is specified by a
question mark symbol ( ? ). For example, the following SQL statement is based
on a query on the database in the sample Flight Reservation application

159. Explain the following commands:


db_connect i. to connect to a database db_connect(<session_name>,
<connection_string>); b. db_execute_query i. to execute a query
db_execute_query ( session_name, SQL, record_number ); record_number is
the out value. c. db_get_field_value i. returns the value of a single field in

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

161. Explain Get Text checkpoint from object/window with syntax?


We use obj_get_text (<logical_name>, <out_text>) function to get the text from
an object b. We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to
get the text from a window.

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

166. What are the steps of creating a data driven test?


The steps involved in data driven testing are: i. Creating a test ii. Converting to a
data-driven test and preparing a database iii. Running the test iv. Analyzing the
test results.

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

168. What are the three modes of running the scripts?


WinRunner provides three modes in which to run tests—Verify, Debug, and
Update. You use each mode during a different phase of the testing process. i.
Verify 1. Use the Verify mode to check your application. ii. Debug 1. Use the
Debug mode to help you identify bugs in a test script

169. Explain the following TSL functions:


Ddt_open i. Creates or opens a datatable file so that WinRunner can access it.
Syntax: ddt_open ( data_table_name, mode );data_table_name The name of the
data table. The name may be the table variable name, the Microsoft Excel file or
a tabbed text file name, or the full path and file name of the

170. How do you handle unexpected events and errors?


WinRunner uses exception handling to detect an unexpected event when it
occurs and act to recover the test run. WinRunner enables you to handle the
following types of exceptions: Pop-up exceptions: Instruct WinRunner to detect
and handle the appearance of a specific window. TSL exceptions: Instruct

171. How do you handle pop-up exceptions?


A pop-up exception Handler handles the pop-up messages that come up during
the execution of the script in the AUT. TO handle this type of exception we make
WinRunner learn the window and also specify a handler to the exception. It could
be i. Default actions: WinRunner clicks the OK or Cancel button

172. How do you handle TSL exceptions?


A TSL exception enables you to detect and respond to a specific error code
returned during test execution. b. Suppose you are running a batch test on an
unstable version of your application. If your application crashes, you want
WinRunner to recover test execution. A TSL exception can instruct
173. How do you handle object exceptions?
During testing, unexpected changes can occur to GUI objects in the application
you are testing. These changes are often subtle but they can disrupt the test run
and distort results. b. You could use exception handling to detect a change in
property of the GUI object during the test run, and to recover

174. How do you comment your script?


We comment a script or line of script by inserting a ‘#’ at the beginning of the line.

175. What is a compile module?


A compiled module is a script containing a library of user-defined functions that
you want to call frequently from other tests. When you load a compiled module,
its functions are automatically compiled and remain in memory. You can call them
directly from within any test.

176. Write and explain decision making command?


You can incorporate decision-making into your test scripts using if/else or switch
statements. i. An if/else statement executes a statement if a condition is true;
otherwise, it executes another statement. It has the following syntax: if
( expression ) statement1; [ else statement2; ] expression

177. Write and explain switch command?


A switch statement enables WinRunner to make a decision based on an
expression that can have more than two values. It has the following syntax:
switch (expression ) { case case_1: statements case case_2: statements case
case_n: statements default: statement(s) } b. The switch statement consecutively

178. How do you write messages to the report?


To write message to a report we use the report_msg statement Syntax:
report_msg (message);

179. What is a command to invoke application?


Invoke_application is the function used to invoke an application. Syntax:
invoke_application(file, command_option, working_dir, SHOW);

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]);

181. What is the use of function generator?


The Function Generator provides a quick, error-free way to program scripts. You
can: i. Add Context Sensitive functions that perform operations on a GUI object
or get information from the application being tested. ii. Add Standard and Analog
functions that perform non-Context Sensitive tasks such
182. What is the use of putting call and call_close statements in the test
script?
You can use two types of call statements to invoke one test from another: i. A call
statement invokes a test from within another test. ii. A call_close statement
invokes a test from within a script and closes the test when the test is completed.

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

186. What does static and public class of a function means?


The class of a function can be either static or public. b. A static function is
available only to the test or module within which the function was defined. c.
Once you execute a public function, it is available to all tests, for as long as the
test containing the function remains open. This is

187. What does in, out and input parameters means?


in: A parameter that is assigned a value from outside the function. b. out: A
parameter that is assigned a value from inside the function. c. inout: A parameter
that can be assigned a value from outside or inside the function.

188. What is the purpose of return statement?


This statement passes control back to the calling function or test. It also returns
the value of the evaluated expression to the calling function or test. If no
expression is assigned to the return statement, an empty string is returned.
Syntax: return [( expression )];

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.

191. How do you declare arrays?


The following syntax is used to define the class and the initial expression of an
array. Array size need not be defined in TSL. b. class array_name [ ]
[=init_expression] c. The array class may be any of the classes used for variable
declarations (auto, static, public, extern).

192. How do you load and unload a compile module?


In order to access the functions in a compiled module you need to load the
module. You can load it from within any test script using the load command; all
tests will then be able to access the function until you quit WinRunner or unload
the compiled module. b. You can load a module either as

193. Why you use reload function?


If you make changes in a module, you should reload it. The reload function
removes a loaded module from memory and reloads it (combining the functions
of unload and load). The syntax of the reload function is: reload ( module_name [
,1|0 ] [ ,1|0 ] ); The module_name is the name of an existing compiled

194. How do you load and unload external libraries?


load_dll(path name); unload_dll(path name);

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

197. Explain different command line options?


addins list of add-ins to load:,Instructs WinRunner to load the specified add-ins.
In the list, the add-ins are separated by commas. This can be used in conjunction
with the -addins_select_timeout command line option.addins_select_timeout
timeout :Instructs WinRunner to wait the specified time (in seconds)

198. During debugging how do you monitor the value of the variables?

You might also like