Skip to content
 

WinRunner Interview Questions

WinRunner Interview Questions and Answers

1. What information does a GUI map contain?

A GUI map contains the information that WinRunner learns about an object or a window. When a test is executed, the GUI map is used to locate object by reading physical description and logical names in the map and searching the application for objects with the same properties.  There are two types of GUI map files:

  • Global file – for the whole application
  • File per Test – for each individual test

2. What language is used to create test scripts in WinRunner?

WinRunner test scripts are created in the Mercury Interactive Test Script Language (TSL). The Function Generator, WinRunner’s visual programming tool can be used to modify a recorded test script in TSL.

3. What are the recording modes?

There are two type of recording modes: context sensitive and analog.

  • Context Sensitive – identifies GUI objects and records operations performed in the application
  • Analog recording – records peripheral inputs from the keyboard and mouse (including cursor position in the x-y coordinate plane)

4. How are WinRunner add-ins used?

WinRunner  add-ins is used to load a particular set of functions into memory. Only functions for selected add-ins are shown in the function generator for script execution.

5. What is used to view GUI maps?

The GUI Map Editor is used to view GUI maps and is located in the Tools menu within WinRunner.  It displays all of the GUI Map files including their objects with physical descriptions and logical name.

6. Is there a disadvantage in using a startup script to load a GUI map?

There are two possible disadvantages of using a startup script to load a GUI map.  First, when one GUI map file is sued for a large application, a large amount of memory is often required.  Second, object changes may not be recognized if the GUI map file is not loaded into memory at the time so objects may need to be re-learned, and the GUI file may need to be updated and reloaded.

7. What happens when GUI maps are loaded?

When a GUI map is loaded, all object logical names, physical descriptions, and window information of the information is loaded into memory. When a script for a particular window is executed, the objects can be identified by the information that is loaded.

8. When is it appropriate to modify the logical name of an object in a GUI map?

Modifying the logical name of an object is appropriate when the existing name is too long or does not provide a sufficient description.

9. When it is appropriate to modify the physical description of an object in a GUI map?

Modifying the physical description is appropriate when an object’s property value changes.

10.         Is it possible to suppress a regular expression?

Yes, the regular expression of a window can be suppressed by replacing the regexp_label property with a label property.

11.         How can you filter GUI map objects?

GUI objects can be filtered using the Filter option within GUI Map Editor.  There are three filtering options: class, physical description, and logical name.

12.         When are GUI mappings and configuration setups permanent?

The mapping and the configuration setups are typically valid for the current session within WinRunner but configuration statements can be added to the test startup script to make them permanent.

13.         Explain the function of GUI spy.

GUI Spy allows the user to examine the properties of GUI objects on their desktop. It is possible to view all object properties or a specific set of properties.  The Spy pointer is used to select the object, and the properties and their values are displayed in the dialog box.

14.         Explain optional and obligatory properties of objects?

Default properties learned in WinRunner are classified as either obligatory or optional.  Obligatory properties are learned each time, while optional properties are only learned when the obligatory properties do not provide unique object identification.  Optional properties are saved in a list which WinRunner uses to select enough properties that will adequately and uniquely identify the object.

15.         What is a custom GUI object?

A custom GUI object is one that is not part of one of the standard classes used by WinRunner and it is learned under the generic object class.  If a custom object is similar to a standard object, it can be mapped to one of the standard classes. WinRunner can also be configured to recognize a custom object during Context Sensitive testing.

16.         What is the purpose of checkpoints?

Checkpoints can be used to compare the current application behavior to its behavior in a previous version.  WinRunner has four types of checkpoints: text, bit Map, GUI, and database.

  • Text – reads and displays the text contents of GUI objects and bit map and in bitmaps
  • Bitmap – compares application window or area snapshots  to earlier versions of the same window or area
  • GUI – validates GUI object information (i.e. whether a button is enabled, an item is selected in a list, etc.)
  • Database – verifies the contents and size of a set of results (based on a database query)

17.         How do you maintain test script document information?

Test information can be documented in the Test Properties dialog box on the General and Description tabs. It is typical to include the test author’s name, the functionality being tested, detailed test description, and references to specifications in the test documentation.

18.         Are expected results in the checklist file?

Information about object properties is located in the checklist file.  Expected results information is located in the gui*.chk file.

19.         What do you check with a custom database checkpoint?

The custom database checkpoint allows you to specify the properties that are reviewed in a set of results.  
Part or all of the contents of the results can be viewed and edited.  This can be done using Data Junction, Microsoft Query, or ODBC.

20.         When can you edit an object’s expected value?

And object’s expected value can be edited manually in the gui*.check file.  I can also be edited when the script is run in the Update mode.

21.         When can you change a GUI checkpoint expected result?

The expected results of a GUI checkpoint can be modified when the script containing the checkpoint is executed in the Update mode.

22.         What is used to handle Visual Basic and ActiveX objects?

WinRunner  is capable of handling Visual Basic and ActiveX objects when the add-ins for each are selected.  Add-ins can be selected when WinRunner is being loaded.

23.         How is an ODBC query created?

An ODBC query can be created by using the Database Checkpoint wizard. This includes an option to create an SQL file that contains a connection string and an SQL statement necessary to use an ODBC DSN to connect to the database.

24.         How can a data driven test be recorded?

https://norsk-apotek.com/generisk-xenical/ There are three ways to create a data-driven test: use data from a flat file, use data from a data table, or use data from a database.

  • Flat File – Data must be saved in a pre-determined format and is read from the file using file manipulation commands and assigned to variables.
  • Data Table – Similar to the flat file method but data is usually stored in a Microsoft Excel file.
  • Database – Similar to the previous methods except test data is saved in the database.

25.         Can parameters be added to database check points?

Parameters can be added to an SQL statement to parameterize a checkpoint using ODBC.  This can be helpful in creating a database checkpoint with a query when the SQL statement that defines the query is expected to change.

26.         Define compiled module?

A compiled module is a script that contains a library of functions defined by the user that will frequently be called from other tests.  When a compiled module is loaded, the functions that it contains are compiled automatically and remain in memory. Using compiled modules can greatly improve test performance and organization because they are debugged before using so less error-checking is required.  Also, calling a pre-compiled function is usually faster than interpreting one in a test script.

27.         Explain the difference between a compile module and a script.

A compiled module is not executable and is used to store reusable functions while a test script contains the executable file.  Compiled modules are loaded into memory and are referenced from the TSL code within a module.

28.         Where is the search path set for calling a test?

The search path is used to set the directories that WinRunner will explore when searching for a test.  This path is set in the Settings tab of the General options.   Under Setting, there is a box labeled “Search Path for Called Tests” Several paths can be listed.  WinRunner will search in the order that the directories are listed and the search paths defined are saved and active for future testing sessions.

29.         What are the classes of a function?

There are two function classes: static and public. A static function is one that is only available in the test module where it is defined.  Public functions on the other hand are available for all other tests once it is executed and as long as it is kept open.  If it is desired to have a function available even when not opened, then the tester should consider using a compiled module.  If a function definition does not declare a class, the default setting is public.

30.         Why might WinRunner fail to identify an object on a GUI?

WinRunner might fail to recognize an object in a GUI if it is not a standard windows object or if the browser that is used is not compatible with the version of WinRunner that is being used for testing.  In these cases, the GUI Map Editor may not be able to learn the objects.

31.         Explain the relationship between GUI map files and GUI maps?

A GUI map is in reality the compilation of one or more GUI map files.

Save on DeliciousDigg This
Submit to StumbleUponTweet

Leave a Reply