what is the difference between action and function
Answers were Sorted based on User's Feedback
Answer / pratap
Following are simple and easy to understand how function
differs from Action .Go through
I)
Actions : actions are more specific to tool ex : qtp
Functions : functions are generic and feature of programing
language Ex : vb or java or C , C++.
II)
Actions : actions are associated with object Repositry (
Per action or shared dependnds )
Functions : functions don have object repositry associated
with them .
III)
Actions : Actions can be called by syntax :
RunAction "ActionName",OneIteration
Functions : functions can be call by syntax
Call Function(FunctionName)
| Is This Answer Correct ? | 31 Yes | 3 No |
Answer / raj
Hi guys,
Here is the best differences........
1)We can use actions within QTP where as we can use
functions anywhere(i.e.outside QTP also)
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".
If you have any doubt Still you can shout at my mail
Regards,
Rajasekhar
| Is This Answer Correct ? | 24 Yes | 6 No |
Answer / bharat
Functions can retun multiple values through arrays
Action can directly throe a value into different varaible
(Output PArameters)
Functions does not have any associateion with
ObjectRepository,Recovery Scenerio,Checkpoints and hence it
need QTP toll to make this assocaition
Actions can be called for multipe iterations
in function u need to write a loop structure to execute it
multiple time
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / sailaja
Few of the key differences between reusable actions and
functions here.
Passing Data
Actions - can only accept primative 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 - You cannot insert calls to Existing Actions
through the QTP API, you can only do it through the
interface
Functions - You 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)
| Is This Answer Correct ? | 8 Yes | 8 No |
Answer / naresh
See Why u r using Functions in your Project And Why u r Not using Actions.. I wnna Exact Difference... and
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / balajireddy1980
Hi All,
Difference between Actions and Function is Action is having
repository but function don't have repository.
Thanks
Balaji
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / roy
action: test for one module or one case
function : the combination of statements and "logical and conditional statements"
action: depend on testing process
function: depending on language like c, c++, scripting
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / raju
1). we enhasing the scripts(Check points, output values)
insert in the action the actions allows but in the case of
functions it doesn't allow the enhasing the scripts.
2). Actions saved into the QTP but functions are saved into
the .vbs file
3). in the case of call copy action it won't reflect into
the child action to parent action but functions it will
reflect in to the child action to parent action.
4). Mainly very important use:
if at all call the Action the particular object information
stored into the object repository but in the case of
function when ever we call the function it doesn't stored
into the object repository.
if at all any wrong let me know.
raju.ippali@gmail.com
9823257761
| Is This Answer Correct ? | 9 Yes | 12 No |
How to create runtime property for an object?
What is the difference between functional spec. and Business requirement specification?
What is the entry criteria and exit criteria for your test automation
i am testing an online shopping application.I CLICK on a link "ADD TO CART" of that application a "new page" is open and then click on any object of that "new page". after that when i run this SCRIPT then on this "new page" QTP always shows error of "OBJECT NOT FOUND". How i solve this problem ?
Hi Friends, Can any one answer this question? 17) What method is used to retrieve the number of columns in the query results? A. Fields.Count B. Fields.Item(EOF) C. Fields.Count(BOF) D. Fields.Count.Value
how can we compare descriptive programing with a regular expression
3.How to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.
i have 100 manual test cases, how to automate from no 1. ols detail steps
What is the synchronization point in qtp?
what is defination of regression testing?
Can i get a simple example exercise for update run mode for sample flight application......... In qtp when i try to run the test in update mode.. Auotmation> update option is disabled............ Pls let me know ................. Thanks in advance.....
How to Save your test using QTP?