Highlighted
Visitor.
221 views

Parameter in For loop getting last value first

Hi all,

I'm new to Load Runner and TruClient.  I am using version 12.60, Build 1053.  I was trying to follow the steps on https://admhelp.microfocus.com/tc/en/12.60/Content/TruClient/procedures/_tc_examples_iterate_over_a_web_page.htm and have implemented the loop using the javascript evaluator.  However, the parameter I am using is starting with the wrong value.  I have attached my parameter settings as an image. 

When I run my script and it runs with value 4, then 1, 2, 3.

Am I doing something wrong?image.pngimage.png

 

 

0 Likes
3 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Parameter in For loop getting last value first

Hi Carreola, 

I can't see the image attached to your request. Anyway, can you explain how the parameter is configured? How have you set the selection modality ("Sequential", "Unique", ecc.)? Is the step with the parameter used included in the loop?

Lorenzo

0 Likes
Highlighted
Visitor.

Re: Parameter in For loop getting last value first

Hi Lorenzo, sorry about the images.  I see them fine when I view the post.  The parameter settings are Sequential and Each Occurrence.  It appears to have resolved itself after I completely exited the program and re-imported my script. I wonder if I just got in some weird state.

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Parameter in For loop getting last value first

I'm glad the error is solved! Sometims script stay in an inconsistent state, specially TruClient: misalignment between Develop and VuGen bytecode, incorrect numbering for parameters, ... due to application itself or by the recording algoryth used. 

I add a question: have you insert a loop construct on "Action" section or you have "Init", "End" and "Action" sections to make a loop on this latter?

Anyway, regarding a loop algoryth you have to recallthat a "Sequential" method of input fetch can due some problems on massive tests: if there are "Init", "End" and "Action" section on your script, I suggest you to select next data input as "Unique"; sometimes, if you setted "Sequential", during the test the only data fetched is the first and it will be the only input for all the duration of the scenario.

Lorenzo

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.