Winrunner Questions and Answers

Winrunner is Automation Test Tool for Software Testing. This is small help to the people who are looking for Interview Questions and their answers on Winrunner. There would be more than 100 questions and answers in this blog.

Latest questions on Winrunner! *Scroll down for the Index of Questions*

Tuesday, March 06, 2007

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 90: Explain the following TSL functions: Ddt_export

Explain the following TSL functions: Ddt_export

Exports the information of one data table file into a different data table file.
Syntax: ddt_export (data_table_namename1, data_table_namename2);

data_table_namename1 The source data table filename.
data_table_namename2 The destination data table filename.

Tuesday, September 05, 2006

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 89: Explain the TSL function "Ddt_close"

Explain the TSL function "Ddt_close"
Closes a data table file

Syntax: ddt_close ( data_table_name );

data_table_name: The name of the data table. The data table is a Microsoft Excel file or a tabbed text file. The first row in the file contains the names of the parameters.

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 88: Explain the TSL function "Ddt_save"

Explain the TSL function "Ddt_save"

Saves the information into a data file.

Syntax: dt_save (data_table_name);

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 table.

Thursday, August 17, 2006

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 87: Explain the TSL function “Ddt_open”

Explain the TSL function “Ddt_open”

It 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 table. The first row in the file contains the names of the parameters. This row is labeled row 0.

mode     The mode for opening the data table: DDT_MODE_READ (read-only) or DDT_MODE_READWRITE (read or write).

Tuesday, August 08, 2006

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 86: What are the three modes of running the scripts?

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.

  • Verify
Use the Verify mode to check your application.

  • Debug
Use the Debug mode to help you identify bugs in a test script.

  • Update
Use the Update mode to update the expected results of a test or to create a new expected results folder.

Wednesday, August 02, 2006

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 85: How to record a data driven test script using data driver wizard?

How to 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. You need to parameterize only the portion of your test script that you want to run in a loop with multiple sets of data.

To create a data-driven test:
  • If you want to turn only part of your test script into a data-driven test, first select those lines in the test script.

  • Choose Tools > DataDriver Wizard.

  • If you want to turn only part of the test into a data-driven test, click Cancel. Select those lines in the test script and reopen the DataDriver Wizard. If you want to turn the entire test into a data-driven test, click Next.

  • The Use a new or existing Excel table box displays the name of the Excel file that WinRunner creates, which stores the data for the data-driven test. Accept the default data table for this test, enter a different name for the data table, or use

  • The browse button to locate the path of an existing data table. By default, the data table is stored in the test folder.

  • In the Assign a name to the variable box, enter a variable name with which to refer to the data table, or accept the default name, “table.”

  • At the beginning of a data-driven test, the Excel data table you selected is assigned as the value of the table variable. Throughout the script, only the table variable name is used. This makes it easy for you to assign a different data table

  • To the script at a later time without making changes throughout the script.

  • Choose from among the following options:
-> Add statements to create a data-driven test: Automatically adds statements to run your test in a loop: sets a variable name by which to refer to the data table; adds braces ({and}), a for statement, and a ddt_get_row_count statement to your test script selection to run it in a loop while it reads from the data table; adds ddt_open and ddt_close statements

-> To your test script to open and close the data table, which are necessary in order to iterate rows in the table. Note that you can also add these statements to your test script manually.

-> If you do not choose this option, you will receive a warning that your data-driven test must contain a loop and statements to open and close your datatable.

-> Import data from a database: Imports data from a database. This option adds ddt_update_from_db, and ddt_save statements to your test script after the ddt_open statement.

-> Note that in order to import data from a database, either Microsoft Query or Data Junction must be installed on your machine. You can install Microsoft Query from the custom installation of Microsoft Office. Note that Data Junction is not automatically included in your WinRunner package. To purchase Data Junction, contact your Mercury Interactive representative. For detailed information on working with Data Junction, refer to the documentation in the Data Junction package.

-> Parameterize the test: Replaces fixed values in selected checkpoints and in recorded statements with parameters, using the ddt_val function, and in the data table, adds columns with variable values for the parameters. Line by line: Opens a wizard screen for each line of the selected test script, which enables you to decide whether to parameterize a particular line, and if so, whether to add a new column to the data table or use an existing column when parameterize data.

-> Automatically: Replaces all data with ddt_val statements and adds new columns to the data table. The first argument of the function is the name of the column in the data table. The replaced data is inserted into the table.

  • The Test script line to parameterize box displays the line of the test script to parameterize. The highlighted value can be replaced by a parameter. The Argument to be replaced box displays the argument (value) that you can replace with a parameter. You can use the arrows to select a different argument to replace.

