You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by gsub <af...@gmail.com> on 2010/07/30 12:43:14 UTC

Re: Recording of a script in jmeter

Hi Archna,

i thinks its very clear in
http://jakarta.apache.org/jmeter/usermanual/jmeter_proxy_step_by_step.pdf

you need to mentioned proxy port for recording (i.e 8080)
and in http request default, mention the port (XXXX as for below link) on
which application runinng ( like http://111.11.11.11:XXXX/pathlogin.aspx )

pdf is will give you very clear idea.. you first go through it

regards
GP



On Fri, Jul 30, 2010 at 2:36 PM, Archana12 [via JMeter] <
ml-node+2259329-2137689938-42527@n5.nabble.com<ml...@n5.nabble.com>
> wrote:

> Hi,
>
> I am new in jmeter. I want to know that hw to record the script in jmeter.I
> read help file of jmeter for the same but unable to understand.Can anybody
> tell me step wise. As I am not able to understand that where to use which
> port.
>
>
>
> ------------------------------
>  View message @
> http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2259329.html
> To start a new topic under JMeter - User, email
> ml-node+512775-1292059537-42527@n5.nabble.com<ml...@n5.nabble.com>
> To unsubscribe from JMeter - User, click here< (link removed) =>.
>
>
>

-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2259407.html
Sent from the JMeter - User mailing list archive at Nabble.com.

Re: Recording of a script in jmeter

Posted by gsub <af...@gmail.com>.
Archna,

i am unable to open the file.. 

regarding the lan setting, 1st you close all the browsers, open only 1 (i.e
IE) and 1st changed the lan setting with proxy name as Localhost and port as
( 8080, depends on your proxy setting)

test plan incude
thread
http default ( in this enter ur required details like server or IP, then
path(like this  /loginpage.aspx)
http cookie manager

Then in Workbench add proxy setting add port no ( defined in LAN settting).
Click Start

And then do your browsing, every step will recored. still facing issue do
check the log file(jmeter log file )

I hope this will clear this



-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2259530.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


Re: Recording of a script in jmeter

Posted by gsub <af...@gmail.com>.
HI Guys .. 
i have succesfully got this regex extractor for 2 pages atlst till now ( 1st
login page & 2nd for inbox page)  :)
as i have used the reg expression->    \"?x=(.+?)\"  and storing it in
variable nxturl

then i had made changes in the path as (/thisisnew/LoginPage?x=${nxturl} )
and i have sucessfully achived the inbox response .. thanks to all your
valuable thoughts  :)

buzz you all in next post for uploading doc scenario.. :-)

regards
gp

-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2473189.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


Re: Recording of a script in jmeter

Posted by gsub <af...@gmail.com>.
Thanks !! 
and so i am trynig it too and some tuning is going on with me and Jmeter.. 

now i have recorded the script and in the previous url i am have put the
Regular Exp extractor 
i have user 
Refence Name: nxt
Regular Expression: jhref=".*?x=(\w*) ( i tried this too -> ".*?x=(\w*)"  ) 
Template: $1$
Match : 1
Default value: NOTFOUND

And in the next URL i have replaced that with the reference name
as(/thisisnew/LoginPage?x=${nxt} )
but when i check the response it is showing as below:
POST http://xxx.x.xx.xx:8080/thisisnew/LoginPage?x=NOTFOUND


and its base URL is GET http://xxx.x.xx.xx:8080/thisisnew/PageExpired

Now what modification is req in the scripts and in where

regards
GP
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2473145.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


Re: Recording of a script in jmeter

Posted by Deepak Shetty <sh...@gmail.com>.
Here's the thing you need to know about JSessionID. Typically the (java
based web )server will send you the session id in the cookie . To cover for
the cases where the browser does not support cookies , the webserver also
supports what is called URL Rewriting - i.e. Rewrite the URL so that the
session id is in the URL. For the very first request that your browser makes
that the web server creates a session for , it has no way of knowing whether
your browser supports cookies or not (it can only come to know on the second
request when you send it back the cookie) - so typically a webserver will
output out both the set-cookie response header AND the session id in the
URL. Also a webserver can be configured to support just cookies, just url
rewriting or both.
Coming to your case, since you are seeing JSessionID in the URL your
webserver either supports only URL Rewriting or both. Using LiveHttpHeaders
and Firefox access your website and see if you get a Set-Cookie JSESSIONID ,
if you see this then your webserver supports both Cookies and URL Rewriting
in which case just add a cookie manager and IGNORE the value in the URL .
This is the simplest solution.
In the rare case that your webserver is configured to only support URL
Rewriting use
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_URL_Re-writing_Modifier
(this needs to apply to all http samplers) - Simply give the name and Check
the Path Extension box

