Tuesday, February 20, 2007

Quick Reference in Winrunner

Record-Context Sensitive: to test your application in terms of its Graphical user interface
Record-Analog: Use the Analog mode when exact mouse movements of your mouse pointer are required for your test
Run modes: Verify (at the time of Unit/Integration testing)
Debug (at the time integration/system testing)
Update (at the time of regression testing)
GUI check points: it examines the behavior of objects properties
· For single property
· For object/window
· For multiple objects
Bit map check points:
· for object/window(CTL+F12)
· for screen area(ALT+F12)
Data base check points:
· Default check(Entire contents)
· Custom check(Rows, columns)
· Runtime record check(Mapping between front end objects and back end columns)
Text check points: Read text in GUI objects and in bitmaps, and enable you to check
their contents

Get text: inserts a text retrieval statement in to your
testcript(“win_get_text,obj_get_text”)
· From abject/window
· from screen Area
Synchronization point: It is Used to provide a time gap between a running state to wait
state of a process
· for object/window property
· for object/window bit map
· for screen area bit map
Insert function:
· for object/window
· from function Generator
Rapid Test script Wizard: it will examine every GUI object(for ex, buttons, lists and edit fields) and will learn a unique description of each one .This information will be saved in a GUI map file
GUI spy: Opens the GUI spy, enabling you to view the properties of GUI objects in your
application
GUI Map editor: To establish a link between base class and derived class through
physical description





GUI Map configuration:
· Map a custom GUI object class to standard winRunner GUI object class
· Configure the properties of a standard winRunner GUI object classes
Virtual Object Wizard: Using the Virtual object wizard, you can assign a bit map to standard object class, defines the coordinates of that object and assign it a logical name
Exception handling: Enables you to instruct winRunner to handle unexpected events and errors that occur during a test run , we have 3 type of exceptions
i) Pop up exceptions
ii) TSL exceptions
iii) Object exceptions

Data Driven Test: Once you have successfully debugged and run your test, you want to see how the same test performs with multiple tests of data , to do this you ‘convert’ your test to a data driven test and create a corresponding data table with the sets of data you want to test
Data table: a table is used with a data driven test
Parameterize data: enabling you to parameterize tests in order to:
· Replace selected data in your test script with parameters from a
Data table
· Replace selected data in your test script with parameters from the
test parameters
· Create columns representing parameters in the data table
· Insert selected data into the data table
· Crate new test parameters
Data driver Wizard: Enables you to parameterize lines in your test script so you may run your test in a loop with different sets of data
Compiled module: A compiled module is a script containing a library of user defined functions that you want to call frequently from other tests, Compiled modules are 2 types
i) System Module
ii) User Module

Function Generator: Which enables you to generate TSL functions, You can execute TSL functions or insert them into your test script from the Function Generator

Files and folders while saving the WR file : 3 files and 4 folders
Files: Lock file , Header File, Script File
Folders: db folder, exp folder, res folder, debug folder,
check list folder(only on tets cases)
Parameters: we have 3 types of parameters
· In (A parameter that is assigned a value from out side the function)
· Out(A parameter that is assigned a value from out inside the function)
· Inout(A parameter that can be assigned a value from out side or inside the function)
Variables: 4 types (Auto, static, public, extern)

Tl_step is used to insert user defined error messages in test Log

TSL include 4 types of functions:
· Context sensitive (perform specific tasks on GUI objects
· Analog(Depict mouse clicks, keyboard input, exact coordinates)
· Standard(General purpose programming tasks like sending messages to a report
· Customization( It allow you to adopt WR to your testing environment)

1) Invoke_application statement is used to invoke an application, which is to be tested; invoke_application(file, command_option,working-dir, show)

2) Win_activate; set the mode to generate the script
Set_window [window, [time]); it have the timing option (for a new window)

3) Report-msg is used send user messages to test results , doesn’t indicate a step has passed or failed (report_msg(message))
Tl_step is used to report test results whether a step has passed or failed
Tl_step(stepname, status, description)

4) To compare two files in TSL file_compare(file1, file2[,save_file])

5) Call statement invokes a test from within another test
Call _close statement invokes a test from within a script and closes the test when the test is completed

6) treturn statement stops the current test and returns control to the calling
test
texit statement stops test execution entirely
7) setvar function is used to set the value of a testing option from within the test
script
getvar function is used to retrieve the current value of a testing option

8) edit_set(“edit”,”3”) when you enter keyboard input

9) web_browser_invoke(browser,site) ; to open a URL in a browser
web_sync(timeout); Synchronize navigation between web pages
web_link_click; we can record a test link operation
web_image_click; we can record an image link operation




10) load(module_name[1/0][1/0]); we can read it from within any script
unload(module_name\test_name[,”function_name”]]; it removes a loaded module
reload(module_name[,1/0][,1/0) it removes a loaded module from memory and reloads it [both load , and unload]

1) Obj_check_gui for checking an object
Win_check_gui for checking a window

2) Obj_check_bitmap(object, bitmap, time) <----Object
Win_check_bitmap(“Flight reservation”, “img2”, 1)

3) Db_connect( ); to connect a database
Db_check(“list1.cdl”,”dbvf”); if you are creating a default database check point

4) obj_wait_bitmap or win_wait_bitmap(“insert done” “img1”, 10);

5) Obj_get_text(,) get text from object
Win_get_text(window,out_text[x1,y1,x2,y2] get text from a window
Win_find_text, obj_find_text [Search for a text in window or object]

6) ddt_open(data_table_name[,mode]); to create or open a data table file
ddt_close(data_table_name) to close the data table file
ddt_get_row_count(data_table_name,out_rows_count), To retrieve no of rows

7) button_press(button0 ; clicks on a push button
button_set(button,state) ; to set the state of a radio or check button
button_wait_info(button, property, value, time); waits for the value of a button
Property
button_check_info(button, property, property_value); to check the value of button
property
button_check_state(button,state); To check the state of radio button or check box
8) obj_mouse_click(clicks an object like internet explorer)
menu_select_item[menu,item[x,y])); selects a menu item
edit_set(edit, text); replaces the entire contents of an edit object
obj_type(obj_type(object,keyboard_input);sends keyboard input to an object

No comments: