Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Monday 17 August 2015

Difference between Action and Function

1. Action is a collection of Vb statements in QTP. It does not return any values.Function collection of Vb statements in QTP, It returns single value.

2.We can call functions within actions but we can't call actions within functions

3. Generally functions are saved with ".vbs" extention where as actions will save with ".mts".

4. Every Action will have its own Datatable where as function does not.

5. Action can have a object repository associated with it while a function can't. 

6. A function is just lines of code with some/none parameters and a single return value while an action can have more than one output parameters.

7. Action can contains Object Repository, Data table, Active screen etc. whereas function do not have these features.

8. Action is internal to QTP whereas Function is just lines of code with some/none parameters and a single return value.

9. Action can/can not be resuable whereas functions are always reusable.

10. Action Parameter have default values whereas VB script function do not have any default values.

11. Action parameter type are byvalue only where vbscript functions can be passed byref.

12. Action can have multiple output(returning) values whereas function can return only single value.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.