Choose whether and how to replace the selected data:

  1. Do not replace this data: Does not parameterize this data.

  2. An existing column: If parameters already exist in the data table for this test, select an existing parameter from the list.

  3. A new column: Creates a new column for this parameter in the data table for this test. Adds the selected data to this column of the data table. The default name for the new parameter is the logical name of the object in the selected. TSL statement above. Accept this name or assign a new name.

  • The final screen of the wizard opens.

  • If you want the data table, to open after you close the wizard, select Show data table now.

  • To perform the tasks specified in previous screens and close the wizard, click Finish.

  • To close the wizard without making any changes to the test script, click Cancel.
    

Monday, July 24, 2006

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 84: Which TSL functions you will use for Comparing the text?

Which TSL functions you will use for Comparing the text?

compare_text (str1, str2 [, chars1, chars2]);

str1, str2
The two strings to be compared.

chars1
One or more characters in the first string.

chars2
One or more characters in the second string. These characters are substituted for those in chars1.

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 83: Which TSL functions you will use for moving the pointer to that text string?

Which TSL functions you will use for moving the pointer to that text string?

win_move_locator_text (window, string [ ,search_area  [ ,string_def ] ] );

window
The logical name of the window.

String
The text to locate. To specify a literal, case sensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. The value of the string variable can include a regular expression (the regular expression need not begin with an exclamation mark).

search_area
The region of the object to search, relative to the window. This area is defined as a pair of coordinates, with x1, y1, x2, y2 specifying any two diagonally opposite corners of the rectangular search region. If this parameter is not defined, then the entire window specified is considered the search area.

string_def
Defines how the text search is performed. If no string_def is specified, (0 or FALSE, the default parameter), the interpreter searches for a complete word only. If 1, or TRUE, is specified, the search is not restricted to a single, complete word.

Tuesday, July 18, 2006

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 82: Which TSL functions you will use for getting the location of the text string?

Which TSL functions you will use for getting the location of the text string?

win_find_text ( window, string, result_array [, search_area [, string_def ] ] );


window     
The logical name of the window to search.

string     
The text to locate. To specify a literal, case sensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. The value of the string variable can include a regular expression. The regular expression should not include an exclamation mark (!), however, which is treated as a literal character. For more information regarding Regular Expressions, refer to the "Using Regular Expressions" chapter in your User's Guide.

result_array     
The name of the output variable that stores the location of the string as a four-element array.

search_area     
The region of the object to search, relative to the window. This area is defined as a pair of coordinates, with x1,y1,x2,y2 specifying any two diagonally opposite corners of the rectangular search region. If this parameter is not defined, then the entire window is considered the search area.

string_def     
Defines how the text search is performed. If no string_def is specified, (0 or FALSE, the default parameter), the interpreter searches for a complete word only. If 1, or TRUE, is specified, the search is not restricted to a single, complete word.

Earn Money from Website or blog -
and show your sites on Google search

Winrunner Question 81: Which TSL functions you will use for Searching text on the window?

Which TSL functions you will use for Searching text on the window?

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 string, enclose the string in quotation marks. Alternatively, you can specify the name of a string variable. In this case, the string variable can include a regular expression.

out_coord_array
The name of the array that stores the screen coordinates of the text (see explanation below).

search_area
The area to search, specified as coordinates x1,y1,x2,y2. These define any two diagonal corners of a rectangle. The interpreter searches for the text in the area defined by the rectangle.

string_def
Defines the type of search to perform. If no value is specified, (0 or FALSE, the default), the search is for a single complete word only. When 1, or TRUE, is specified, the search is not restricted to a single, complete word.


