WinRunner Questions and Answers

1. TSL is C like or C++ like?
C Like

2. What are the modes of recording tests?
a) Context-Sensitive: Object mapping saved in GUI map so change is required there only
b) Analog mode: Analog mode records mouse clicks, keyboard input, and the exact x- and y- coordinates traveled by the mouse. Switch over from Context Sensitive to analog and vice versa can be done with F2.

3. What are the modes of running tests?
Use Verify mode when running a test to check the behavior of your application, and when you want to save the test results.
Use Debug mode when you want to check that the test script runs smoothly without errors in syntax.
Use Update mode when you want to create new expected results for a GUI

4. What are the modes for organizing GUI Map files?
a) Global GUI Map File mode: You can create a GUI map file for your entire application, or for each window in your application. Different tests can reference a common GUI map file
b) GUI Map File per Test mode: Win Runner automatically creates a GUI map file that corresponds to each test you create.

5. What is the testing Process in Win Runner?
Create GUI Map:
RapidTest Script wizard, Alternatively, you can add descriptions of individual objects to the GUI map by clicking objects while recording a test.
Create Test
Debug Test
One can set breakpoints, monitor variables, and control how tests are run
Run Test
One runs tests in Verify mode to test your application.
View Result
One can view the expected results and the actual results from the Test Results window. In cases of bitmap mismatches, one can also view a bitmap that displays only the difference between the expected and actual results.

6. What are logical name and physical description of an object?
The logical name is actually a nickname for the object’s physical description. The physical description contains a list of the object’s physical properties. The logical name and the physical description together ensure that each GUI object has its own unique identification.

7. What are logical name and physical description of an object?
The logical name is actually a nickname for the object’s physical description. The physical description contains a list of the object’s physical properties. The logical name and the physical description together ensure that each GUI object has its own unique identification.

8. What set_window command does?
If one programs a test manually, you need to enter the set_ window statement when the active window changes.

9. What are the functions of GUI Map Editor and GUI spy?
GUI Spy to view the properties of any GUI object on your desktop, to see how WinRunner identifies it.
By using the GUI Map Editor to learn the properties of an individual GUI object, window, or all GUI objects in a window.
One can modify the set of properties that WinRunner learns for a specific object class using the GUI Map Configuration dialog box.
You must load the appropriate GUI map files before you run tests. WinRunner uses these files to help locate the objects in the application being tested. It is most efficient to insert a GUI_ load statement into your startup test.

10. How object descriptions are edited in GUI map?
You must edit the label in the button’s physical description in the GUI map. You can change the physical description using regular expressions.

11. What type of test cases Win Runner writes automatically when running Rapid Test Script wizard?
GUI Regression Test
Bitmap Regression Test
User Interface Test
Test Template: This test provides a basic framework of an automated test that navigates your application. It opens and closes each window, leaving space for you to add code (through recording or programming) that checks the window.

12. Can there be more than one Global GUI map files for one application?
Yes, but that needs to be loaded programmatically. Sometimes the logical name of an object is not descriptive. If you use the GUI Map Editor to learn your application before you record, then you can modify the logical name of the object in the GUI map to a descriptive name by highlighting the object and clicking the Modify button.

GUI Map files can also be merged. Both Auto and Manual Merge are there and conflict resolution for same window name and object name can be used while merging.

13. What are two regular expressions?
A regular expression is a string that specifies a complex search phrase in order to enable WinRunner to identify objects with varying names or titles.
In the Physical Description label line, add an “!” immediately following the opening quotes to indicate that this is a regular expression.
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 and for the object class object.

14. How objects are identified in WinRunner?
Each GUI object in the application being tested is defined by multiple properties, such as class, label, MSW_ class, MSW_ id, x (coordinate), y (coordinate), width, and height. WinRunner uses these properties to identify GUI objects in your application during Context Sensitive testing.

15. What is generic object class?
When WinRunner records an operation on a custom object, it generates obj_ mouse_ statements in the test script. If a custom object is similar to a standard object, you can map it to one of the standard classes. You can also configure the properties WinRunner uses to identify a custom object during Context Sensitive testing. 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.

16. What is Virtual Object?
By defining a bitmap as a virtual object, you can instruct WinRunner thru Virtual Object Wizard to treat it like a GUI object such as a push button, when you record and run tests.This makes your test scripts easier to read and understand.

17. What is Synchronization Point?
Synchronization points solve timing and window location problems that may occur during a test run. A synchronization point tells WinRunner to pause the test run in order to wait for a specified response in the application.

18. When should Synchronization be done?
to retrieve information from a database
for a window to pop up
for a progress bar to reach 100%
for a status message to appear

19. How should Synchronization be done?
General: Increase the default time that WinRunner waits. To do so, you change the value of the Timeout for Checkpoints and CS Statements option in the Run tab of the General Options dialog box (Settings > General Options).

In Script: Choose Create > Synchronization Point > For Object/ Window Bitmap or click the Synchronization Point for Object/ Window Bitmap button on the User toolbar. A synchronization point appears as obj_ wait_ bitmap or win_ wait_ bitmap statements in the test script.

20. What are the statements for checking GUI objects?
obj_ check_ gui statement into the test script if you are checking an object, or a win_ check_ gui statement if you are checking a window.
Choose Settings > General Options . In the General Options dialog box, click the Run tab, and clear the Break when verification fails check box. This enables the test to run without interruption.

21. How does one check bitmaps?
WinRunner captures a bitmap image and saves it as expected results. It then inserts an obj_check_bitmap statement into the test script if it captures an object, or a win_ check_ bitmap statement if it captures an area or window.

22. How is function generator used?
Choose Create > Insert Function > For Object/ Window or click the Insert Function for Object/ Window button on the User toolbar. Use the pointer to click the # field.
The Function Generator opens and suggests the edit_ get_ text function.
This function reads the text in the # field and assigns it to a variable. The default variable name is text. Change the variable name, text, to anytext of your choice by typing in the field. Edit > Comment . After the # sign.

23. How Logics for correctness can be written in scripts?
By adding tl_ step statements to your test script, you can determine whether a particular operation within the test passed or failed, and send a message to the report.
if (tickets* price == total)
tl_ step (" total", 0, "Total is correct.");
else
tl_ step (" total", 1, "Total is incorrect.");

24. What debugging tools are used in Win Runner?
Run the test line by line using the Step commands
Define breakpoints that enable you to stop running the test at a specified line or function in the test script
Monitor the values of variables and expressions using the Watch List

25. What are the statements used to write data driven tests?
The table = line defines the table variable.
The ddt_ open statement opens the table, and the subsequent lines confirm that the data- driven test opens successfully.
The ddt_ get_ row_ count statement checks how many rows are in the table, and therefore, how many iterations of the parameterized section of the test to perform.
The for statement sets up the iteration loop.
The ddt_ set_ row statement tells the test which row of the table to use on each iteration.
In the edit_ set statement, the value, “ aaa ” is replaced with a ddt_ val statement.
The ddt_ close statement closes the table.

26. How batch tests are run in Win Runner?
You choose the Run in batch mode option on the Run tab of the General Options dialog box ( Settings > General Options ) before running the test. This option instructs WinRunner to suppress messages that would otherwise interrupt the test.
for (i= 0; i<> Activate Exception Handling
Define Handler Function

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 WinRunner to detect and handle TSL functions that return a specific error code.
Object exceptions: Instruct WinRunner to detect and handle a change in a property for a specific GUI object.
Web exceptions: When the WebTest add-in is loaded, you can instruct WinRunner to handle unexpected events and errors that occur in your Web site during a test run.

For more software testing definitions, please go here

No comments:

Post a Comment