TruClient script calls function created using "group into new function" fails passing parameters (316 Views)
Reply
Visitor
Posts: 2
Registered: ‎03-17-2014
Message 1 of 3 (316 Views)
Accepted Solution

TruClient script calls function created using "group into new function" fails passing parameters

I have been given the task of learning LoadRunner (sink or swim).  We must use the Ajax TruClient protocol for our process.  After successfully developing a script, I sought to create functions for repeatable tasks, passing parameters to the functions.  So I highlighted the set of instructions that would become a function, right clicked on the the highlighted set, then selected the "Group into new function" menu item.  This created my function and allowed me to specify my parameters.  Then in my script I used the Toolbox's Function group's Call Function item to add a call to my created function, supplying values for my parameters.

 

When the script runs the values are not passed and the script fails.  I am having difficulty finding information to help me do this correctly.  All help is appreciated.

 

Visitor
Posts: 2
Registered: ‎03-17-2014
Message 2 of 3 (305 Views)

Re: TruClient script calls function created using "group into new function" fails passing

As so often happens, I find my solution after posting my question.  To use function parameters within the function body one must type FuncArgs.myParameter

HP Expert
Posts: 280
Registered: ‎10-24-2011
Message 3 of 3 (282 Views)

Re: TruClient script calls function created using "group into new function" fails passing

Great to hear. Kindly mark your post as a solution.

Guy Rosenthal
TruClient RnD Team Manager
LoadRunner RnD
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.