Index of Winrunner Questions

  • WinRunner Question 01 : Explain WinRunner testing process?
  • WinRunner Question 02 : What in contained in the GUI map?
  • WinRunner Question 03 : How does WinRunner recognize objects on the application?
  • WinRunner Question 04 : How does WinRunner evaluates test results?
  • WinRunner Question 05 : Have you created test scripts and what is contained in the test scripts?
  • WinRunner Question 06 : Have you performed debugging of the scripts?
  • WinRunner Question 07 : How do you run your test scripts?
  • WinRunner Question 08 : How do you analyze results and report the defects?
  • WinRunner Question 09 : How do you analyze results and report the defects?
  • WinRunner Question 10 : What is the use of Test Director software?
  • Winrunner Question 11 : How you integrated your automated scripts from TestDirector?
  • Winrunner Questions 12 : What are the different modes of recording?
  • Winrunner Question 13 : What is the purpose of loading WinRunner Add-Ins?
  • Winrunner Question 14 : What are the reasons that WinRunner fails to identify an object on the GUI?
  • Winrunner Question 15 : What do you mean by the logical name of the object?
  • Winrunner Question 16 : If the object does not have a name then what will be the logical name?
  • Winrunner Question 17 : What is the different between GUI map and GUI map files?
  • Winrunner Question 18 : How do you view the contents of the GUI map?
  • Winrunner Question 19 : When you create GUI map do you record all the objects of specific objects?
  • Winrunner Question 20: What is the purpose of set_window command?
  • Winrunner Question 21: How do you load GUI map? What is the disadvantage of loading the GUI maps through start up scripts?
  • Winrunner Question 22: How do you unload the GUI map? What actually happens when you load GUI map?
  • Winrunner Question 23: What is the purpose of the temp GUI map file? What is the extension of gui map file?
  • Winrunner Question 24: How do you find an object in an GUI map?
  • Winrunner Question 25: What different actions are performed by find and show button?
  • Winrunner Question 26: How do you identify which files are loaded in the GUI map?
  • Winrunner Question 27: How do you modify the logical name or the physical description of the objects in GUI map?
  • Winrunner Question 28: When do you feel you need to modify the logical name?
  • Winrunner Question 29: When it is appropriate to change physical description?
  • Winrunner Question 30: How WinRunner handles varying window labels?
  • Winrunner Question 31: What is the purpose of regexp_label property and regexp_MSW_class property?
  • Winrunner Question 31: How do you suppress a regular expression?
  • Winrunner Question 33: How do you copy and move objects between different GUI map files?
  • Winrunner Question 34: How do you select multiple objects during merging the files?
  • Winrunner Question 35: How do you clear a GUI map files? How do you filter the objects in the GUI map?
  • Winrunner Question 36: What is the purpose of GUI map configuration? How do you make the configuration and mappings permanent?
  • Winrunner Question 37: What is the purpose of GUI spy?
  • Winrunner Question 38: What is the purpose of obligatory and optional properties of the objects?
  • Winrunner Question 39: When the optional properties are learned?
  • Winrunner Question 40: What is the purpose of location indicator and index indicator in GUI map configuration?
  • Winrunner Question 41: How do you handle custom objects?
  • Winrunner Question 42: What is the name of custom class in WinRunner and what methods it applies on the custom objects?
  • Winrunner Question 43: In a situation when obligatory and optional both the properties cannot uniquely identify an object what method WinRunner applies?
  • Winrunner Question 44: What is the purpose of different record methods 1) Record 2) Pass up 3) As Object 4) Ignore.
  • Winrunner Question 45: How do you find out which is the start up file in WinRunner?
  • Winrunner Question 46: What are the virtual objects and how do you learn them?
  • Winrunner Question 47: What are the two modes of recording?
  • Winrunner Question 48: What is a checkpoint and what are different types of checkpoints?
  • Winrunner Question 49: What are data driven tests?
  • Winrunner Question 50: What are the synchronization points?
  • Winrunner Question 51: What is parameterizing?
  • Winrunner Question 52: How do you maintain the document information of the test scripts?
  • Winrunner Question 53: What do you verify with the GUI checkpoint for single property and what command it generates, explain syntax?
  • Winrunner Question 54: What do you verify with the GUI checkpoint for object/window and what command it generates, explain syntax?
  • Winrunner Question 55: What information is contained in the checklist file and in which file expected results are stored?
  • Winrunner Question 56: What do you verify with the GUI checkpoint for multiple objects and what command it generates, explain syntax?
  • Winrunner Question 57: What do you verify with the bitmap check point for object/window and what command it generates, explain syntax?
  • Winrunner Question 58: What do you verify with the bitmap checkpoint for screen area and what command it generates, explain syntax?
  • Winrunner Question 59: What do you verify with the database checkpoint default and what command it generates, explain syntax?
  • Winrunner Question 60: How do you handle dynamically changing area of the window in the bitmap checkpoints?
  • Winrunner Question 61: What do you verify with the database check point custom and what command it generates, explain syntax?
  • Winrunner Question 62: What do you verify with the sync point for object/window property and what command it generates, explain syntax?
  • Winrunner Question 63: What do you verify with the sync point for object/window bitmap and what command it generates, explain syntax?
  • Winrunner Question 64: What do you verify with the sync point for screen area and what command it generates, explain syntax?
  • Winrunner Question 65: How do you edit checklist file and when do you need to edit the checklist file?
  • Winrunner Question 66: How do you edit the expected value of an object?
  • Winrunner Question 67: How do you modify the expected results of a GUI checkpoint?
  • Winrunner Question 68: How do you handle ActiveX and Visual basic objects?
  • Winrunner Question 69: How do you create ODBC query?
  • Winrunner Question 70: How do you record a data driven test?
  • Winrunner Question 71: How do you convert a database file to a text file?
  • Winrunner Question 72: How do you parameterize database check points?
  • Winrunner Question 73: How do you create parameterize SQL commands?
  • Winrunner Question 74: Explain the following Winrunner Commands
  • Winrunner Question 75: What check points you will use to read and check text on the GUI and explain its syntax?
  • Winrunner Question 76: Explain Get Text checkpoint from object/window with syntax?
  • Winrunner Question 77: Explain Get Text checkpoint from screen area with syntax?
  • Winrunner Question 78: Explain Get Text checkpoint from selection (web only) with syntax?
  •