You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Sosnowski, Andrew P [IT]" <an...@citigroup.com> on 2002/09/20 22:51:06 UTC

How have each thread use a unique User-Id

 I've been wondering about something like this.
I feel like there needs to be a Interleave Controller that works within the
Thread group rather than just within a Loop.

An example of why this is necessary:

I would like Thread 1 to login as User 1, thread 2 to login as user2 etc.
This is what I thought the Interleave controller did but it doesn't; Thread
one log's in as User one, thread2 logs in as User 1, etc.

The reason I need this is that our App stores individual user info in a
Session that gets changed as they progress through our website. If 2 threads
are using the same User-id they will be affecting each other's Session
values with unpredictable results. I want each thread to use a distinct user
id.

I want the several threads to be hitting the server at the same time but as
distinct users. The only way I can see of doing this now is writing several
almost identical scripts except for the login and running them
simultaneously as several jMeter runs.

I believe I saw this come up before and I'm sorry if I'm asking a question
that has already been hashed over but I am unable to view my jMeter mail
archive today. If there is an answer already can someone forward it to me?


Thanks in advance
Andy

-----Original Message-----
From: Rohit Peyyeti
To: 'JMeter Users List'
Sent: 9/20/02 1:49 PM
Subject: Random Controller question

Hello All:

Does anybody know if Random Controller works the way it was supposed to
work
according to the documentation?

I was trying to achive this using Random Controller, but looks like it
refuses to work. I have installed 19th Nightly build but the problem
still
persists.

Thread Group
 - HTTP Requests defaults        (A)
 - HTTP Cookie Manager
 - Only Once Controller          (B)
   - HTTP request to login
 - Loop Controller               (C)
   - Random Controller           (D)
     - Simple Controller         (E)
       - HTTP Request 1
       - HTTP Request 2
       - HTTP Request 3
       - HTTP Request 4
       - HTTP Request 5
     - Simple Controller         (F)
       - HTTP Request 1
       - HTTP Request 2
       - HTTP Request 3
       - HTTP Request 4
       - HTTP Request 5


The problem which I'm facing here was that JMeter stops executing
whatever
requests under Label (E) & (F) after initially executing two or three
requests under both of each controllers. What I expected was that JMeter
would excute all the requests under Label (E) or (F) randomly. Is't it
the
way Random Controller supposed work? Or I'm I doing something wrong?

To zero it on Random Controller for the fault, I also moved (E) & (F)
controller directly under Loop Controller. Everything worked fine then.

Regards,
Rohit Peyyeti


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How have each thread use a unique User-Id

Posted by Mike Stover <ms...@apache.org>.
You can do this with the new User Parameters config element.  It's available in the 
nightlies.  It lets you specify thread-specific values and use them as user-defined 
values.

Documentation about user-defined values is availabe at:
http://jakarta.apache.org/jmeter/usermanual/functions.html

and from there, the User Parameters config element should be fairly self-
explanatory from the GUI.

-Mike


On 20 Sep 2002 at 16:51, Sosnowski, Andrew P [IT] wrote:

>  I've been wondering about something like this.
> I feel like there needs to be a Interleave Controller that works within the
> Thread group rather than just within a Loop.
> 
> An example of why this is necessary:
> 
> I would like Thread 1 to login as User 1, thread 2 to login as user2 etc.
> This is what I thought the Interleave controller did but it doesn't; Thread
> one log's in as User one, thread2 logs in as User 1, etc.
> 
> The reason I need this is that our App stores individual user info in a
> Session that gets changed as they progress through our website. If 2 threads
> are using the same User-id they will be affecting each other's Session
> values with unpredictable results. I want each thread to use a distinct user
> id.
> 
> I want the several threads to be hitting the server at the same time but as
> distinct users. The only way I can see of doing this now is writing several
> almost identical scripts except for the login and running them
> simultaneously as several jMeter runs.
> 
> I believe I saw this come up before and I'm sorry if I'm asking a question
> that has already been hashed over but I am unable to view my jMeter mail
> archive today. If there is an answer already can someone forward it to me?
> 
> 
> Thanks in advance
> Andy
> 
> -----Original Message-----
> From: Rohit Peyyeti
> To: 'JMeter Users List'
> Sent: 9/20/02 1:49 PM
> Subject: Random Controller question
> 
> Hello All:
> 
> Does anybody know if Random Controller works the way it was supposed to
> work
> according to the documentation?
> 
> I was trying to achive this using Random Controller, but looks like it
> refuses to work. I have installed 19th Nightly build but the problem
> still
> persists.
> 
> Thread Group
>  - HTTP Requests defaults        (A)
>  - HTTP Cookie Manager
>  - Only Once Controller          (B)
>    - HTTP request to login
>  - Loop Controller               (C)
>    - Random Controller           (D)
>      - Simple Controller         (E)
>        - HTTP Request 1
>        - HTTP Request 2
>        - HTTP Request 3
>        - HTTP Request 4
>        - HTTP Request 5
>      - Simple Controller         (F)
>        - HTTP Request 1
>        - HTTP Request 2
>        - HTTP Request 3
>        - HTTP Request 4
>        - HTTP Request 5
> 
> 
> The problem which I'm facing here was that JMeter stops executing
> whatever
> requests under Label (E) & (F) after initially executing two or three
> requests under both of each controllers. What I expected was that JMeter
> would excute all the requests under Label (E) or (F) randomly. Is't it
> the
> way Random Controller supposed work? Or I'm I doing something wrong?
> 
> To zero it on Random Controller for the fault, I also moved (E) & (F)
> controller directly under Loop Controller. Everything worked fine then.
> 
> Regards,
> Rohit Peyyeti
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
Michael Stover
mstover1@apache.org
Yahoo IM: mstover_ya
ICQ: 152975688

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: How have each thread use a unique User-Id

