Jump to content


Loop operator


  • Please log in to reply
1 reply to this topic

#1 Guest_adoddi@123_*

Guest_adoddi@123_*
  • Guests

Posted 27 October 2011 - 01:26 AM

I have a scenario where i have to use the loop operator inorder to execute some requests multiple times. I used the loop operator to do this but the problem is that the loop operaor only allows static values for loop count and my loop count is dynamic. sometimes i want the loop to be executed 5 times and sometimes 6 times depeding on the file size. (I am creating the file dynamically using javascript).

I tried using If else operator inside loop so that the requests are executed only if the condition is met. but the tool does not come out of loop though the condition is not met except that the requests are not executed. I am not sure how to get out of the loop when condition is not met. I also tried using only while loop, but the loop-iteration option is not available in function properties if used while operator with out the loop. (I need this paramter because i am reading the values form a CSV file and i need the tool to read each line for each loop and this can not be done by just using the while loop). Can some body please advice me on how to acheve this? Thanks.

#2 Sergei Leonov

Sergei Leonov

    Advanced Member

  • Administrators
  • PipPipPip
  • 563 posts

Posted 27 October 2011 - 08:54 AM

I have a scenario where i have to use the loop operator inorder to execute some requests multiple times. I used the loop operator to do this but the problem is that the loop operaor only allows static values for loop count and my loop count is dynamic. sometimes i want the loop to be executed 5 times and sometimes 6 times depeding on the file size. (I am creating the file dynamically using javascript).

I tried using If else operator inside loop so that the requests are executed only if the condition is met. but the tool does not come out of loop though the condition is not met except that the requests are not executed. I am not sure how to get out of the loop when condition is not met. I also tried using only while loop, but the loop-iteration option is not available in function properties if used while operator with out the loop. (I need this paramter because i am reading the values form a CSV file and i need the tool to read each line for each loop and this can not be done by just using the while loop). Can some body please advice me on how to acheve this? Thanks.


Ok, we will add an iteration counter to the While operator.
Sergei Leonov
WAPT Project Manager
SoftLogica LLC

Office: +7-383-335-6692
Toll-free: 1-888-364-6797 (for US only)
Time zone GMT +6, EST +11
E-mail: support@loadtestingtool.com
http://www.loadtestingtool.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users