You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Alexandru Rotaru <al...@altom.ro> on 2009/08/13 18:19:47 UTC

Different Redirect Location in JMeter and HTTPFox

Hello,

I am trying to create a script for an asp.net application using  
JMeter, that adds an event. For adding an event I need to get through  
4-5 steps (pages), so I send 4-5 Post requests from JMeter.
Everything works fine for the first 3 Posts, but at the last one, the  
response is not redirected to the correct page, so the post is not  
performed.

I used HTTPFox Firefox add-on to monitor the website activity, and the  
Location fields from the response header have different values in  
JMeter and HTTPFox:
   - JMeter redirects to the posting page
Thread Name: RTA User 1-1
Sample Start: 2009-08-13 15:58:05 EEST
Load time: 245
Latency: 245
Size in bytes: 198
Sample Count: 1
Error Count: 0
Response code: 302
Response message: Found

Response headers:
HTTP/1.1 302 Found
Date: Thu, 13 Aug 2009 12:58:05 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Location: http://www.mysite.com/(jggwaa55sacshdektl0u4e45)/Setup/EventPreview.aspx
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 198

HTTPSampleResult fields:
ContentType: text/html; charset=utf-8
DataEncoding: utf-8

   - HTTPFox says the redirect is to the Thanks page ...

(Status-Line)	HTTP/1.1 302 Found
Date	Thu, 13 Aug 2009 15:30:04 GMT
Server	Microsoft-IIS/6.0
X-Powered-By	ASP.NET
X-AspNet-Version	1.1.4322
Location	/(jggwaa55sacshdektl0u4e45)/Setup/Thanks.aspx
Cache-Control	private
Content-Type	text/html; charset=utf-8
Content-Length	162

I tried to use both Redirect Automatically and Follow Redirects, but  
without any success.

I am new to JMeter, so I am thinking that maybe there's something that  
I'm missing...

Please let me know if you need any other info.

Thanks,
Alex

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


Re: Different Redirect Location in JMeter and HTTPFox

Posted by Alexandru Rotaru <al...@altom.ro>.
Hi Deepak,

Thanks for all the help.
Your suggestions made me verify everything once again and I was able  
to find the problem: spelling error :-$

Thanks a lot once again,
Alex

On Aug 13, 2009, at 9:46 PM, Deepak Shetty wrote:

