You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jesse Zhang <yn...@yahoo.com.INVALID> on 2015/06/25 09:38:06 UTC

Can jmeter run the ajax request?

Hi,all.
Recently I use the jmeter record a website with actions of login.But when replaying the requests recorded,i find that the login is not correctly run,then many requests are redirected to the login page.The login request are with the header "X-Request-With:XMLHttpRequest",so i guess whether it's the problem.Can Jmeter run the ajax request or not?Does anyone has the same problems?And how can i fix it?
Thanks.

Jesse

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


Re: Can jmeter run the ajax request?

Posted by Pravesh Prajapati <pr...@gmail.com>.
Hi
Can you please use cookie manager and clear cache each time.
May this solve your problem.


On Thursday, June 25, 2015, Steve Howard <st...@gmail.com> wrote:

> In the past, I have used either Fiddler2 or WebSite pulse transaction
> recorded to get all requests submitted in the proper order.  As others have
> suggested, this is always due to missing variables or pages which are
> specific to the site you are testing.
>
> As mentioned, the two above (especially Fiddler2) have been flawless for us
> in reverse engineering page flow.  At that point, you may still have to
> parse form variables off of the page, as the Cookie Manager may not do
> everything (or anything) for you if the page is coded to push to the next
> step using something other than cookies.
>
> On Thu, Jun 25, 2015 at 5:31 AM, Jesse Zhang <yn...@yahoo.com.invalid>
> wrote:
>
> > Hi,
> > Initially encountering the login problem,i searched some solutions which
> > suggest me to add the
> > cookie manager.Then I added the cookie manager into the test plan,but it
> > doesnt work.The login action is still failed.It really make me
> > confused.Give me some advice please.
> > Thank u very much.
> >
> > Jesse
> >
> >
> >
> >
> >
> > On Thursday, June 25, 2015 4:41 PM, Adrian Speteanu <asp.adieu@gmail.com
> <javascript:;>>
> > wrote:
> > Hi,
> >
> > Jmeter doesn't run client side code out of the box. However, you can
> > properly implement all HTTP calls with it, regardless of how are they
> > composed in the browser.
> >
> > From my experience with login implementations, it's usually a header or
> > dynamically generated param or cookie that is not properly implemented in
> > the HTTP requests sent out by jmeter (given that you are already making
> all
> > the proper requests required by the login). Ajax web-rich pages do
> nothing
> > special, so in itself has, most probably, no bearing on the issue you've
> > encountered.
> >
> > Adrian S
> >
> >
> > On Thu, Jun 25, 2015 at 10:38 AM, Jesse Zhang <yn...@yahoo.com.invalid>
> > wrote:
> >
> > > Hi,all.
> > > Recently I use the jmeter record a website with actions of login.But
> when
> > > replaying the requests recorded,i find that the login is not correctly
> > > run,then many requests are redirected to the login page.The login
> request
> > > are with the header "X-Request-With:XMLHttpRequest",so i guess whether
> > it's
> > > the problem.Can Jmeter run the ajax request or not?Does anyone has the
> > same
> > > problems?And how can i fix it?
> > > Thanks.
> > >
> > > Jesse
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> <javascript:;>
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> <javascript:;>
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> <javascript:;>
> > For additional commands, e-mail: user-help@jmeter.apache.org
> <javascript:;>
> >
> >
>


-- 
Regards,
Pravesh prajapati.
Mob:-9702600170

Re: Can jmeter run the ajax request?

Posted by Steve Howard <st...@gmail.com>.
In the past, I have used either Fiddler2 or WebSite pulse transaction
recorded to get all requests submitted in the proper order.  As others have
suggested, this is always due to missing variables or pages which are
specific to the site you are testing.

As mentioned, the two above (especially Fiddler2) have been flawless for us
in reverse engineering page flow.  At that point, you may still have to
parse form variables off of the page, as the Cookie Manager may not do
everything (or anything) for you if the page is coded to push to the next
step using something other than cookies.

On Thu, Jun 25, 2015 at 5:31 AM, Jesse Zhang <yn...@yahoo.com.invalid>
wrote:

> Hi,
> Initially encountering the login problem,i searched some solutions which
> suggest me to add the
> cookie manager.Then I added the cookie manager into the test plan,but it
> doesnt work.The login action is still failed.It really make me
> confused.Give me some advice please.
> Thank u very much.
>
> Jesse
>
>
>
>
>
> On Thursday, June 25, 2015 4:41 PM, Adrian Speteanu <as...@gmail.com>
> wrote:
> Hi,
>
> Jmeter doesn't run client side code out of the box. However, you can
> properly implement all HTTP calls with it, regardless of how are they
> composed in the browser.
>
> From my experience with login implementations, it's usually a header or
> dynamically generated param or cookie that is not properly implemented in
> the HTTP requests sent out by jmeter (given that you are already making all
> the proper requests required by the login). Ajax web-rich pages do nothing
> special, so in itself has, most probably, no bearing on the issue you've
> encountered.
>
> Adrian S
>
>
> On Thu, Jun 25, 2015 at 10:38 AM, Jesse Zhang <yn...@yahoo.com.invalid>
> wrote:
>
> > Hi,all.
> > Recently I use the jmeter record a website with actions of login.But when
> > replaying the requests recorded,i find that the login is not correctly
> > run,then many requests are redirected to the login page.The login request
> > are with the header "X-Request-With:XMLHttpRequest",so i guess whether
> it's
> > the problem.Can Jmeter run the ajax request or not?Does anyone has the
> same
> > problems?And how can i fix it?
> > Thanks.
> >
> > Jesse
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Can jmeter run the ajax request?

