Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Doubt in non reusable actions
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
I am learning qtp.I am doing practice of actions.I have doubt given as below
I create two tests i.e. test1 and test2
test1 contains two actions i.e. login (non reusable action) and logout (reusable action)

test2 contains booking order action

Now i make a call to copy of non reusable login action from test1 in test2 and also make a call to existing reusable logout action from test1 in test2.It runs successfully.

Now my question (doubt) is this:I have read somewhere that non reusable action can not be use in other tests.
But here i have make a call to copy of non reusable login action from test1 into test2?How is it possible to use non reusable action of test1 in other test2.Please clear my doubt.
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Pradeep,

Please go through the help provided with QTP. It provides good explanation.
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi
I could not get anything in help section which clear my above doubt.Please explain /clear me.
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Pradeep,

In qtp help, search for Actions keyword. From the list below select "copy of". You will get the required info.
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Manish -
He is never going to find the water in the desert. If you are open to listen, then i would say, you must give leverage to a person who has declared that he is "learning QTP" and is intrested to clear his doubts which he has accured over the internet from faksters posting answers which they dream of. In this case, i would request you, to have provided a bit more information which would be as good as taking the horse to the pond. Well, if you reached this far, and you find this offensive, please use the undo feature on your brain and ignore me Smile.

Pradeep -
Very intresting observation. I am sorry, i have been held up and hence had no time to look in and reply. I must apologize, you havent recieved a correct reply, although manish really showed you the door it was left to you to open and explore further.

What you have read is partially correct and some of it is un-true. You can make a call to copy of an action for an non-reusable action in a different test. That statement is true. But have you observed what happens after you have made the call and the action appears in your test? Let us know your observations then.

From what QTP has to say, this is what they mean with definitions for the various action names,

Code:
Reusable action: An action that can be called multiple times by the test with which it is stored (the local test), as well as by other tests.

Non-reusable action : An action that can be called only in the test with which it is stored, and can be called only once.

External action : A reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action

The definitions are self-explanatory. In short, if you have Test1->Non-Reusable ACtion1 and you make a call to this Non-Reusable Action1 on to Test2, then the properties of "Non-Reusable Action1" in Test2 is changed to an readonly reusable action. The reason is, because you have forcibly called this action to be a copy of the action which the action thinks that you want to reuse this in the test2 multiple times. However, in Test1 the property of the "Non-Reusable Action1" remains as Non-Reusable and can be called only once in the same test where it is stored.

If it is still confusing or you havent found the way yet, i suggest you read the section "Working with actions" on QTP help as suggested by manish and pick up specific doubts and put it across, which we will be very much happy to answer.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Thanks basanth27
For your nice explaination.It is cleared to me now.
Reply
#7
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi... Basanth,

I also posted same doubt... sorry.. I didn't see this thread.
I refer GURU99 videos and I got same doubt. Can u pls make it clear... I use QTP 10 and if i call a non reusable action it works, not read only, can execute n no of times.....Sad
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to call Actions from other Actions Naresh 1 7,966 09-25-2014, 10:26 AM
Last Post: vinod123
  doubt on webedit ramuvasavi 1 1,886 03-10-2014, 12:35 PM
Last Post: basanth27
Question Doubt in Object Repository gopi.accnt@gmail.com 2 2,284 02-13-2014, 11:17 AM
Last Post: gopi.accnt@gmail.com
  Non-reusable action - doubt srsaritha 1 3,504 10-16-2012, 05:04 PM
Last Post: richa07
  how to call reusable actions by passing parameters.? Arun091 0 3,876 08-16-2012, 07:28 PM
Last Post: Arun091

Forum Jump:


Users browsing this thread: 1 Guest(s)