> Hi
>> If I copy the HTML from the last POST that worked into a local file  
>> and set
> the redirection to point to the server (use absolute path, >instead of
> relative), then the event is added and the thanks page is returned.
>> Is this what you meant?
> Yep , so if its not working from jmeter , then you have to  
> compare(with what
> jmeter posted) and the values must match exactly. I typically  
> separate each
> parameter and check the values one by one and see whether theres  
> something
> missing/added. All the __VIEWSTATE etc all must match exactly  
> including
> their values.
>
> Im not sure why you are getting a 404, is the requested url correct  
> or does
> it really not exist on the server (in which case there is a bug in the
> application code)?
> regards
> deepak
>
> On Thu, Aug 13, 2009 at 11:41 AM, Alexandru Rotaru <alex.rotaru@altom.ro 
> >wrote:
>
>> The last post is changed in a post and a get because of the  
>> redirection (I
>> ticked Follow redirects in JMeter): the response for the post is  
>> 302 and
>> then the response for the get (JMeter is trying to get the page  
>> specified in
>> Location field) is 404 - Page not found - so the result for the  
>> sampler is
>> 404 - Page not found.
>>
>> I'm not sure I understand the part with copying the HTML code from  
>> JMeter
>> ...
>> If I copy the HTML from the last POST that worked into a local file  
>> and set
>> the redirection to point to the server (use absolute path, instead of
>> relative), then the event is added and the thanks page is returned.
>> Is this what you meant?
>>
>> Thanks a lot for the help,
>> Alex
>>
>>
>>
>> On Aug 13, 2009, at 7:59 PM, Deepak Shetty wrote:
>>
>> hi
>>> difficult to diagnose without access :). Id guess that the posted  
>>> data is
>>> not exactly the same (perhaps the values arent extracted completely)
>>> I'd probably run the test in jmeter, copy the HTML returned on the  
>>> page
>>> that
>>> is doing the posting into a html file. modify the form action to  
>>> point to
>>> my
>>> server and open that HTML in the browser and submit it while  
>>> recording the
>>> post on the browser. If this works then I'd compare the values and  
>>> it must
>>> match exactly the post in the next step in the JMeter.
>>>
>>> Im not sure I understand point c. Are you getting a page not found
>>> error?In
>>> your first mail it seemed to be a redirect to the posted page ,  
>>> which
>>> looks
>>> more like the server threw a validation error
>>> regards
>>> deepak
>>>
>>> On Thu, Aug 13, 2009 at 9:50 AM, Alexandru Rotaru <alex.rotaru@altom.ro
>>>> wrote:
>>>
>>> Hi Deepad,
>>>>
>>>> a. the posted data is the same (or so it seems to me...). The only
>>>> difference that I can see is in the message header.
>>>> it's true, I need to extract some hidden items values (eg.  
>>>> __VIEWSTATE),
>>>> but I take them from the answer of the previous post.
>>>> b. yes, all the previous message are correct. I use View Results  
>>>> Tree >
>>>> Response Data > Render HTML.
>>>> c. Yes, the results is
>>>>
>>>> Thread Name: RTA User 1-1
>>>> Sample Start: 2009-08-13 19:43:11 EEST
>>>> Load time: 494
>>>> Latency: 335
>>>> Size in bytes: 3238
>>>> Sample Count: 1
>>>> Error Count: 1
>>>> Response code: 404
>>>> Response message: Not Found
>>>>
>>>> Thanks,
>>>> Alex
>>>>
>>>>
>>>>
>>>> On Aug 13, 2009, at 7:35 PM, Deepak Shetty wrote:
>>>>
>>>> Hi
>>>>
>>>>> a. Whats the data getting posted , is it the same? is there some  
>>>>> data on
>>>>> the
>>>>> page that needs to be extracted or posted (or some hidden  
>>>>> variables
>>>>> etc)?
>>>>> b. Have you asserted all the previous responses and seen the  
>>>>> content is
>>>>> correct
>>>>> c. if you enabled view results tree and checked the response for  
>>>>> your
>>>>> failed
>>>>> request and checked out the html , is it showing you any error  
>>>>> message
>>>>> from
>>>>> the server?
>>>>>
>>>>> regards
>>>>> deepak
>>>>>
>>>>> On Thu, Aug 13, 2009 at 9:19 AM, Alexandru Rotaru <alex.rotaru@altom.ro
>>>>>
>>>>>> wrote:
>>>>>>
>>>>>
>>>>> Hello,
>>>>>
>>>>>>
>>>>>> I am trying to create a script for an asp.net application using
>>>>>> JMeter,
>>>>>> that adds an event. For adding an event I need to get through  
>>>>>> 4-5 steps
>>>>>> (pages), so I send 4-5 Post requests from JMeter.
>>>>>> Everything works fine for the first 3 Posts, but at the last  
>>>>>> one, the
>>>>>> response is not redirected to the correct page, so the post is  
>>>>>> not
>>>>>> performed.
>>>>>>
>>>>>> I used HTTPFox Firefox add-on to monitor the website activity,  
>>>>>> and the
>>>>>> Location fields from the response header have different values in
>>>>>> JMeter
>>>>>> and
>>>>>> HTTPFox:
>>>>>> - JMeter redirects to the posting page
>>>>>> Thread Name: RTA User 1-1
>>>>>> Sample Start: 2009-08-13 15:58:05 EEST
>>>>>> Load time: 245
>>>>>> Latency: 245
>>>>>> Size in bytes: 198
>>>>>> Sample Count: 1
>>>>>> Error Count: 0
>>>>>> Response code: 302
>>>>>> Response message: Found
>>>>>>
>>>>>> Response headers:
>>>>>> HTTP/1.1 302 Found
>>>>>> Date: Thu, 13 Aug 2009 12:58:05 GMT
>>>>>> Server: Microsoft-IIS/6.0
>>>>>> X-Powered-By: ASP.NET
>>>>>> X-AspNet-Version: 1.1.4322
>>>>>> Location:
>>>>>>
>>>>>> http://www.mysite.com/(jggwaa55sacshdektl0u4e45)/Setup/EventPreview.aspx 
>>>>>> <http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx 
>>>>>> >
>>>>>> <
>>>>>> http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx
>>>>>>>
>>>>>> <
>>>>>>
>>>>>> http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx
>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Cache-Control: private
>>>>>> Content-Type: text/html; charset=utf-8
>>>>>> Content-Length: 198
>>>>>>
>>>>>> HTTPSampleResult fields:
>>>>>> ContentType: text/html; charset=utf-8
>>>>>> DataEncoding: utf-8
>>>>>>
>>>>>> - HTTPFox says the redirect is to the Thanks page ...
>>>>>>
>>>>>> (Status-Line)   HTTP/1.1 302 Found
>>>>>> Date    Thu, 13 Aug 2009 15:30:04 GMT
>>>>>> Server  Microsoft-IIS/6.0
>>>>>> X-Powered-By    ASP.NET
>>>>>> X-AspNet-Version        1.1.4322
>>>>>> Location        /(jggwaa55sacshdektl0u4e45)/Setup/Thanks.aspx
>>>>>> Cache-Control   private
>>>>>> Content-Type    text/html; charset=utf-8
>>>>>> Content-Length  162
>>>>>>
>>>>>> I tried to use both Redirect Automatically and Follow  
>>>>>> Redirects, but
>>>>>> without any success.
>>>>>>
>>>>>> I am new to JMeter, so I am thinking that maybe there's  
>>>>>> something that
>>>>>> I'm
>>>>>> missing...
>>>>>>
>>>>>> Please let me know if you need any other info.
>>>>>>
>>>>>> Thanks,
>>>>>> Alex
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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: Different Redirect Location in JMeter and HTTPFox

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
>If I copy the HTML from the last POST that worked into a local file and set
the redirection to point to the server (use absolute path, >instead of
relative), then the event is added and the thanks page is returned.
>Is this what you meant?
Yep , so if its not working from jmeter , then you have to compare(with what
jmeter posted) and the values must match exactly. I typically separate each
parameter and check the values one by one and see whether theres something
missing/added. All the __VIEWSTATE etc all must match exactly including
their values.

