Hi all,
please find the below table for the  differences b/n Actions and
Functions....

*
 18/08/2008          *

*Actions vs Functions in QTP…*

*Topic*

*Functions*

*Actions*

*Editing Code*

*Can open as many function libraries as we want, but we are still limited to
one test. *

*So, if you want to edit a reusable action in another test, you have to
close your current test, open the second test, make your changes, save and
close the second test then reopen your original test.*

*Passing Data*

*Functions - can accept arrays, dictionary objects and test objects (i.e.
Pages, Frames, WebRadioGroups, etc.)*

*Actions - can only accept primitive data types as parameters (strings,
integers, etc)*

*Resource Usage*

*Code contained in the Function*

*For each action, there is a folder, three separate vbs files, a local
Object Repository, a subfolder containing snapshots, an Excel spreadsheet,
and a few seconds of load time.*

*QTP API*

*You can attach Function Libraries to Test Scripts through the QTP API*

*You cannot insert calls to Existing Actions through the QTP API, you can
only do it through the interface*

*Return values*

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

*Return values are difficult to understand and read in the syntax*

*Parameters*

*You cannot change the number of parameters that a function accepts without
affecting all calls to that functionWorkaround: Use named optional arguments
in VBScript functions using Dictionary object.Optional parameters more
difficult to debug*

*Changes to parameters are can be made without affecting all calls to the
action.*

*Object Repositories*

*Object Repositories not available to functions. Descriptive Programming
alternative to OR adds performance drag as per HP.*

*If you want to use the OR feature then you have to go for Action only*

*QTP Checkpoints*

*Various types of QTP checkpoints not available in function lib*

*Checkpoint technology*

*Training *

*Custom Function-based approach presents training issues for folks new to
HIG and Experienced QTP users*

*HP/Mercury Keyword-driven Action-based approach has a broad knowledgebase.
Experienced QTP developers will have few training issues*

*Development*

*Custom Function-based approach is time-consuming to build and maintain*

*QTP comes with pre-packaged functionality and keyword-driven views*

*Keyword View*

*Must be designed/built*

*Built-in QTP Keyword view*

*Abstraction / Presentation*

*Customized*

*Standardized Abstraction*

*Object references*

*Each Function needs to define and load object references*

*Standardized in QTP Object Repository*

*GUI Object Maintenance*

*Not automatically updated*

*Automatically updated for all actions on open*

* *

****



On 9/3/08, mayank <[EMAIL PROTECTED]> wrote:
>
>
> Hi All,
>
> Can anybody tell me the difference between Actions and functions in
> qtp. Actually I am interested in knowing when functions is recommended
> and when actions is recommended.
>
> thanks,
> Mayank
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to