Not the above applies to java based web servers specifically , but also
applies in the general case to most web servers (though not all of them use
the path extension format)
regards
deepak



On Wed, Aug 11, 2010 at 6:51 AM, gsub <af...@gmail.com> wrote:

>
> Hi Felix,
> thanks
> i am crystal clear what you said and wrote...after modify the script,
> removing the hard coded parameter... bt still not able do it
> successfully...
> :(
>
> i know am not carrying the previous value to next url and also fail to use
> the that value for follow up samplers.... why me jmeter :)
>
> logging off for today.. hoping if some 1 will provide me with the
> successfully running script....
>
> Regards
> GP
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2471897.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
>
>

Re: Recording of a script in jmeter

Posted by gsub <af...@gmail.com>.
Hi Felix, 
thanks 
i am crystal clear what you said and wrote...after modify the script,
removing the hard coded parameter... bt still not able do it successfully...
:( 

i know am not carrying the previous value to next url and also fail to use
the that value for follow up samplers.... why me jmeter :)

logging off for today.. hoping if some 1 will provide me with the
successfully running script....

Regards
GP


-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2471897.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


Re: Recording of a script in jmeter

Posted by Felix Frank <ff...@mpexnet.de>.
In that test plan, the third sampler has a parameter hardcoded:

/eOffice/LoginPage?x=AE57*WO4tVMWCVz7zb13q8aJmWaI102GJXPaXRBI0z3xzaL7iVyjpg

Instead, I assume that must be extracted per RegEx from the response to
the first Sampler.

Also, you extract ${myJessionid} in a sound way (I assume, have not run
it and will not), but you fail to use it in the followup samplers.

HTH,
Felix

On 08/11/10 15:11, gsub wrote:
> 
> HI Sander/all, 
> 
> i am not able to do it successfully, therefor i am attaching the script 
> http://jmeter.512774.n5.nabble.com/file/n2471842/SCRIPTS.rar SCRIPTS.rar
> gp..@gmail.com with log file. 
> 
> i know its not appropriate.. i request u all for the help, please try to run
> at ur pc and modify if required...
> i have done with opensta succesfully bt wanter to perform with jmeter coz of
> my love with this tool :)
> 
> pl pvide ur supprt if possible

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


Re: Recording of a script in jmeter

Posted by gsub <af...@gmail.com>.
HI Sander/all, 

i am not able to do it successfully, therefor i am attaching the script 
http://jmeter.512774.n5.nabble.com/file/n2471842/SCRIPTS.rar SCRIPTS.rar
gp..@gmail.com with log file. 

i know its not appropriate.. i request u all for the help, please try to run
at ur pc and modify if required...
i have done with opensta succesfully bt wanter to perform with jmeter coz of
my love with this tool :)

pl pvide ur supprt if possible

Regards
GP
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2471842.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


Re: Recording of a script in jmeter

Posted by sebb <se...@gmail.com>.
On 11 August 2010 13:39, SanderW <sa...@performancearchitecten.nl> wrote:
>
> Did you use the Regular Expression Extractor with expression like below?
> (Double quote and questionmark are special characters)

Double quote is not special in REs.

> \"fInbox\?x=(.+?)\"

So use:

"fInbox\?x=(.+?)"


> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2471808.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


Re: Recording of a script in jmeter

Posted by SanderW <sa...@performancearchitecten.nl>.
Did you use the Regular Expression Extractor with expression like below?
(Double quote and questionmark are special characters)

\"fInbox\?x=(.+?)\"
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2471808.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


Re: Recording of a script in jmeter

Posted by gsub <af...@gmail.com>.
Hi Sander, 

i do have cookie manager and it is not handling the request, that is y am
getting the response as attached herewith..
http://jmeter.512774.n5.nabble.com/file/n2471798/asd.htm asd.htm 

i am successfully gone ahead with login page.. 

but there is a another page after checking the check box, gives me some
dynamic value ....
"fInbox?x=Et0XeQD7Q7yygjCAid-bgmzYYG9LY2kGSAnDY3raZr-SMHffuXEynalv0N-xAsQ*"
with some dynamic value for their session getting failed there..

so how could i proceed further..

P.S I am successfully done this with OpenSTA, but i am doing with Jmeter coz
Jmeter can handles the uploading of docs as to my previous post my replies.

Regards
GP



-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2471798.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


Re: Recording of a script in jmeter

Posted by SanderW <sa...@performancearchitecten.nl>.
Hi gp,

Isn't the cookie manager handling the jsessionid's?

With Regular Expression you add a Regular Expression Extractor.
For your example this could be:
Refence Name: myJessionid
Regular Expression: jsessionid=(.+?)\) 
   NOTE: (.+?) will get all characters until it reaches the right boundery.