Im not sure why you are getting a 404, is the requested url correct or does
it really not exist on the server (in which case there is a bug in the
application code)?
regards
deepak

On Thu, Aug 13, 2009 at 11:41 AM, Alexandru Rotaru <al...@altom.ro>wrote:

> The last post is changed in a post and a get because of the redirection (I
> ticked Follow redirects in JMeter): the response for the post is 302 and
> then the response for the get (JMeter is trying to get the page specified in
> Location field) is 404 - Page not found - so the result for the sampler is
> 404 - Page not found.
>
> I'm not sure I understand the part with copying the HTML code from JMeter
> ...
> If I copy the HTML from the last POST that worked into a local file and set
> the redirection to point to the server (use absolute path, instead of
> relative), then the event is added and the thanks page is returned.
> Is this what you meant?
>
> Thanks a lot for the help,
> Alex
>
>
>
> On Aug 13, 2009, at 7:59 PM, Deepak Shetty wrote:
>
>  hi
>> difficult to diagnose without access :). Id guess that the posted data is
>> not exactly the same (perhaps the values arent extracted completely)
>> I'd probably run the test in jmeter, copy the HTML returned on the page
>> that
>> is doing the posting into a html file. modify the form action to point to
>> my
>> server and open that HTML in the browser and submit it while recording the
>> post on the browser. If this works then I'd compare the values and it must
>> match exactly the post in the next step in the JMeter.
>>
>> Im not sure I understand point c. Are you getting a page not found
>> error?In
>> your first mail it seemed to be a redirect to the posted page , which
>> looks
>> more like the server threw a validation error
>> regards
>> deepak
>>
>> On Thu, Aug 13, 2009 at 9:50 AM, Alexandru Rotaru <alex.rotaru@altom.ro
>> >wrote:
>>
>>  Hi Deepad,
>>>
>>> a. the posted data is the same (or so it seems to me...). The only
>>> difference that I can see is in the message header.
>>>  it's true, I need to extract some hidden items values (eg. __VIEWSTATE),
>>> but I take them from the answer of the previous post.
>>> b. yes, all the previous message are correct. I use View Results Tree >
>>> Response Data > Render HTML.
>>> c. Yes, the results is
>>>
>>> Thread Name: RTA User 1-1
>>> Sample Start: 2009-08-13 19:43:11 EEST
>>> Load time: 494
>>> Latency: 335
>>> Size in bytes: 3238
>>> Sample Count: 1
>>> Error Count: 1
>>> Response code: 404
>>> Response message: Not Found
>>>
>>> Thanks,
>>> Alex
>>>
>>>
>>>
>>> On Aug 13, 2009, at 7:35 PM, Deepak Shetty wrote:
>>>
>>> Hi
>>>
>>>> a. Whats the data getting posted , is it the same? is there some data on
>>>> the
>>>> page that needs to be extracted or posted (or some hidden variables
>>>> etc)?
>>>> b. Have you asserted all the previous responses and seen the content is
>>>> correct
>>>> c. if you enabled view results tree and checked the response for your
>>>> failed
>>>> request and checked out the html , is it showing you any error message
>>>> from
>>>> the server?
>>>>
>>>> regards
>>>> deepak
>>>>
>>>> On Thu, Aug 13, 2009 at 9:19 AM, Alexandru Rotaru <alex.rotaru@altom.ro
>>>>
>>>>> wrote:
>>>>>
>>>>
>>>> Hello,
>>>>
>>>>>
>>>>> I am trying to create a script for an asp.net application using
>>>>> JMeter,
>>>>> that adds an event. For adding an event I need to get through 4-5 steps
>>>>> (pages), so I send 4-5 Post requests from JMeter.
>>>>> Everything works fine for the first 3 Posts, but at the last one, the
>>>>> response is not redirected to the correct page, so the post is not
>>>>> performed.
>>>>>
>>>>> I used HTTPFox Firefox add-on to monitor the website activity, and the
>>>>> Location fields from the response header have different values in
>>>>> JMeter
>>>>> and
>>>>> HTTPFox:
>>>>> - JMeter redirects to the posting page
>>>>> Thread Name: RTA User 1-1
>>>>> Sample Start: 2009-08-13 15:58:05 EEST
>>>>> Load time: 245
>>>>> Latency: 245
>>>>> Size in bytes: 198
>>>>> Sample Count: 1
>>>>> Error Count: 0
>>>>> Response code: 302
>>>>> Response message: Found
>>>>>
>>>>> Response headers:
>>>>> HTTP/1.1 302 Found
>>>>> Date: Thu, 13 Aug 2009 12:58:05 GMT
>>>>> Server: Microsoft-IIS/6.0
>>>>> X-Powered-By: ASP.NET
>>>>> X-AspNet-Version: 1.1.4322
>>>>> Location:
>>>>>
>>>>> http://www.mysite.com/(jggwaa55sacshdektl0u4e45)/Setup/EventPreview.aspx<http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx>
>>>>> <
>>>>> http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx
>>>>> >
>>>>> <
>>>>>
>>>>> http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx
>>>>>
>>>>>>
>>>>>>
>>>>> Cache-Control: private
>>>>> Content-Type: text/html; charset=utf-8
>>>>> Content-Length: 198
>>>>>
>>>>> HTTPSampleResult fields:
>>>>> ContentType: text/html; charset=utf-8
>>>>> DataEncoding: utf-8
>>>>>
>>>>> - HTTPFox says the redirect is to the Thanks page ...
>>>>>
>>>>> (Status-Line)   HTTP/1.1 302 Found
>>>>> Date    Thu, 13 Aug 2009 15:30:04 GMT
>>>>> Server  Microsoft-IIS/6.0
>>>>> X-Powered-By    ASP.NET
>>>>> X-AspNet-Version        1.1.4322
>>>>> Location        /(jggwaa55sacshdektl0u4e45)/Setup/Thanks.aspx
>>>>> Cache-Control   private
>>>>> Content-Type    text/html; charset=utf-8
>>>>> Content-Length  162
>>>>>
>>>>> I tried to use both Redirect Automatically and Follow Redirects, but
>>>>> without any success.
>>>>>
>>>>> I am new to JMeter, so I am thinking that maybe there's something that
>>>>> I'm
>>>>> missing...
>>>>>
>>>>> Please let me know if you need any other info.
>>>>>
>>>>> Thanks,
>>>>> Alex
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>>>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>

