You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sebb <se...@gmail.com> on 2015/03/01 10:58:55 UTC
Re: Script question
I would use a Loop Controller instead, with a Loop count of 10 and a
counter.
No need to use BeanShell here.
On 1 March 2015 at 09:20, Erez Naim <er...@theneura.com> wrote:
> Hello all,
>
>
>
> I have a script which create special nodes for users, I want to know how
> to create 10 special nodes for each 10 users using while loop.
>
>
>
> This is what I did :
>
>
>
> Thread Group
>
> Counter (Reference Name: C, increment by 1)
>
> While (${__javaScript(${C}!=10)})
>
> http_request_sampler
>
> BeanShell post processor (which suppose to increment
> Counter (C variable) by 1 for each iteration).
>
>
>
> I saw that I could not increment my counter , how can I make it work I
> mean that the counter will keep increment till it will get 10 in order to
> stop the test?
>
>
>
> Thanks!
>
>
>
>
>
>
>
> Erez Naim | QA Lead | [image: LinkedIn]
> <http://www.linkedin.com/profile/view?id=34323263> [image: vCard]
> <http://www.theneura.com/vCards/gilad.vcf> [image: Twitter]
> <http://twitter.com/#!/giladmeiri/>
>
> [image: cid:image004.png@01D01E1B.5F153500]
>
> EL AL 2 Street | Herzliya
> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>
>
>
> website <http://www.theneura.com/> | blog <http://www.startupbitz.com/>
> | twitter <https://twitter.com/intent/user?screen_name=theneura> | map
> <http://goo.gl/maps/ZRkg5>
>
>
>
>
>
RE: Script question
Posted by Flavio Cysne <fl...@gmail.com>.
You could save each user data in a different file. Maybe
user-data-<userID>.csv. And have another file with all userIDs captured.
RE: Script question
Posted by Erez Naim <er...@theneura.com>.
Thanks Sebb :)
Another question I have is that I want to save the ID of each node that have been added to an external text file (which I did) but to save it for each user and not to save it mixture I mean that one user will have the first 10 spots for him then the next user then the next if I gonna run it like it is now it will be mixture and hard to follow.
-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com]
Sent: Sunday, March 01, 2015 11:59 AM
To: JMeter Users List
Subject: Re: Script question
I would use a Loop Controller instead, with a Loop count of 10 and a counter.
No need to use BeanShell here.
On 1 March 2015 at 09:20, Erez Naim <er...@theneura.com> wrote:
> Hello all,
>
>
>
> I have a script which create special nodes for users, I want to know
> how to create 10 special nodes for each 10 users using while loop.
>
>
>
> This is what I did :
>
>
>
> Thread Group
>
> Counter (Reference Name: C, increment by 1)
>
> While (${__javaScript(${C}!=10)})
>
> http_request_sampler
>
> BeanShell post processor (which suppose to increment
> Counter (C variable) by 1 for each iteration).
>
>
>
> I saw that I could not increment my counter , how can I make it work I
> mean that the counter will keep increment till it will get 10 in order
> to stop the test?
>
>
>
> Thanks!
>
>
>
>
>
>
>
> Erez Naim | QA Lead | [image: LinkedIn]
> <http://www.linkedin.com/profile/view?id=34323263> [image: vCard]
> <http://www.theneura.com/vCards/gilad.vcf> [image: Twitter]
> <http://twitter.com/#!/giladmeiri/>
>
> [image: cid:image004.png@01D01E1B.5F153500]
>
> EL AL 2 Street | Herzliya
> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>
>
>
> website <http://www.theneura.com/> | blog
> <http://www.startupbitz.com/> | twitter
> <https://twitter.com/intent/user?screen_name=theneura> | map
> <http://goo.gl/maps/ZRkg5>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org