jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Modifying the request
Date Wed, 16 Dec 2009 12:41:05 GMT
On 16/12/2009, amalshah <amalshah71@yahoo.com> wrote:
>
>  My aim is to hit server with 50 users and each user hitting server 5 times...
>
>  so for such a scenario the test plan is..
>
>
>  +ThreadGroup
>  ++LoopController (for each user i want 5 different requests to be hit...so
>  i
>  give LoopCount = 5)
>  +++HTTP Request HTTPClient
>
> ++++Regular Expression Extractor (From here i can pick up a 'sessionId'
>  as in screenshot )
>
> ++++View Results Tree
>  ++User Parameters (here each user id is picked up)
>
>
> I am not able to get, if 'Regular Expression Extractor' is not under 'HTTP
>  Request HTTPClient' then how ${mySessionId} will be unique to each
>  request...

You cannot expect to use the sessionId before it has been sent back to you.

The sequence needs to be:

HTTP Sample
Regex Extractor => mySessionId
HTTP Sample using ${mySessionId}

>
>  sebb-2-2 wrote:
>  >
>  > On 16/12/2009, amalshah <amalshah71@yahoo.com> wrote:
>  >>
>  >>
>  >>
>  >>  sebb-2-2 wrote:
>  >>  >
>  >>  > On 16/12/2009, amalshah <amalshah71@yahoo.com> wrote:
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>  Deepak Shetty wrote:
>  >>  >>  >
>  >>  >>  > Sorry I dont know much about J2ME, what does your response
header/
>  >>  >>  > response
>  >>  >>  > look like(if you added view results tree listener)?
>  >>  >>  > regards
>  >>  >>  > deepak
>  >>  >>  >
>  >>  >>  > On Tue, Dec 15, 2009 at 9:25 PM, amalshah <amalshah71@yahoo.com>
>  >>  >> wrote:
>  >>  >>  >
>  >>  >>  >>
>  >>  >>  >> My client is a J2ME client and not a web client. So Cookie
>  >> Manager
>  >>  >> stuff
>  >>  >>  >> doesn't apply.
>  >>  >>  >>
>  >>  >>  >> The requirement is to get 'id_session' value from header
and
>  >> append
>  >>  >> to
>  >>  >>  >> url
>  >>  >>  >> for every request thereafter...
>  >>  >>  >>
>  >>  >>  >> +ThreadGroup
>  >>  >>  >> ++LoopController (for each user i want 5 different requests
to be
>  >>  >>  >> hit...so
>  >>  >>  >> i
>  >>  >>  >> give LoopCount = 5)
>  >>  >>  >> +++HTTP Request HTTPClient
>  >>  >>  >> ++++UserParameters (which picks up each request data)
>  >>  >>  >> ++++Regular Expression Extractor (From here i can pick
up a
>  >>  >> 'id_session'
>  >>  >>  >> value from Header...but can't figure out where and how
to use it
>  >> )
>  >>  >>  >> ++++View Results Tree
>  >>  >>  >> ++User Parameters (here each user id is picked up)
>  >>  >>  >>
>  >>  >>  >> The regex looks like....
>  >>  >>  >>
>  >>  >>  >> Ref name : mySession
>  >>  >>  >> Reg Exp : sessionId"[^"]*"([^"])*"
>  >>  >>  >> Template : $1$
>  >>  >>  >> Match No : 1
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >> and in the header i get a 'id_session' key whose value
i want to
>  >> read
>  >>  >> and
>  >>  >>  >> append...
>  >>  >>  >>
>  >>  >>  >> However it doesn't seems to find ${mySession}....
>  >>  >>  >>
>  >>  >>  >> What am i missing?
>  >>  >>  >>
>  >>  >>  >> Thanks
>  >>  >>  >> amal
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >> Deepak Shetty wrote:
>  >>  >>  >> >
>  >>  >>  >> > Should work if your regex is correct, however session
id isnt
>  >>  >> normally
>  >>  >>  >> > sent
>  >>  >>  >> > in the response header (except the very first set-cookie)
>  >> unless
>  >>  >> this
>  >>  >>  >> is
>  >>  >>  >> > some custom implementation which I doubt. If your
application
>  >> is
>  >>  >> using
>  >>  >>  >> > url-rewriting  then links on the response will have
the
>  >> ;session_id
>  >>  >> and
>  >>  >>  >> > you
>  >>  >>  >> > an use JMeter's URL rewriting modifier. Alternately
your
>  >>  >> application
>  >>  >>  >> might
>  >>  >>  >> > only be using cookies as well as URL rewriting in
which case
>  >> you
>  >>  >> only
>  >>  >>  >> need
>  >>  >>  >> > add a Cookie Manager to your test. Check your application
and
>  >> see.
>  >>  >>  >> >
>  >>  >>  >> > regards
>  >>  >>  >> > deepak
>  >>  >>  >> >
>  >>  >>  >> > On Tue, Dec 15, 2009 at 7:25 AM, amalshah
>  >> <amalshah71@yahoo.com>
>  >>  >> wrote:
>  >>  >>  >> >
>  >>  >>  >> >>
>  >>  >>  >> >> What i really want to is to hit the server with
multiple
>  >> requests
>  >>  >> for
>  >>  >>  >> >> each
>  >>  >>  >> >> user
>  >>  >>  >> >>
>  >>  >>  >> >> This is how my test plan looks like
>  >>  >>  >> >>
>  >>  >>  >> >> +ThreadGroup
>  >>  >>  >> >> ++LoopController (for each user i want 5 different
requests to
>  >> be
>  >>  >>  >> >> hit...so
>  >>  >>  >> >> i
>  >>  >>  >> >> give LoopCount = 5)
>  >>  >>  >> >> +++HTTP Request HTTPClient
>  >>  >>  >> >> ++++UserParameters (which picks up each request
data)
>  >>  >>  >> >> ++++Regular Expression Extractor (From here i
can pick up a
>  >>  >>  >> 'id_session'
>  >>  >>  >> >> value from Header...but can't figure out where
and how to use
>  >> it )
>  >>  >>  >> >> ++++View Results Tree
>  >>  >>  >> >> ++User Parameters (here each user id is picked
up)
>  >>  >>  >> >>
>  >>  >>  >> >>
>  >>  >>  >> >> Now , what i am really getting fixed is at , how
to
>  >> dynamically
>  >>  >>  >> generate
>  >>  >>  >> >> the
>  >>  >>  >> >> path of each request.
>  >>  >>  >> >>
>  >>  >>  >> >> Initially the path of each request in LoopController
is say :-
>  >>  >>  >> >>
>  >>  >>  >> >> abc;
>  >>  >>  >> >>
>  >>  >>  >> >> after reponse i want to append it with 'id_session'
from
>  >> header
>  >>  >>  >> >>
>  >>  >>  >> >> i.e. abc;${id_session}
>  >>  >>  >> >>
>  >>  >>  >> >> I tried doing above thing....but it seems to fail....
>  >>  >>  >> >>
>  >>  >>  >> >> What am i missing?
>  >>  >>  >> >>
>  >>  >>  >> >> Thanks
>  >>  >>  >> >> amal
>  >>  >>  >> >>
>  >>  >>  >> >>
>  >>  >>  >> >>
>  >>  >>  >> >> amalshah wrote:
>  >>  >>  >> >> >
>  >>  >>  >> >> > Thanks deepak...'User Parameters' helped....
>  >>  >>  >> >> >
>  >>  >>  >> >> > What would be the way out to read something
from the Header
>  >>  >> returned
>  >>  >>  >> in
>  >>  >>  >> >> > response and then modify the url (by appending
the value
>  >> from
>  >>  >>  >> >> header)....
>  >>  >>  >> >> >
>  >>  >>  >> >> > Thanks
>  >>  >>  >> >> > amal
>  >>  >>  >> >> >
>  >>  >>  >> >> > Deepak Shetty wrote:
>  >>  >>  >> >> >>
>  >>  >>  >> >> >> Hi
>  >>  >>  >> >> >> read up on User parameters or CSV data
set config in the
>  >> online
>  >>  >>  >> manual
>  >>  >>  >> >> >>
>  >>  >>  >> >> >> regards
>  >>  >>  >> >> >> deepak
>  >>  >>  >> >> >>
>  >>  >>  >> >> >> On Mon, Dec 14, 2009 at 5:07 AM, amalshah
>  >>  >> <amalshah71@yahoo.com>
>  >>  >>  >> >> wrote:
>  >>  >>  >> >> >>
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> i want to load test my server w.r.t
a J2ME client and not
>  >> a
>  >>  >> web
>  >>  >>  >> >> client
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> i can test server for a given user.
What is want to do
>  >> test a
>  >>  >>  >> login
>  >>  >>  >> >> >>> functionality with say 50 users having
different user
>  >> id's.
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> Say for eg : the request sent to
server is in format :-
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> userid,a,b,c,d,e
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> where userid keeps on changing for
different users and
>  >>  >> 'a,b,c,d,e'
>  >>  >>  >> is
>  >>  >>  >> >> >>> the
>  >>  >>  >> >> >>> request part which remains the same
for all user's.
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> What could be the way to dynamically
replace userid with a
>  >>  >>  >> different
>  >>  >>  >> >> >>> userid
>  >>  >>  >> >> >>> and send it to server
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> for eg :
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> userid_1,a,b,c,d,e and so on for
50 different user's.
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>> Thanks
>  >>  >>  >> >> >>> amal
>  >>  >>  >> >> >>> --
>  >>  >>  >> >> >>> View this message in context:
>  >>  >>  >> >> >>>
>  >>  >>  >>
>  >> http://old.nabble.com/Modifying-the-request-tp26777437p26777437.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
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>>
>  >>  >>  >> >> >>
>  >>  >>  >> >> >>
>  >>  >>  >> >> >
>  >>  >>  >> >> >
>  >>  >>  >> >>
>  >>  >>  >> >> --
>  >>  >>  >> >> View this message in context:
>  >>  >>  >> >>
>  >>  >> http://old.nabble.com/Modifying-the-request-tp26777437p26795830.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
>  >>  >>  >> >>
>  >>  >>  >> >>
>  >>  >>  >> >
>  >>  >>  >> >
>  >>  >>  >>
>  >>  >>  >> --
>  >>  >>  >> View this message in context:
>  >>  >>  >>
>  >> http://old.nabble.com/Modifying-the-request-tp26777437p26806449.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
>  >>  >>  >>
>  >>  >>  >>
>  >>  >>  >
>  >>  >>  >
>  >>  >>
>  >>  >> http://old.nabble.com/file/p26807908/TestPlan.jpeg
>  >>  >>  http://old.nabble.com/file/p26807908/HeaderResponse.jpeg
>  >>  >
>  >>  > No wonder the RE does not work, the sessionid does not contain any
>  >> quotes.
>  >>  >
>  >>  > Try
>  >>  >
>  >>  > sessionId:\s+(\S+)
>  >>  >
>  >>  >> --
>  >>  >>  View this message in context:
>  >>  >> http://old.nabble.com/Modifying-the-request-tp26777437p26807908.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
>  >>  >>
>  >>  >>
>  >>  >
>  >>  > ---------------------------------------------------------------------
>  >>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  >>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >>  >
>  >>  >
>  >>  >
>  >>
>  >> http://old.nabble.com/file/p26810027/untitled.jpeg
>  >>  http://old.nabble.com/file/p26810027/untitled1.jpeg
>  >>  http://old.nabble.com/file/p26810027/untitled2.jpeg
>  >>
>  >>
>  >>  I tried ' sessionId:\s+(\S+) '...though it seems url is malformed
>  >>
>  >>  It seems ${mySessionId} can't be read cos...it is child of Http Client
>  >>  HttpRequest and is used beforehand.
>  >>
>  >>  But i am not able to get is, if i don't use as done in 'Path' then where
>  >>  else it should be done...
>  >
>  > The RE is a Post-Processor - you have to apply it to the previous result.
>  >
>  >>  Thanks
>  >>  amal
>  >>
>  >> --
>  >>  View this message in context:
>  >> http://old.nabble.com/Modifying-the-request-tp26777437p26810027.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
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>  >
>
>  --
>
> View this message in context: http://old.nabble.com/Modifying-the-request-tp26777437p26810391.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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message