Re: Different Redirect Location in JMeter and HTTPFox

Posted by Alexandru Rotaru <al...@altom.ro>.
The last post is changed in a post and a get because of the  
redirection (I ticked Follow redirects in JMeter): the response for  
the post is 302 and then the response for the get (JMeter is trying to  
get the page specified in Location field) is 404 - Page not found - so  
the result for the sampler is 404 - Page not found.

I'm not sure I understand the part with copying the HTML code from  
JMeter ...
If I copy the HTML from the last POST that worked into a local file  
and set the redirection to point to the server (use absolute path,  
instead of relative), then the event is added and the thanks page is  
returned.
Is this what you meant?

Thanks a lot for the help,
Alex


On Aug 13, 2009, at 7:59 PM, Deepak Shetty wrote:

> hi
> difficult to diagnose without access :). Id guess that the posted  
> data is
> not exactly the same (perhaps the values arent extracted completely)
> I'd probably run the test in jmeter, copy the HTML returned on the  
> page that
> is doing the posting into a html file. modify the form action to  
> point to my
> server and open that HTML in the browser and submit it while  
> recording the
> post on the browser. If this works then I'd compare the values and  
> it must
> match exactly the post in the next step in the JMeter.
>
> Im not sure I understand point c. Are you getting a page not found  
> error?In
> your first mail it seemed to be a redirect to the posted page ,  
> which looks
> more like the server threw a validation error
> regards
> deepak
>
> On Thu, Aug 13, 2009 at 9:50 AM, Alexandru Rotaru <alex.rotaru@altom.ro 
> >wrote:
>
>> Hi Deepad,
>>
>> a. the posted data is the same (or so it seems to me...). The only
>> difference that I can see is in the message header.
>>   it's true, I need to extract some hidden items values (eg.  
>> __VIEWSTATE),
>> but I take them from the answer of the previous post.
>> b. yes, all the previous message are correct. I use View Results  
>> Tree >
>> Response Data > Render HTML.
>> c. Yes, the results is
>>
>> Thread Name: RTA User 1-1
>> Sample Start: 2009-08-13 19:43:11 EEST
>> Load time: 494
>> Latency: 335
>> Size in bytes: 3238
>> Sample Count: 1
>> Error Count: 1
>> Response code: 404
>> Response message: Not Found
>>
>> Thanks,
>> Alex
>>
>>
>>
>> On Aug 13, 2009, at 7:35 PM, Deepak Shetty wrote:
>>
>> Hi
>>> a. Whats the data getting posted , is it the same? is there some  
>>> data on
>>> the
>>> page that needs to be extracted or posted (or some hidden  
>>> variables etc)?
>>> b. Have you asserted all the previous responses and seen the  
>>> content is
>>> correct
>>> c. if you enabled view results tree and checked the response for  
>>> your
>>> failed
>>> request and checked out the html , is it showing you any error  
>>> message
>>> from
>>> the server?
>>>
>>> regards
>>> deepak
>>>
>>> On Thu, Aug 13, 2009 at 9:19 AM, Alexandru Rotaru <alex.rotaru@altom.ro
>>>> wrote:
>>>
>>> Hello,
>>>>
>>>> I am trying to create a script for an asp.net application using  
>>>> JMeter,
>>>> that adds an event. For adding an event I need to get through 4-5  
>>>> steps
>>>> (pages), so I send 4-5 Post requests from JMeter.
>>>> Everything works fine for the first 3 Posts, but at the last one,  
>>>> the
>>>> response is not redirected to the correct page, so the post is not
>>>> performed.
>>>>
>>>> I used HTTPFox Firefox add-on to monitor the website activity,  
>>>> and the
>>>> Location fields from the response header have different values in  
>>>> JMeter
>>>> and
>>>> HTTPFox:
>>>> - JMeter redirects to the posting page
>>>> Thread Name: RTA User 1-1
>>>> Sample Start: 2009-08-13 15:58:05 EEST
>>>> Load time: 245
>>>> Latency: 245
>>>> Size in bytes: 198
>>>> Sample Count: 1
>>>> Error Count: 0
>>>> Response code: 302
>>>> Response message: Found
>>>>
>>>> Response headers:
>>>> HTTP/1.1 302 Found
>>>> Date: Thu, 13 Aug 2009 12:58:05 GMT
>>>> Server: Microsoft-IIS/6.0
>>>> X-Powered-By: ASP.NET
>>>> X-AspNet-Version: 1.1.4322
>>>> Location:
>>>> http://www.mysite.com/(jggwaa55sacshdektl0u4e45)/Setup/EventPreview.aspx 
>>>> <http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx 
>>>> >
>>>> <
>>>> http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx
>>>>>
>>>>
>>>> Cache-Control: private
>>>> Content-Type: text/html; charset=utf-8
>>>> Content-Length: 198
>>>>
>>>> HTTPSampleResult fields:
>>>> ContentType: text/html; charset=utf-8
>>>> DataEncoding: utf-8
>>>>
>>>> - HTTPFox says the redirect is to the Thanks page ...
>>>>
>>>> (Status-Line)   HTTP/1.1 302 Found
>>>> Date    Thu, 13 Aug 2009 15:30:04 GMT
>>>> Server  Microsoft-IIS/6.0
>>>> X-Powered-By    ASP.NET
>>>> X-AspNet-Version        1.1.4322
>>>> Location        /(jggwaa55sacshdektl0u4e45)/Setup/Thanks.aspx
>>>> Cache-Control   private
>>>> Content-Type    text/html; charset=utf-8
>>>> Content-Length  162
>>>>
>>>> I tried to use both Redirect Automatically and Follow Redirects,  
>>>> but
>>>> without any success.
>>>>
>>>> I am new to JMeter, so I am thinking that maybe there's something  
>>>> that
>>>> I'm
>>>> missing...
>>>>
>>>> Please let me know if you need any other info.
>>>>
>>>> Thanks,
>>>> Alex
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: jmeter-user- 
>>>> help@jakarta.apache.org
>>>>
>>>>
>>>>
>>


