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 <deic...@gmail.com> wrote:
>
>> This looks more like a server/application issue rather than Jmeter.
>>
>> On Wed, 15 Sep 2021, 13:09 Troy Conner, <connert2...@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?
>>>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to