You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Dean Lozo <de...@gmail.com> on 2012/06/21 16:19:48 UTC

Inserting Cookie Data into URL. (I have googled and looked at guides, it looks correct but fails)

Hey

Note: This is my first time usign JMeter and I am a complete noob.

I have done large amount of googling and reading through documentation.
After looking at several tutorials, and trying different things they have
all failed. I might have forgotten something more basic.  It has been a
nightmare to use the re-cookie i receive in "Sampler Result" after logging
in. I am trying to do this by using the "HTTP URL Re-writing Modifier" and
"Cookie manager" feature that JMeter offers. I have enabled saving cookies
to true.

"JSESSIONID" keeps staying blank for some reason. Links to pictures can be
found below. I am at a loss, and would really love some help! That the URL
works at this point is irrelevant, I only wish to generate the correct URL.
If there is no time to help, I would greatly appreciate an XML file with
the functions working.

http://imgur.com/a/Qp13D


Cheers
Dean

Re: Inserting Cookie Data into URL. (I have googled and looked at guides, it looks correct but fails)

Posted by Shmuel Krakower <sh...@gmail.com>.
To be honest I have never used this Re-Writing Modifier.
What I would do is putting a regex Extractor (post processor) under the
login HTTP sampler - tell it to look for relevant data in the Response
Headers and save it into variable.
Than put this on the upload sampler of yours.

Look for this regex extractor in the online help pages / jmeter help.

Shmuel Krakower.

On Thu, Jun 21, 2012 at 5:19 PM, Dean Lozo <de...@gmail.com> wrote:

> Hey
>
> Note: This is my first time usign JMeter and I am a complete noob.
>
> I have done large amount of googling and reading through documentation.
> After looking at several tutorials, and trying different things they have
> all failed. I might have forgotten something more basic.  It has been a
> nightmare to use the re-cookie i receive in "Sampler Result" after logging
> in. I am trying to do this by using the "HTTP URL Re-writing Modifier" and
> "Cookie manager" feature that JMeter offers. I have enabled saving cookies
> to true.
>
> "JSESSIONID" keeps staying blank for some reason. Links to pictures can be
> found below. I am at a loss, and would really love some help! That the URL
> works at this point is irrelevant, I only wish to generate the correct URL.
> If there is no time to help, I would greatly appreciate an XML file with
> the functions working.
>
> http://imgur.com/a/Qp13D
>
>
> Cheers
> Dean
>

Re: Inserting Cookie Data into URL. (I have googled and looked at guides, it looks correct but fails)

Posted by Dean Lozo <de...@gmail.com>.
Thanks for the help guys!