Re: Different Redirect Location in JMeter and HTTPFox

Posted by Deepak Shetty <sh...@gmail.com>.
hi
difficult to diagnose without access :). Id guess that the posted data is
not exactly the same (perhaps the values arent extracted completely)
I'd probably run the test in jmeter, copy the HTML returned on the page that
is doing the posting into a html file. modify the form action to point to my
server and open that HTML in the browser and submit it while recording the
post on the browser. If this works then I'd compare the values and it must
match exactly the post in the next step in the JMeter.

Im not sure I understand point c. Are you getting a page not found error?In
your first mail it seemed to be a redirect to the posted page , which looks
more like the server threw a validation error
regards
deepak

On Thu, Aug 13, 2009 at 9:50 AM, Alexandru Rotaru <al...@altom.ro>wrote:

> Hi Deepad,
>
> a. the posted data is the same (or so it seems to me...). The only
> difference that I can see is in the message header.
>    it's true, I need to extract some hidden items values (eg. __VIEWSTATE),
> but I take them from the answer of the previous post.
> b. yes, all the previous message are correct. I use View Results Tree >
> Response Data > Render HTML.
> c. Yes, the results is
>
> Thread Name: RTA User 1-1
> Sample Start: 2009-08-13 19:43:11 EEST
> Load time: 494
> Latency: 335
> Size in bytes: 3238
> Sample Count: 1
> Error Count: 1
> Response code: 404
> Response message: Not Found
>
> Thanks,
> Alex
>
>
>
> On Aug 13, 2009, at 7:35 PM, Deepak Shetty wrote:
>
>  Hi
>> a. Whats the data getting posted , is it the same? is there some data on
>> the
>> page that needs to be extracted or posted (or some hidden variables etc)?
>> b. Have you asserted all the previous responses and seen the content is
>> correct
>> c. if you enabled view results tree and checked the response for your
>> failed
>> request and checked out the html , is it showing you any error message
>> from
>> the server?
>>
>> regards
>> deepak
>>
>> On Thu, Aug 13, 2009 at 9:19 AM, Alexandru Rotaru <alex.rotaru@altom.ro
>> >wrote:
>>
>>  Hello,
>>>
>>> I am trying to create a script for an asp.net application using JMeter,
>>> that adds an event. For adding an event I need to get through 4-5 steps
>>> (pages), so I send 4-5 Post requests from JMeter.
>>> Everything works fine for the first 3 Posts, but at the last one, the
>>> response is not redirected to the correct page, so the post is not
>>> performed.
>>>
>>> I used HTTPFox Firefox add-on to monitor the website activity, and the
>>> Location fields from the response header have different values in JMeter
>>> and
>>> HTTPFox:
>>> - JMeter redirects to the posting page
>>> Thread Name: RTA User 1-1
>>> Sample Start: 2009-08-13 15:58:05 EEST
>>> Load time: 245
>>> Latency: 245
>>> Size in bytes: 198
>>> Sample Count: 1
>>> Error Count: 0
>>> Response code: 302
>>> Response message: Found
>>>
>>> Response headers:
>>> HTTP/1.1 302 Found
>>> Date: Thu, 13 Aug 2009 12:58:05 GMT
>>> Server: Microsoft-IIS/6.0
>>> X-Powered-By: ASP.NET
>>> X-AspNet-Version: 1.1.4322
>>> Location:
>>> http://www.mysite.com/(jggwaa55sacshdektl0u4e45)/Setup/EventPreview.aspx<http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx>
>>> <
>>> http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx
>>> >
>>>
>>> Cache-Control: private
>>> Content-Type: text/html; charset=utf-8
>>> Content-Length: 198
>>>
>>> HTTPSampleResult fields:
>>> ContentType: text/html; charset=utf-8
>>> DataEncoding: utf-8
>>>
>>> - HTTPFox says the redirect is to the Thanks page ...
>>>
>>> (Status-Line)   HTTP/1.1 302 Found
>>> Date    Thu, 13 Aug 2009 15:30:04 GMT
>>> Server  Microsoft-IIS/6.0
>>> X-Powered-By    ASP.NET
>>> X-AspNet-Version        1.1.4322
>>> Location        /(jggwaa55sacshdektl0u4e45)/Setup/Thanks.aspx
>>> Cache-Control   private
>>> Content-Type    text/html; charset=utf-8
>>> Content-Length  162
>>>
>>> I tried to use both Redirect Automatically and Follow Redirects, but
>>> without any success.
>>>
>>> I am new to JMeter, so I am thinking that maybe there's something that
>>> I'm
>>> missing...
>>>
>>> Please let me know if you need any other info.
>>>
>>> Thanks,
>>> Alex
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>>
>>>
>>>
>