Posted by Steven Swor <sw...@gmail.com>.
Hi,

It's probably some specific piece of data that's missing from the login
request. You can try to figure it out by capturing the requests and
responses in your browser's developer tools, but you're probably better off
getting some documentation about the specific login process you're testing,
to ensure you're submitting the requests properly.

-Steve

On Thu, Jun 25, 2015 at 7:31 PM, Jesse Zhang <yn...@yahoo.com.invalid>
wrote:

> Hi,
> Initially encountering the login problem,i searched some solutions which
> suggest me to add the
> cookie manager.Then I added the cookie manager into the test plan,but it
> doesnt work.The login action is still failed.It really make me
> confused.Give me some advice please.
> Thank u very much.
>
> Jesse
>
>
>
>
>
> On Thursday, June 25, 2015 4:41 PM, Adrian Speteanu <as...@gmail.com>
> wrote:
> Hi,
>
> Jmeter doesn't run client side code out of the box. However, you can
> properly implement all HTTP calls with it, regardless of how are they
> composed in the browser.
>
> From my experience with login implementations, it's usually a header or
> dynamically generated param or cookie that is not properly implemented in
> the HTTP requests sent out by jmeter (given that you are already making all
> the proper requests required by the login). Ajax web-rich pages do nothing
> special, so in itself has, most probably, no bearing on the issue you've
> encountered.
>
> Adrian S
>
>
> On Thu, Jun 25, 2015 at 10:38 AM, Jesse Zhang <yn...@yahoo.com.invalid>
> wrote:
>
> > Hi,all.
> > Recently I use the jmeter record a website with actions of login.But when
> > replaying the requests recorded,i find that the login is not correctly
> > run,then many requests are redirected to the login page.The login request
> > are with the header "X-Request-With:XMLHttpRequest",so i guess whether
> it's
> > the problem.Can Jmeter run the ajax request or not?Does anyone has the
> same
> > problems?And how can i fix it?
> > Thanks.
> >
> > Jesse
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Can jmeter run the ajax request?

Posted by Jesse Zhang <yn...@yahoo.com.INVALID>.
Hi,
Initially encountering the login problem,i searched some solutions which suggest me to add the 
cookie manager.Then I added the cookie manager into the test plan,but it doesnt work.The login action is still failed.It really make me confused.Give me some advice please.
Thank u very much.

Jesse





On Thursday, June 25, 2015 4:41 PM, Adrian Speteanu <as...@gmail.com> wrote:
Hi,

Jmeter doesn't run client side code out of the box. However, you can
properly implement all HTTP calls with it, regardless of how are they
composed in the browser.

>From my experience with login implementations, it's usually a header or
dynamically generated param or cookie that is not properly implemented in
the HTTP requests sent out by jmeter (given that you are already making all
the proper requests required by the login). Ajax web-rich pages do nothing
special, so in itself has, most probably, no bearing on the issue you've
encountered.

Adrian S


On Thu, Jun 25, 2015 at 10:38 AM, Jesse Zhang <yn...@yahoo.com.invalid>
wrote:

> Hi,all.
> Recently I use the jmeter record a website with actions of login.But when
> replaying the requests recorded,i find that the login is not correctly
> run,then many requests are redirected to the login page.The login request
> are with the header "X-Request-With:XMLHttpRequest",so i guess whether it's
> the problem.Can Jmeter run the ajax request or not?Does anyone has the same
> problems?And how can i fix it?
> Thanks.
>
> Jesse
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

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


Re: Can jmeter run the ajax request?

Posted by Adrian Speteanu <as...@gmail.com>.
Hi,

Jmeter doesn't run client side code out of the box. However, you can
properly implement all HTTP calls with it, regardless of how are they
composed in the browser.

>From my experience with login implementations, it's usually a header or
dynamically generated param or cookie that is not properly implemented in
the HTTP requests sent out by jmeter (given that you are already making all
the proper requests required by the login). Ajax web-rich pages do nothing
special, so in itself has, most probably, no bearing on the issue you've
encountered.

Adrian S

On Thu, Jun 25, 2015 at 10:38 AM, Jesse Zhang <yn...@yahoo.com.invalid>
wrote:

> Hi,all.
> Recently I use the jmeter record a website with actions of login.But when
> replaying the requests recorded,i find that the login is not correctly
> run,then many requests are redirected to the login page.The login request
> are with the header "X-Request-With:XMLHttpRequest",so i guess whether it's
> the problem.Can Jmeter run the ajax request or not?Does anyone has the same
> problems?And how can i fix it?
> Thanks.
>
> Jesse
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>