jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Need Clarification on session info in Once only controller
Date Tue, 09 Jun 2009 18:45:20 GMT
Your end result may be correct , but your reasoning is wrong.
Typically what you say is the behavior ,  each thread begins a new request ,
and the server probably sends you a Set-Cookie with a new session id for
each thread, hence you have two sessions, one per thread (since JMeter would
maintain the cookies per thread)

but for e.g. if i use the Cookie Manager to specify a valid JSessionID(for
java web servers) when i start the test, then all threads will use the same
session.

My point is dont think of sessions in terms of Jmeter threads, understand
how HTTPSession works


regards
deepak

On Tue, Jun 9, 2009 at 10:37 AM, ankush jethi <ankush.jethi@gmail.com>wrote:

> hi deepak,
> U just read your reply. Dont you think each jmeter request has its own
> session? For example I have two threads being hit at once. Won't they use
> separate session Ids? Just like two browsers sending requests independently
>
> Please correct me if I am wrong
> Regards
> Ankush
>
> On Tue, Jun 9, 2009 at 9:54 PM, Deepak Shetty <shettyd@gmail.com> wrote:
>
> > The 'session' is determined by the server - anytime you send it a
> sessionid
> > (which isnt invalid or timed out) either encoded into the URL or as a
> > cookie
> > , the server will treat it as the same session. It has no direct relation
> > to
> > JMeter threads / controller etc.
> >
> > >For eg:
> > >No of users is 2
> > >Used Once only controller for login and logout.
> > >so irrespective of run duration, number of loops there will be 2
> sessions
> > >only, one for each user....is it correct?
> > Assuming you have a HTTP Cookie manager (and your server is using cookies
> > for the session id), then first request should probably start your
> session
> > (depends on server code)- Subsequent requests pass the same session id.
> > Login should probably attach your credentials to your existing session
> (but
> > can in some cases start a new session depending on the server code). If
> you
> > logout then your session should be destroyed/invalidated (unless coded
> > otherwise). Any requests after that will create a new session . so your
> > once
> > only for logout does not work, it should only be executed after all your
> > tests have run for the thread.
> >
> > >so what happens if i put all the requests including login and logut in a
> > >loop controller for a certain nuber of iterations?
> > >New session will be created for each user for iteration ?
> > Probably, observe the cookies, session ids being sent
> >
> > regards
> > deepak
> >
> > On Tue, Jun 9, 2009 at 8:02 AM, TSurendar <s9884906206@gmail.com> wrote:
> >
> > >
> > > Hi All,
> > >
> > > I want to know how the sessions are managed in once only and loop
> > > controller.
> > >
> > > For eg:
> > > No of users is 2
> > > Used Once only controller for login and logout.
> > > so irrespective of run duration, number of loops there will be 2
> sessions
> > > only, one for each user....is it correct?
> > >
> > > so what happens if i put all the requests including login and logut in
> a
> > > loop controller for a certain nuber of iterations?
> > >
> > > New session will be created for each user for iteration ?
> > >
> > > Thanks in advance.
> > >
> > >
> > > Thanks,
> > > Surendar
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://www.nabble.com/Need-Clarification-on-session-info-in-Once-only-controller-tp23944654p23944654.html
> > > Sent from the JMeter - User mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> > >
> >
>
>
>
> --
> Regards
> Ankush Jethi
> It Is Very Easy To Be Brave From A Safe Distance.
>

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