Re: Using the regex extractor values as http headers -- GOT IT !!

Posted by sidd darko <si...@gmail.com>.
hi ..

I needed to check TRUE on the User Parameters, update once per iteration.


sidd darko wrote:
> Hi.
> 
> I am trying to capture a parameter to my samplers and use it as a
> value in the HTTP Header Manager.
> 
> I have a User Parameter that uses a bean shell script.  The beanshell
> script sets the variable GUID to a random number.  I have two samplers 
> and I only see my value set for the second sample.  My layout looks like 
> this:
> 
> UserParameters -- calls the script, which sets the variable GUID.
> MyThreadGroup
> --- {$GUID}-MySample1         (GUID is always set)
> ------HTTP Header Manager    (GUID is Never Set)
> --- {$GUID}-MySample2         (GUID is always set)
> ------HTTP Header Manager    (GUID is only set when both are enabled)
> 
> 
> Does anyone have any insight as to what might be going on ?  Alternative 
> approaches are welcome.
> 
> Thanks,
> --sidd.
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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: Using the regex extractor values as http headers -- GOT IT !!

Posted by sidd darko <si...@gmail.com>.
hi ..

I needed to check TRUE on the User Parameters, update once per iteration.


sidd darko wrote:
> Hi.
> 
> I am trying to capture a parameter to my samplers and use it as a
> value in the HTTP Header Manager.
> 
> I have a User Parameter that uses a bean shell script.  The beanshell
> script sets the variable GUID to a random number.  I have two samplers 
> and I only see my value set for the second sample.  My layout looks like 
> this:
> 
> UserParameters -- calls the script, which sets the variable GUID.
> MyThreadGroup
> --- {$GUID}-MySample1         (GUID is always set)
> ------HTTP Header Manager    (GUID is Never Set)
> --- {$GUID}-MySample2         (GUID is always set)
> ------HTTP Header Manager    (GUID is only set when both are enabled)
> 
> 
> Does anyone have any insight as to what might be going on ?  Alternative 
> approaches are welcome.
> 
> Thanks,
> --sidd.
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Using the regex extractor values as http headers