I was referencing the value in the wrong location. In the re-write I was
supposed to use the  ${COOKIE_JSESSIONID in the re-write session argument
name.


On Thu, Jun 21, 2012 at 9:02 PM, Sergio Boso <se...@bosoconsulting.it>wrote:

> You may also try to disable the
>
> "check received cookies are valid"
>
> in jmeter.properties:
> CookieManager.check.cookies=**false
>
> I had a case when the cookies were handled properly by browsers,
> but they were discarded by Http client in Jmeter.
>
> regards
>
> Sergio
>
>
> Il 21/06/2012 18:04, Deepak Shetty ha scritto:
>
>  If your application is using cookies and you are using Cookie Manager ,
>> you
>> dont need to use HTTP URL rewriting modifier .
>> Ensure you have follow redirects , not redirect automatically on your
>> samplers
>> Also add a view results tree listener and check if you are getting the
>> Set-Cookie correctly (check that the domain / path being specified in
>> Set-Cookie matches the next request you are making)
>>
>> Its possible that your application only uses url-rewrites in which case
>> you
>> can drop the Cookie Manager and verify the modifier
>>
>> regards
>> deepak
>>
>>
>> On Thu, Jun 21, 2012 at 7:19 AM, Dean Lozo <de...@gmail.com> wrote:
>>
>>  Hey
>>>
>>> Note: This is my first time usign JMeter and I am a complete noob.
>>>
>>> I have done large amount of googling and reading through documentation.
>>> After looking at several tutorials, and trying different things they have
>>> all failed. I might have forgotten something more basic.  It has been a
>>> nightmare to use the re-cookie i receive in "Sampler Result" after
>>> logging
>>> in. I am trying to do this by using the "HTTP URL Re-writing Modifier"
>>> and
>>> "Cookie manager" feature that JMeter offers. I have enabled saving
>>> cookies
>>> to true.
>>>
>>> "JSESSIONID" keeps staying blank for some reason. Links to pictures can
>>> be
>>> found below. I am at a loss, and would really love some help! That the
>>> URL
>>> works at this point is irrelevant, I only wish to generate the correct
>>> URL.
>>> If there is no time to help, I would greatly appreciate an XML file with
>>> the functions working.
>>>
>>> http://imgur.com/a/Qp13D
>>>
>>>
>>> Cheers
>>> Dean
>>>
>>>
>
> --
>
>
> In caso di erronea ricezione da parte di persona diversa, siete pregati di
> eliminare il messaggio e i suoi allegati in modo definitivo dai vostri
> archivi e di volercelo comunicare immediatamente restituendoci il messaggio
> via e-mail al seguente indirizzosergio@**bosoconsulting.it<in...@bosoconsulting.it><mailto:
> sergioboso@yahoo.it>
> L’interessato può, inoltre, esercitare tutti i diritti di accesso sui
> propri dati previsti dal decreto 196/2003, tra i quali i diritti di
> rettifica, aggiornamento e cancellazione, inviando un messaggio all’
> indirizzo:sergio@**bosoconsulting.it<in...@bosoconsulting.it><mailto:
> sergioboso@yahoo.it>
>
>
>
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.**apache.org<us...@jmeter.apache.org>
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Inserting Cookie Data into URL. (I have googled and looked at guides, it looks correct but fails)

Posted by Sergio Boso <se...@bosoconsulting.it>.
You may also try to disable the

"check received cookies are valid"

in jmeter.properties:
CookieManager.check.cookies=false

I had a case when the cookies were handled properly by browsers,
but they were discarded by Http client in Jmeter.

regards

Sergio


Il 21/06/2012 18:04, Deepak Shetty ha scritto:
> If your application is using cookies and you are using Cookie Manager , you
> dont need to use HTTP URL rewriting modifier .
> Ensure you have follow redirects , not redirect automatically on your
> samplers
> Also add a view results tree listener and check if you are getting the
> Set-Cookie correctly (check that the domain / path being specified in
> Set-Cookie matches the next request you are making)
>
> Its possible that your application only uses url-rewrites in which case you
> can drop the Cookie Manager and verify the modifier
>
> regards
> deepak
>
>
> On Thu, Jun 21, 2012 at 7:19 AM, Dean Lozo <de...@gmail.com> wrote:
>
>> Hey
>>
>> Note: This is my first time usign JMeter and I am a complete noob.
>>
>> I have done large amount of googling and reading through documentation.
>> After looking at several tutorials, and trying different things they have
>> all failed. I might have forgotten something more basic.  It has been a
>> nightmare to use the re-cookie i receive in "Sampler Result" after logging
>> in. I am trying to do this by using the "HTTP URL Re-writing Modifier" and
>> "Cookie manager" feature that JMeter offers. I have enabled saving cookies
>> to true.
>>
>> "JSESSIONID" keeps staying blank for some reason. Links to pictures can be
>> found below. I am at a loss, and would really love some help! That the URL
>> works at this point is irrelevant, I only wish to generate the correct URL.
>> If there is no time to help, I would greatly appreciate an XML file with
>> the functions working.
>>
>> http://imgur.com/a/Qp13D
>>
>>
>> Cheers
>> Dean
>>


-- 


In caso di erronea ricezione da parte di persona diversa, siete pregati di eliminare il messaggio e i suoi allegati in modo 
definitivo dai vostri archivi e di volercelo comunicare immediatamente restituendoci il messaggio via e-mail al seguente 
indirizzosergio@bosoconsulting.it <ma...@yahoo.it>
L’interessato può, inoltre, esercitare tutti i diritti di accesso sui propri dati previsti dal decreto 196/2003, tra i quali i 
diritti di rettifica, aggiornamento e cancellazione, inviando un messaggio all’indirizzo:sergio@bosoconsulting.it 
<ma...@yahoo.it>





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


Re: Inserting Cookie Data into URL. (I have googled and looked at guides, it looks correct but fails)

Posted by Deepak Shetty <sh...@gmail.com>.
If your application is using cookies and you are using Cookie Manager , you
dont need to use HTTP URL rewriting modifier .
Ensure you have follow redirects , not redirect automatically on your
samplers
Also add a view results tree listener and check if you are getting the
Set-Cookie correctly (check that the domain / path being specified in
Set-Cookie matches the next request you are making)

Its possible that your application only uses url-rewrites in which case you
can drop the Cookie Manager and verify the modifier

regards
deepak


On Thu, Jun 21, 2012 at 7:19 AM, Dean Lozo <de...@gmail.com> wrote:

> Hey
>
> Note: This is my first time usign JMeter and I am a complete noob.
>
> I have done large amount of googling and reading through documentation.
> After looking at several tutorials, and trying different things they have
> all failed. I might have forgotten something more basic.  It has been a
> nightmare to use the re-cookie i receive in "Sampler Result" after logging
> in. I am trying to do this by using the "HTTP URL Re-writing Modifier" and
> "Cookie manager" feature that JMeter offers. I have enabled saving cookies
> to true.
>
> "JSESSIONID" keeps staying blank for some reason. Links to pictures can be
> found below. I am at a loss, and would really love some help! That the URL
> works at this point is irrelevant, I only wish to generate the correct URL.
> If there is no time to help, I would greatly appreciate an XML file with
> the functions working.
>
> http://imgur.com/a/Qp13D
>
>
> Cheers
> Dean
>

RE: Inserting Cookie Data into URL. (I have googled and looked at guides, it looks correct but fails)

Posted by "Robin D. Wilson" <rw...@gmail.com>.
Instead of 'JSESSIONID', to reference the cookie value, don't you need to use ${COOKIE_JSESSIONID}?

I think all of the cookies are supposed to be available throught the 'COOKIE_[cookie name]' syntax (by default - you can change the
prefix value in a properties file setting if you like).

--
Robin D. Wilson
Sr. Director of Web Development
KingsIsle Entertainment, Inc.
VOICE: 512-777-1861
www.KingsIsle.com

-----Original Message-----
From: Dean Lozo [mailto:dean.lozo@gmail.com] 
Sent: Thursday, June 21, 2012 9:20 AM
To: user@jmeter.apache.org
Subject: Inserting Cookie Data into URL. (I have googled and looked at guides, it looks correct but fails)

Hey

Note: This is my first time usign JMeter and I am a complete noob.

I have done large amount of googling and reading through documentation.
After looking at several tutorials, and trying different things they have
all failed. I might have forgotten something more basic.  It has been a
nightmare to use the re-cookie i receive in "Sampler Result" after logging
in. I am trying to do this by using the "HTTP URL Re-writing Modifier" and
"Cookie manager" feature that JMeter offers. I have enabled saving cookies
to true.

"JSESSIONID" keeps staying blank for some reason. Links to pictures can be
found below. I am at a loss, and would really love some help! That the URL
works at this point is irrelevant, I only wish to generate the correct URL.
If there is no time to help, I would greatly appreciate an XML file with
the functions working.

http://imgur.com/a/Qp13D


Cheers
Dean


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