Subscribe by Email


Monday, August 20, 2012

What is meant by Function Generator in WinRunner?


With the aid of visual programming it has been possible to add the TSL statements to the test scripts. Whenever a test is recorded, TSL statements in the test script are generated by the winrunner whenever a user interaction takes place like some input is supplied from the key board or a GUI object is clicked. 
Apart from the record-able functions, TSL comes with many other powerful functions that add considerable flexibility to your test scripts. These functions can be added to the test scripts with the help of the function generator which is the winrunner’s only visual programming tool. 

The function generator is actually an error free and a quick way to obtain good program scripts. 

Tasks carried out by Function Generator

With the help of the function generator the following tasks can be carried out:
1. It helps you in adding the context sensitive functions which help in obtaining information from the software system or application that is being tested and performing operations on the GUI objects.

2. With the help of function generator you can even add some analog as well as standard functions for performing the tasks that are non context sensitive like for example, appending some user defined messages to the test report or doing synchronization of the test execution.

3. Customization functions can be added that help in the modification of the winrunner in accordance with the testing environment. 

Functions are added by the function generator in form of TSL statements. These TSL statements are added in either of the two following ways:

1. By choosing a function from the list: This is the default way of adding functions. A default function is suggested by the winrunner for the GUI object that has been pointed to. Usually the added function is the one that retrieves information or is a get function.

2. By pointing to a GUI object: This is the advance method and should be used by experts as recommended. First, the insert function command is chosen by the user and a GUI object is pointed. Instantly an appropriate context sensitive function is suggested by the winrunner and values are also assigned to its arguments by the winrunner itself. The function suggested by the winrunner can either be modified along with its arguments or a different function can be chosen to replace it. 

More about Function Generator...

- Once the TSL statements to be added have been generated, they can be either pasted in to the test script or can be executed using the function generator. 
- Function generator can be customized in order to make an account for the user defined functions that are quite frequently used in the test scripts. 
Function generator can be further enhanced by adding to it many other new functions, categories as well as sub categories. 
- For every new category that is added, a default function can be set and also an already existing default function can be changed. 
- Before generating a function for a GUI object, it is thoroughly examined by the winrunner. 
- After determining its class, an appropriate function for that particular object is suggested by the winrunner. 
- This suggested default function can either be accepted or rejected and if rejected a new one can be picked up from the list. 
- For selecting a non default function for the GUI object you need to go to the insert menu, selection function option, then select the option “for object/ window” or you can simply click the insert function for object/ window button present on the user tool bar. 
- Point to the GUI object you wish to be affected and left click. 
- A function generator dialogue box appears, click change option in it.  



No comments:

Facebook activity