Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
parameters
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
- declared a,b,c parameters in action1
a as random variable
b,c are test/action parameters

in test settings i have set default values of b,c as hello,world respectively

in action1 - action properties - parameters - set the values of b,c as pooja,prasanthi resp.

in action1 - action call properties - parameters - set the values of b,c to test/action parameters

Code:
Action1 - expert view - Msgbox("a"),("b"),("c")
Action2 - expert view -
  for i=1 to 3
      Runaction "Action1", oneIteration, RandomNumber("arg_a")
  next

Test result is pass
but

thre random number is generated 3 times then for the subsequent iterations the 3rd random no is repeated
ex : for 5 iterations - 23,67,13,13,13
for 6 iterations - 99,100,21,21,21,21

for b,c
for the first time - action1 is run - takes test/action parameter default values
for the second time when action 2 calls action1 - it is taking action parameters default values.

ex hello,world
pooja,prasanthi
pooja,prasanthi
....


regards pooja


Attached Files Image(s)
           
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
if you use 'RandomNumber' with a name then it generating new number will depend on the action iteration or test iteration, its is generated once per action/test or once for entire test depend on the configuration setting you. (see more info in QTP help)

I will suggest you to not to use the name in the parameter while using RandomNumber for this case
use start number and end number for the args of function
Code:
for i=1 to 3
Runaction "Action1", oneIteration, RandomNumber(0,100)
next

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Set data parameters Mik2s 1 1,480 03-07-2019, 10:18 PM
Last Post: supputuri
  Part of parameters missing when passing between actions skumar007 1 2,990 10-10-2014, 02:00 AM
Last Post: skumar007
  Launching .exe file with parameters magnifyingone 1 3,152 08-28-2014, 06:39 PM
Last Post: dplank
  Need Help Understanding Parameters alex228015 0 2,285 03-18-2014, 12:30 AM
Last Post: alex228015
  New Test Parameters VenkataBonu 6 9,790 12-10-2013, 09:11 AM
Last Post: cflow

Forum Jump:


Users browsing this thread: 2 Guest(s)