The right boundery in this case is a special character and must be escaped,
hence the \
Template: $1$
Match No.: 1
Default value: jsessionid not found

If you use multiple RegEx (like '(.+?)') and you want the second expression,
then change the Template to $2$

Hope this helps


-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2471767.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


Re: Recording of a script in jmeter

Posted by Felix Frank <ff...@mpexnet.de>.
On 08/11/10 13:36, Felix Frank wrote:
> href=".*?jsessionid=(w*)

Huh - there should have been a backslash in front of that w*.
Trying again: href=".*?jsessionid=(\w*)

It got lost somewhere along the way, apparently ;-)
If it displays now, it was a mere typo.

Cheers,
Felix

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


Re: Recording of a script in jmeter

Posted by Felix Frank <ff...@mpexnet.de>.
This is a simple argument in a URL. After your initial request, it is
bound to be in the server's response in many (if not all) href
parameters. Use a Regular Expression Extractor to look for e.g.
href=".*?jsessionid=(w*)
This should have a good chance at capturing your session ID, but you
will have to carefully tailor it to work with your server's responses.

Save the captured string in a variable and add the jsessionid parameter
to all following HTTP Samplers.

Also: Why does your app not use cookies for storing session IDs? Or if
it does, why don't you use the Cookie Manager?

HTH,
Felix

On 08/11/10 13:15, gsub wrote:
> 
> Hi Archna/ All,
> 
> I am also having the same application, with dinamically session id's after
> every page request.
> (like: /Page;jsessionid=5DC84B98270DBC6A50827059ED93C177) 
> i want to extract the same 32 digits. how can i do it.. 
> 
> did you come up with solution .
> 
> Any 1 can help me in this

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


RE: Recording of a script in jmeter

Posted by "Jain, Kapil" <ka...@logica.com>.
GP,

You need to capture dynamic value for session id's. 

To do this define a parameter under regular expression and use this
parameter for session id.

I hope this help you.

KJ

-----Original Message-----
From: gsub [mailto:affablepreet@gmail.com] 
Sent: 11 August 2010 12:15
To: jmeter-user@jakarta.apache.org
Subject: Re: Recording of a script in jmeter


Hi Archna/ All,

I am also having the same application, with dinamically session id's
after
every page request.
(like: /Page;jsessionid=5DC84B98270DBC6A50827059ED93C177) 
i want to extract the same 32 digits. how can i do it.. 

did you come up with solution .

Any 1 can help me in this

regards
gp
-- 
View this message in context:
http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp225
9329p2471746.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



Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu sch�tzen. /  Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



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


Re: Recording of a script in jmeter

Posted by gsub <af...@gmail.com>.
Hi Archna/ All,

I am also having the same application, with dinamically session id's after
every page request.
(like: /Page;jsessionid=5DC84B98270DBC6A50827059ED93C177) 
i want to extract the same 32 digits. how can i do it.. 

did you come up with solution .

Any 1 can help me in this

regards
gp
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2471746.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


Re: Recording of a script in jmeter

Posted by ankitR <ju...@yahoo.co.in>.
Please read my inline comments.

Hi,

Thanks a lot..................

I have recorded a script.

Now I want to  know about the regular expression. Suppose I have a
"viewstate=1335545456456asndjasdj" and I want to corelate it. It will be
done by regular extracter but how. Shall I rt click add regular extracter
just above of the step in which "viewstate" is coming, and then change the
value of viewstate with "viewstate=${viewstate}".


<<<<< You should add the regular expression extractor at the thread group
level. This will capture the "viewstate" (your example) value whenever it
comes.  >>>>>

How Cud I see the value of viewstate taken at runtime.Suppose first time I
run andviewstate =1234 and next time viewstate=4568  then how I come to know
which value it has taken I would like to view that value.

<<<< Add a Debug Sampler above the request for which you want to check the
viewstate value. It would also do you good to add a Debug sampler after the
request so that you can figure out if the value has changed or not.  refer
to - 
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Debug_Sampler
Debug Sampler  for more information.  >>>>>

Pl help me on this. 
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2262729.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


Re: Recording of a script in jmeter

Posted by ankitR <ju...@yahoo.co.in>.
Hi Archana,

Uncheck the automatically detect settings and the automatic configuration
scripts checkboxes.
If you would have noticed checking one of these overrides your manual
configuration.

For providing values at runtime you will have to use a Regular Expression
Extractor to extract the value into a
user-defined variable. Then replace all hardcoded refrences to this value
with the user defined variable. 
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Recording-of-a-script-in-jmeter-tp2259329p2262614.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