What is the difference between global function and reusable action?

Questions by sateeshbabu

Showing Answers 1 - 3 of 3 Answers

kumaran_elan

  • Jun 15th, 2007
 

The action iteration of an reusable action depends upon action iteration of its parent action if the reusable action is an child action where as the function iteration depends upon the function call made inside the script.

  Was this answer useful?  Yes

Difference in reusable actions and functions in QTP:1. We can open as many function libraries as we want, but we are still limited to one test. So, if we want to edit a reusable action in another test, we have to close our current test, open the second test, make our changes, save and close the second test then reopen our original test.

Passing Data
Actions - can only accept primitive data types as parameters (strings, integers, etc)Functions - can accept arrays, dictionary objects and test objects (i.e. Pages, Frames, WebRadioGroups, etc.)
Resource Usage
Actions - For each action, there’s a folder, three separate vbs files, a local Object Repository, a subfolder containing snapshots, an Excel spreadsheet, and a few seconds of load time.Functions - There’s the code contained in the Function, and that’s all
API
Actions - We cannot insert calls to Existing Actions through the QTP API, we can only do it through the interfaceFunctions - We can attach Function Libraries to Test Scripts through the QTP API
Return Values
Actions - Return values are difficult to understand and read in the syntax

Functions - Return values work like they do in other languages (i.e. as lvalues)

Thanks,
Kapil.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions