jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Speteanu <>
Subject Re: Persist JSESSIONID throughout a TestPlan
Date Mon, 11 Mar 2013 16:28:16 GMT
This question has been asked before, but I don't remember a time it has
been solved.

You'll want to create a variable in one of the thread group, such as
"variable_<number_of_thread>" and then all other threads will be able to
reference it. Of course, you'll need to make thread groups with an equal
number of threads. Creating the variable is easy, but making it accessible
to the other threads was not possible in older version (? maybe I'm
mistaken about this, but I looked to implement this particular use-case 3
years ago and found no solution). However, with the versions released in
the last couple of years, you have the beanshell server that can help with
this. I haven't tested it yet, its in my to do list, but I think someone
explained how it can be used to update a variable from within multiple
threads, the same principle should apply in your use case. Also, there is a
plugin:, that
might do the job, but again, haven't had the time to use it myself.

So you're use-case is doable, but you should be double-careful :) and test
that what you think you are doing is actually what is happening. With
thread sharing and concurrency you can easily run into weird situations
(i'm thinking other values than expected, but memory leaks aren't excluded

Good luck with this.

Also, please be kind and let us know what solution you used in the end. I
think you should appreciate how useful this contribution might be for
someone else.

--Adrian S

On Mon, Mar 11, 2013 at 1:48 PM, Alaka P A <> wrote:

> I have to test the webserver which has to maintain sessions.
> For this purpose I need to maintain session ids in jmeter.
> It has been working for ThreadGroup as I
> am using HTTP Cookie Manager for every Thread Group.
> But i want to use the same
> JSESSIONID across the test plan which includes several Thread Groups.
> Not able to achieve this.
> I tried using HTTP Cookie Manager globally for a Test Plan,
> But it didnt work.
> I am using jmeter 2.5 version. Can anybody help me with this?
> Thanks !
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message