You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Troy Conner <co...@gmail.com> on 2021/09/15 07:38:23 UTC

Ajax session timeout in JMeter

I'm having trouble with AJAX sampler. When I run my test script the result
for all ajax calls is "your session has expired". How do I get these ajax
calls to work?

Re: Ajax session timeout in JMeter

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 15.09.21 um 20:39 schrieb Troy Conner:
> this is the message I'm seeing

The list tends to strip of attachments. Your image has not made it
through. Either try to resend it with another method/type, post a link
to some online image, or paste the information as text.

Felix

>
>
>
>
> On Wed, Sep 15, 2021 at 7:40 AM Troy Conner <co...@gmail.com> wrote:
>
>> From what I'm reading JMeter can't simulate AJAX requests (see link
>> below). However, there's a workaround. Most of what I've been reading is
>> from years ago. Unless, later versions of jmeter can run ajax?
>>
>>
>> https://stackoverflow.com/questions/41423360/how-to-execute-ajax-requests-in-jmeter
>>
>> On Wed, Sep 15, 2021 at 5:10 AM Deepak Goel <de...@gmail.com> wrote:
>>
>>> This looks more like a server/application issue rather than Jmeter.
>>>
>>> On Wed, 15 Sep 2021, 13:09 Troy Conner, <co...@gmail.com> wrote:
>>>
>>>> I'm having trouble with AJAX sampler. When I run my test script the
>>> result
>>>> for all ajax calls is "your session has expired". How do I get these
>>> ajax
>>>> calls to work?
>>>>


Re: Ajax session timeout in JMeter

Posted by Troy Conner <co...@gmail.com>.
this is the message I'm seeing




On Wed, Sep 15, 2021 at 7:40 AM Troy Conner <co...@gmail.com> wrote:

> From what I'm reading JMeter can't simulate AJAX requests (see link
> below). However, there's a workaround. Most of what I've been reading is
> from years ago. Unless, later versions of jmeter can run ajax?
>
>
> https://stackoverflow.com/questions/41423360/how-to-execute-ajax-requests-in-jmeter
>
> On Wed, Sep 15, 2021 at 5:10 AM Deepak Goel <de...@gmail.com> wrote:
>
>> This looks more like a server/application issue rather than Jmeter.
>>
>> On Wed, 15 Sep 2021, 13:09 Troy Conner, <co...@gmail.com> wrote:
>>
>> > I'm having trouble with AJAX sampler. When I run my test script the
>> result
>> > for all ajax calls is "your session has expired". How do I get these
>> ajax
>> > calls to work?
>> >
>>
>

Re: Ajax session timeout in JMeter

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 15.09.21 um 16:40 schrieb Troy Conner:
> From what I'm reading JMeter can't simulate AJAX requests (see link below).
> However, there's a workaround. Most of what I've been reading is from years
> ago. Unless, later versions of jmeter can run ajax?
>
> https://stackoverflow.com/questions/41423360/how-to-execute-ajax-requests-in-jmeter

That depends on how you define ajax requests :)

JMeter is not a browser and will not interpret the javascript on the
pages it requests. But you can simulate the browser calling a ajax
request by setting the correct headers and body.

I think this question is about setting the correct headers and possibly
the correct data inside the body. To help, it would be great, if the OP
would post some more detail on what he has tried and what the responses
of the server to those experiments where.

To debug such issues, I always add  View Results Tree (Add Listener ->
View Results Tree, or Ctrl-9) and let the test run once. In the View
Results Tree you should be able to find the requests ("ajax" and
non-"ajax"). I would first take a look at the headers of the request and
see, if the cookies, cross-origin and other headers are set correctly
(by comparing them to the headers captured in a web developer console in
your favourit browser).

If you can't interpret these headers yourself, it might help to post
them here together with the test plan used.

Felix

>
> On Wed, Sep 15, 2021 at 5:10 AM Deepak Goel <de...@gmail.com> wrote:
>
>> This looks more like a server/application issue rather than Jmeter.
>>
>> On Wed, 15 Sep 2021, 13:09 Troy Conner, <co...@gmail.com> wrote:
>>
>>> I'm having trouble with AJAX sampler. When I run my test script the
>> result
>>> for all ajax calls is "your session has expired". How do I get these ajax
>>> calls to work?
>>>


Re: Ajax session timeout in JMeter

Posted by Troy Conner <co...@gmail.com>.
From what I'm reading JMeter can't simulate AJAX requests (see link below).
However, there's a workaround. Most of what I've been reading is from years
ago. Unless, later versions of jmeter can run ajax?

https://stackoverflow.com/questions/41423360/how-to-execute-ajax-requests-in-jmeter

On Wed, Sep 15, 2021 at 5:10 AM Deepak Goel <de...@gmail.com> wrote:

> This looks more like a server/application issue rather than Jmeter.
>
> On Wed, 15 Sep 2021, 13:09 Troy Conner, <co...@gmail.com> wrote:
>
> > I'm having trouble with AJAX sampler. When I run my test script the
> result
> > for all ajax calls is "your session has expired". How do I get these ajax
> > calls to work?
> >
>

Re: Ajax session timeout in JMeter

Posted by Deepak Goel <de...@gmail.com>.
I never said about whether someone can post or not in this forum. I was
talking about the problem. Based on the data given, it looks more to me a
issue with the server rather than jmeter.

:-)


On Wed, 15 Sep 2021, 20:45 Felix Schumacher, <
felix.schumacher@internetallee.de> wrote:

>
> Am 15.09.21 um 14:09 schrieb Deepak Goel:
> > This looks more like a server/application issue rather than Jmeter.
>
> I think it is about the usage of JMeter and thus well suited for a
> question to user@ :)
>
> Felix
>
> >
> > On Wed, 15 Sep 2021, 13:09 Troy Conner, <co...@gmail.com> wrote:
> >
> >> I'm having trouble with AJAX sampler. When I run my test script the
> result
> >> for all ajax calls is "your session has expired". How do I get these
> ajax
> >> calls to work?
> >>
>
>
>

Re: Ajax session timeout in JMeter

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 15.09.21 um 14:09 schrieb Deepak Goel:
> This looks more like a server/application issue rather than Jmeter.

I think it is about the usage of JMeter and thus well suited for a
question to user@ :)

Felix

>
> On Wed, 15 Sep 2021, 13:09 Troy Conner, <co...@gmail.com> wrote:
>
>> I'm having trouble with AJAX sampler. When I run my test script the result
>> for all ajax calls is "your session has expired". How do I get these ajax
>> calls to work?
>>


Re: Ajax session timeout in JMeter

Posted by Deepak Goel <de...@gmail.com>.
This looks more like a server/application issue rather than Jmeter.

On Wed, 15 Sep 2021, 13:09 Troy Conner, <co...@gmail.com> wrote:

> I'm having trouble with AJAX sampler. When I run my test script the result
> for all ajax calls is "your session has expired". How do I get these ajax
> calls to work?
>