Tuesday, June 11, 2019

11. Function Definition Generator


Function Definition Generator



What is Function Definition Generator?

Function Definition Generator can be selected from the Design menu drop down for a function library or Action.
It allows us to define functions within an Action or function library. It gives us the basic framework to define a function and also associate it with an existing test object and use it as a default operation.

What are the different sections in the Function Definition Generator?

The different sections in the Function Definition Generator are -:

      1. Function Definition
      2. Arguments
      3. Register
      4. Additional Information
      5. Preview
      6. Insert another Function checkbox


Describe the Function Definition section

This section has 3 parts -:

      1. Name – Where we can give the sub-routine or function its name.
      2. Type – We can select any of the 2 options based on what we want to define a) Function or b) Sub-routine
      3. Scope – It can be public or private

Describe Arguments section

This section has the following parts -:

      1. Add argument button
      2. Delete argument button
      3. Move Up argument button
      4. Move Down argument button
      5. Name of the argument
      6. Pass Mode – a) By Reference b) By Value


Describe Register section

In the register section we can add the function to a test object and also apply the function as the default operation on the test object. It basically uses the RegUserFunc keyword or adds this keyword to the function and registers it automatically to the selected test object when this checkbox is selected.

The different options are -:

      1. Register to a test object checkbox – to register the function to a test object.
      2. Test Object Name- to which the function will be registered.
      3. Object Operation – which this function will work upon
      4. Register as default operation checkbox – to confirm if this function will be the default operation of the selected test object.

Describe Additional information section

The Additional information section allows the developer to add more description and documentation related to the function defined.


Describe the Preview section

The Preview section displays the Structure of the Function as defined in the Function Definition Generator.


Describe the Insert another function definition

This checkbox allows another function to be inserted after the current definition is completed.




No comments:

Post a Comment