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 -:
- Function Definition
- Arguments
- Register
- Additional Information
- Preview
- Insert another Function checkbox
Describe the Function Definition
section
This section has 3 parts -:
- Name – Where we can give the sub-routine or function its name.
- Type – We can select any of the 2 options based on what we want to define a) Function or b) Sub-routine
- Scope – It can be public or private
Describe Arguments section
This section has the following parts
-:
- Add argument button
- Delete argument button
- Move Up argument button
- Move Down argument button
- Name of the argument
- 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 -:
- Register to a test object checkbox – to register the function to a test object.
- Test Object Name- to which the function will be registered.
- Object Operation – which this function will work upon
- 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.