Posted by sidd darko <si...@gmail.com>.
Hi.

I am trying to capture a parameter to my samplers and use it as a
value in the HTTP Header Manager.

I have a User Parameter that uses a bean shell script.  The beanshell
script sets the variable GUID to a random number.  I have two samplers 
and I only see my value set for the second sample.  My layout looks like 
this:

UserParameters -- calls the script, which sets the variable GUID.
MyThreadGroup
--- {$GUID}-MySample1         (GUID is always set)
------HTTP Header Manager    (GUID is Never Set)
--- {$GUID}-MySample2         (GUID is always set)
------HTTP Header Manager    (GUID is only set when both are enabled)


Does anyone have any insight as to what might be going on ?  Alternative 
approaches are welcome.

Thanks,
--sidd.







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


Re: Different Redirect Location in JMeter and HTTPFox

Posted by Alexandru Rotaru <al...@altom.ro>.
Hi Deepad,

a. the posted data is the same (or so it seems to me...). The only  
difference that I can see is in the message header.
     it's true, I need to extract some hidden items values (eg.  
__VIEWSTATE), but I take them from the answer of the previous post.
b. yes, all the previous message are correct. I use View Results Tree  
 > Response Data > Render HTML.
c. Yes, the results is

Thread Name: RTA User 1-1
Sample Start: 2009-08-13 19:43:11 EEST
Load time: 494
Latency: 335
Size in bytes: 3238
Sample Count: 1
Error Count: 1
Response code: 404
Response message: Not Found

Thanks,
Alex


On Aug 13, 2009, at 7:35 PM, Deepak Shetty wrote:

