Professional Documents
Culture Documents
Ans. Win Runner helps you automate the testing process, from test development to
execution. You can create adaptable and reusable test scripts that challenge the
functionality of your application. Prior to a software release, you can run these tests
in a single overnight run—enabling you to detect defects and ensure
superior software quality.
Ans. WR can be used for functional testing for both the Desktop and Web based
applications.
Ans. Win Runner is suitable for any type of application whether it is a desktop
application, web application or a client server application.
6. When do you go for Context Sensitive and Analog? What's the difference between
them?
Ans. Analog is opted when we perform GUI Testing and Context sensitive for
Functionality testing.
9. What are User Defined Functions? What are all the different types of Functions
available in WR? What is Function? Types of Functions?
Ans. The Functions, which are written by the user to accomplish a specific
functionality of his requirement, are called user-defined functions. The user-defined
functions are stored in a compiled module so that any test can use this function after
loading the compiled module.
The different types of functions in Win Runner are
a. Context Sensitive Functions
b. Analog Functions
c. Standard Functions
d. Custom Functions
11. How do you forcibly capture an Object using WR (when WR not able identify it)?
Ans. GUI Map Configuration
12. How TSL looks like? What are all the default files does WR generate when you
create a script?
Ans. TSL looks like c language. In fact its c only. The files/folders that are generated
by Win Runner when a script is created is db, exp and res.
19. What are all the different languages that can be called using TSL in between the
scripts?
Ans. Mostly C language
23. What is meant by Checkpoints? Types of Checkpoints? In what situation will you
use it?
Ans. Checkpoints allow you to compare the current behavior of the application being
tested to its behavior in an earlier version. Various check points are
• GUI Checkpoint
• Bitmap Checkpoint
• Database Checkpoint
• Text checkpoints
24. How do you handle an Exception in WR? Types of Exception available in WR?
Ans. Exceptions in Win Runner are handled using the Exceptional Handling Concepts.
And the different types of exceptions available in Win Runner are as follows:
• Pop-up exceptions: Instruct Win Runner to detect and handle the appearance of a
specific window.
• TSL exceptions: Instruct Win Runner to detect and handle TSL functions that return
a specific error code.
• Object exceptions: Instruct Win Runner to detect and handle a change in a
property for a specific GUI object.
• Web exceptions: When the Web Test add-in is loaded, you can instruct Win Runner
to handle unexpected events and errors that occur in your Web site during a test
run.
25. How do you define an Exception for complete application or for a particular
function?
Ans. We first define a TSL Function and then write a handler function in the compiled
module for that exception and load that particular compiled module in the script in
which you want to handle the exception through out the application…mostly in the
main script.
26. What are all the different platforms that WR can be used?
Ans. Win Runner can be used only on Windows Platforms namely Windows 95,
Windows 98, Windows NT, Windows 2000 and XP (wr ver 7.5).
28. Can you test DB using WR? What are all the different DB Checkpoints that WR
can support?
Ans. Yes we can check the database using Win Runner. There are all together 3 types
of database checkpoints in Win Runner namely Default Database Checkpoint, Custom
Database Checkpoint, and Runtime Database Checkpoint.
29. How do you set a Query to get/fetch data from the DB?
Ans. We can do that in two ways one is using the wizard and another is writing the
script manually in win runner.
The second method is as follows:
#db_connect ("Test","DSN=test");
if (db_connect ("Test","DRIVER=SQL Server;SERiVER=RaniUID=sa;APP=Microsoft
Development
Environment;WSID=RANI;DATABASE=BugTracker;LANGUAGE=us_english;User
Id=sa;PASSWORD=;")==E_OK)
{
query="SELECT UserID, UserName, TeamName, PhoneExt,LoginName, Password
FROM UserDetailsi";
#db_check("list1.cdl", "dbvf1");
db_execute_query("Test",query,recordnumi);
report_msg("The no of records returned is "&recordnum);
db_write_records("Test","c:\query.txt",TRUE);
db_disconnect("Test");
}
else
report_msg("Not Connected");
30. Apart from Record and Replay what else can be done using WR?
Ans. store and replay, customization based on user requirements, integration with
test management tools like test director, etc..
• Debug mode, to debug your test script. Running a test in Debug mode is the same
as running a test in Verify mode, except that debug results are always saved in the
debug folder. Because only one set of debug results is stored, the Run Test dialog
box does not open automatically when you run a test in Debug mode. Once you run
a test in Debug mode, that remains the default run mode for the current WinRunner
session until you activate another mode.
• Update mode, to update the expected results or to create a new expected results
folder. For example, you could update the expected results for a GUI checkpoint that
checks a push button, in the event that the push button default status changes from
enabled to disabled. You may want to create an additional set of expected results.
After a test has run in Update mode or been aborted, Verify automatically becomes
the default run mode again. WinRunner saves expected results in the exp folder,
overwriting any existing expected results.
Ans. TSL is WR scripting language, TSL is based on C language style, TSL has a set
of different functions.
39. Name a couple of standard web function found in the function generator? And
explain their purpose.
Ans. Web_browser_invoke, web_image_click, web_obj_click,
web_refresh,web_label_click,
Web_link_click, web_sync, web_url_valid
43. What are the two GUI Map modes available in WR?
Ans. The two modes of having a GUI Map file are :
GUI Map file per test mode : A new GUI Map file will be created for each script
Global GUI Map: A Single GUI Map file is used for all the scripts.
44. Big + of Winrunner over other market tools viz. silk, robot etc.?
47. How will you synchronize tests using WR? When should you synchronize?
Synch.settings?
Ans. A synchronization point tells Winrunner to pause the test run in order to wait for
a specified response in the application.
52. What are data driven tests & How Do you create it in WR?
Ans. Testing the same set of functionality using WinRunner with different inputs is
called Data Driven Testing. Data Driven test can be done through Wizard or manually
writing the TSL script. Data driven is available in Tool menu.
while(file_getline(file_name,line)==0)
{
str = str & line;
}
65. How to clear the contents of a text file using WinRunner command?
Ans. Open the file with Write mode file_open (filename,FO_MODE_WRITE);
You should add the following types of statements to your startup test:
• Load statements, which load compiled modules containing user-defined functions
that you frequently call from your test scripts.
• GUI_load statements, which load one or more GUI map files. This ensures that
WinRunner recognizes the GUI objects in your application when you run tests.
• Statements that configure how WinRunner records GUI objects in your application,
such as set_record_attr or set_class_map.
• an invoke_application statement, which starts the application being tested.
• Statements that enable WinRunner to generate custom record TSL functions when
you perform operations on custom objects, such as add_cust_record_class.
71. How to find whether the given sub string is present in a string.
y = "ABCD ABCD XXXX";
z = index(y,"XXXX");
if (z == 0)
{
pause("No such string is found");
}
else
{
pause("String is found at position " & z);
}
72. What string of characters, when inserted into a string , will create a new line in a
message displayed by a pause statement.
76. Without adding an object to the guimap file, can we execute the script on a
particular object??
Ans. Yes. We can execute the script on a particular object without adding it to the gui
map file by giving the physical description of the object directly in place of the logical
name.
76. What is the difference between the set_window and _set_window functions?
Ans. The set_window specifies the window to receive the subsequent input and
optionally specifies the amount of time to wait for the specified window. The
parameter given for specifying the window is the windows logical name.
_set_window specifies a window to receive input. Here the window’s physical
description is given to identify the window.
I think you know the difference between logical name and Physical description of a
object. set_window is used by giving logical name and you can give physical
description.
But _set_window needs only physical description.
_set_window does not change the active window in the gui map.
set_window(window1);
_set_window(window2);
this will set window1 as the active "application window" and the active "gui window".
When you _set_window on window2, the "application window" is shifted to the
physical description of window2, but the gui map still "thinks" you are looking at
window1.
This can be useful if you have a lot of windows with similar child objects (edit boxes,
radio buttons, etc). This can allow you to make a single GUI map entry for multiple
windows.
Likewise, you can shift the focus of the active GUI map window without shifting the
currently active "application window" like this:
set_window(window1);
GUI_set_window(window2);
77. Is there any need for the GUI Map while working with Analog mode?
Ans. No. There is no need for the GUI Map file when we are working with analog
mode
78.What is Silent Mode in WinRunner?
Ans. In silent mode, WinRunner suppresses messages during a test run so that a test
can run unattended. When you run a test remotely from TestDirector, you must run it
in silent mode, because no one is monitoring the computer where the test is running
to view the messages.
79. What are the modes in which you can organize your GUI Map files?
Ans. We can organize the GUI Map files in any of the below two modes:
• In the GUI Map File per Test mode, WinRunner automatically creates a new GUI
map file for every new test you create.
• In the Global GUI Map File mode, you can use a single GUI map for a group of
tests.
81. What is location and Index.How WR will identify the same gui objects in a
window.
82. Can we change the phy desc of a gui object in GUI MAP EDITOR through script.
83. What is the WR testing process.
Ans.There are total 6 steps
1.Create Gui map
2.Create Test
3.Debug Test
4.Run Test
5.View Results
6.Report Defects
where list1.cdl is the name of the checklist containing information about the
database and the properties to check,
Test scenarios and/or cases are prepared by reviewing functional requirements of the
release and preparing logical groups of functions that can be further broken into test
procedures. Test procedures define test conditions, data to be used for testing and
expected results, including database updates, file outputs, report results. Generally
speaking…
• Test cases and scenarios are designed to represent both typical and unusual situations
that may occur in the application.
• Test engineers define unit test requirements and unit test cases. Test engineers also
execute unit test cases.
• It is the test team who, with assistance of developers and clients, develops test cases
and scenarios for integration and system testing.
• Test scenarios are executed through the use of test procedures or scripts.
• Test procedures or scripts define a series of steps necessary to perform one or more
test scenarios.
• Test procedures or scripts include the specific data that will be used for testing the
process or transaction.
• Test procedures or scripts may cover multiple test scenarios.
• Test scripts are mapped back to the requirements and traceability matrices are used to
ensure each test is within scope.
• Test data is captured and base lined, prior to testing. This data serves as the foundation
for unit and system testing and used to exercise system functionality in a controlled
environment.
• Some output data is also base-lined for future comparison. Base-lined data is used to
support future application maintenance via regression testing.
• A pre-test meeting is held to assess the readiness of the application and the
environment and data to be tested. A test readiness document is created to indicate the
status of the entrance criteria of the release.
Inputs for this process:
• Approved Test Strategy Document.
• Test tools, or automated test tools, if applicable.
• Previously developed scripts, if applicable.
• Test documentation problems uncovered as a result of testing.
• A good understanding of software complexity and module path coverage, derived
from general and detailed design documents, e.g. software design document, source code
and software complexity data.
Outputs for this process:
• Approved documents of test scenarios, test cases, test conditions and test data.
• Reports of software design issues, given to software developers for correction.
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. The object is not a
standard windows object. 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.
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. Global GUI Map file: a single GUI Map file for the entire
application. GUI Map File per Test: WinRunner automatically creates a GUI Map file for
each test created.
GUI Map file is a file which contains the windows and the objects learned by the
WinRunner with its logical name and their physical description.
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.
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.