Posted by Wangke Liao <wa...@yahoo-inc.com>.
You don't have to go that way. Here is a very simple way to simulate x users
using x threads independently, hint: use Parameter Mask:

--thread group (X threads)
	-- HTTP Req default
	-- HTML Parameter mask (loginID = userx where x from 1 to X, step 1, use
the settings inside. Do the same trick for pwd, or for simplicity, just use
the same pwd)
	-- HTML Cookie manager, if needed.
	-- Once only Controller
		--login (in login page, set loginID value to "*", without the quote - this
will tell JMeter to use the values generated sequentially in the Parameter
mask.)
	-- loop controller
		-- other user actions ....
	-- logout

You can define how many loop you need either from "loop controller" or
thread group, or even both. Either way, each time of the loop X threads will
pick, no more no less, X unique users.

-wangke

-----Original Message-----
From: Sosnowski, Andrew P [IT] [mailto:andrew.p.sosnowski@citigroup.com]
Sent: Friday, September 20, 2002 1:51 PM
To: ''JMeter Users List' '
Subject: How have each thread use a unique User-Id


 I've been wondering about something like this.
I feel like there needs to be a Interleave Controller that works within the
Thread group rather than just within a Loop.

An example of why this is necessary:

I would like Thread 1 to login as User 1, thread 2 to login as user2 etc.
This is what I thought the Interleave controller did but it doesn't; Thread
one log's in as User one, thread2 logs in as User 1, etc.

The reason I need this is that our App stores individual user info in a
Session that gets changed as they progress through our website. If 2 threads
are using the same User-id they will be affecting each other's Session
values with unpredictable results. I want each thread to use a distinct user
id.

I want the several threads to be hitting the server at the same time but as
distinct users. The only way I can see of doing this now is writing several
almost identical scripts except for the login and running them
simultaneously as several jMeter runs.

I believe I saw this come up before and I'm sorry if I'm asking a question
that has already been hashed over but I am unable to view my jMeter mail
archive today. If there is an answer already can someone forward it to me?


Thanks in advance
Andy

-----Original Message-----
From: Rohit Peyyeti
To: 'JMeter Users List'
Sent: 9/20/02 1:49 PM
Subject: Random Controller question

Hello All:

Does anybody know if Random Controller works the way it was supposed to
work
according to the documentation?

I was trying to achive this using Random Controller, but looks like it
refuses to work. I have installed 19th Nightly build but the problem
still
persists.

Thread Group
 - HTTP Requests defaults        (A)
 - HTTP Cookie Manager
 - Only Once Controller          (B)
   - HTTP request to login
 - Loop Controller               (C)
   - Random Controller           (D)
     - Simple Controller         (E)
       - HTTP Request 1
       - HTTP Request 2
       - HTTP Request 3
       - HTTP Request 4
       - HTTP Request 5
     - Simple Controller         (F)
       - HTTP Request 1
       - HTTP Request 2
       - HTTP Request 3
       - HTTP Request 4
       - HTTP Request 5


The problem which I'm facing here was that JMeter stops executing
whatever
requests under Label (E) & (F) after initially executing two or three
requests under both of each controllers. What I expected was that JMeter
would excute all the requests under Label (E) or (F) randomly. Is't it
the
way Random Controller supposed work? Or I'm I doing something wrong?

To zero it on Random Controller for the fault, I also moved (E) & (F)
controller directly under Loop Controller. Everything worked fine then.

Regards,
Rohit Peyyeti


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>