> Hi
> a. Whats the data getting posted , is it the same? is there some  
> data on the
> page that needs to be extracted or posted (or some hidden variables  
> etc)?
> b. Have you asserted all the previous responses and seen the content  
> is
> correct
> c. if you enabled view results tree and checked the response for  
> your failed
> request and checked out the html , is it showing you any error  
> message from
> the server?
>
> regards
> deepak
>
> On Thu, Aug 13, 2009 at 9:19 AM, Alexandru Rotaru <alex.rotaru@altom.ro 
> >wrote:
>
>> Hello,
>>
>> I am trying to create a script for an asp.net application using  
>> JMeter,
>> that adds an event. For adding an event I need to get through 4-5  
>> steps
>> (pages), so I send 4-5 Post requests from JMeter.
>> Everything works fine for the first 3 Posts, but at the last one, the
>> response is not redirected to the correct page, so the post is not
>> performed.
>>
>> I used HTTPFox Firefox add-on to monitor the website activity, and  
>> the
>> Location fields from the response header have different values in  
>> JMeter and
>> HTTPFox:
>> - JMeter redirects to the posting page
>> Thread Name: RTA User 1-1
>> Sample Start: 2009-08-13 15:58:05 EEST
>> Load time: 245
>> Latency: 245
>> Size in bytes: 198
>> Sample Count: 1
>> Error Count: 0
>> Response code: 302
>> Response message: Found
>>
>> Response headers:
>> HTTP/1.1 302 Found
>> Date: Thu, 13 Aug 2009 12:58:05 GMT
>> Server: Microsoft-IIS/6.0
>> X-Powered-By: ASP.NET
>> X-AspNet-Version: 1.1.4322
>> Location:
>> http://www.mysite.com/(jggwaa55sacshdektl0u4e45)/Setup/EventPreview.aspx 
>> <http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx 
>> >
>> Cache-Control: private
>> Content-Type: text/html; charset=utf-8
>> Content-Length: 198
>>
>> HTTPSampleResult fields:
>> ContentType: text/html; charset=utf-8
>> DataEncoding: utf-8
>>
>> - HTTPFox says the redirect is to the Thanks page ...
>>
>> (Status-Line)   HTTP/1.1 302 Found
>> Date    Thu, 13 Aug 2009 15:30:04 GMT
>> Server  Microsoft-IIS/6.0
>> X-Powered-By    ASP.NET
>> X-AspNet-Version        1.1.4322
>> Location        /(jggwaa55sacshdektl0u4e45)/Setup/Thanks.aspx
>> Cache-Control   private
>> Content-Type    text/html; charset=utf-8
>> Content-Length  162
>>
>> I tried to use both Redirect Automatically and Follow Redirects, but
>> without any success.
>>
>> I am new to JMeter, so I am thinking that maybe there's something  
>> that I'm
>> missing...
>>
>> Please let me know if you need any other info.
>>
>> Thanks,
>> Alex
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>


Re: Different Redirect Location in JMeter and HTTPFox

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
a. Whats the data getting posted , is it the same? is there some data on the
page that needs to be extracted or posted (or some hidden variables etc)?
b. Have you asserted all the previous responses and seen the content is
correct
c. if you enabled view results tree and checked the response for your failed
request and checked out the html , is it showing you any error message from
the server?

regards
deepak

On Thu, Aug 13, 2009 at 9:19 AM, Alexandru Rotaru <al...@altom.ro>wrote:

> Hello,
>
> I am trying to create a script for an asp.net application using JMeter,
> that adds an event. For adding an event I need to get through 4-5 steps
> (pages), so I send 4-5 Post requests from JMeter.
> Everything works fine for the first 3 Posts, but at the last one, the
> response is not redirected to the correct page, so the post is not
> performed.
>
> I used HTTPFox Firefox add-on to monitor the website activity, and the
> Location fields from the response header have different values in JMeter and
> HTTPFox:
>  - JMeter redirects to the posting page
> Thread Name: RTA User 1-1
> Sample Start: 2009-08-13 15:58:05 EEST
> Load time: 245
> Latency: 245
> Size in bytes: 198
> Sample Count: 1
> Error Count: 0
> Response code: 302
> Response message: Found
>
> Response headers:
> HTTP/1.1 302 Found
> Date: Thu, 13 Aug 2009 12:58:05 GMT
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> X-AspNet-Version: 1.1.4322
> Location:
> http://www.mysite.com/(jggwaa55sacshdektl0u4e45)/Setup/EventPreview.aspx<http://www.mysite.com/%28jggwaa55sacshdektl0u4e45%29/Setup/EventPreview.aspx>
> Cache-Control: private
> Content-Type: text/html; charset=utf-8
> Content-Length: 198
>
> HTTPSampleResult fields:
> ContentType: text/html; charset=utf-8
> DataEncoding: utf-8
>
>  - HTTPFox says the redirect is to the Thanks page ...
>
> (Status-Line)   HTTP/1.1 302 Found
> Date    Thu, 13 Aug 2009 15:30:04 GMT
> Server  Microsoft-IIS/6.0
> X-Powered-By    ASP.NET
> X-AspNet-Version        1.1.4322
> Location        /(jggwaa55sacshdektl0u4e45)/Setup/Thanks.aspx
> Cache-Control   private
> Content-Type    text/html; charset=utf-8
> Content-Length  162
>
> I tried to use both Redirect Automatically and Follow Redirects, but
> without any success.
>
> I am new to JMeter, so I am thinking that maybe there's something that I'm
> missing...
>
> Please let me know if you need any other info.
>
> Thanks,
> Alex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>