通过JMeter的AJAX性能测试要求 [英] Performance Testing of AJAX calls via JMeter

查看:1686
本文介绍了通过JMeter的AJAX性能测试要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做性能测试具有AJAX调用的应用程序。我能够记录相同的请求,但无法执行。任何人都请帮我在执行AJAX请求。

I am doing performance testing for an application having AJAX calls. I am able to record the same requests but unable to execute them. Anyone please help me in executing the AJAX requests.

我是否需要使用任何额外的插件呢?如果是的话,它们是什么以及如何使用它们。

Do I need to use any extra plugin for this? If yes, what are they and how to use them.

推荐答案

我不知道有任何现有的插件,它能够处理Ajax调用。技术上AJAX请求是基本的HTTP请求,但他们需要在并行使用每调用一个额外的线程中执行。

I'm not aware of any existing plugins which are capable of handling AJAX calls. Technically AJAX requests are basic HTTP Requests but they need to be executed in parallel using one extra thread per call.

有关的那一刻就不可能有嵌套线程组中的JMeter所以你必须做一些额外的使用的编码的 JSR223采样来揭开序幕AJAX请求。主要要求和嵌套AJAX调用应置于事务控制器看起来像一个真正的-browser行为。

For the moment it is not possible to have nested thread groups in JMeter so you'll have to do some extra coding using JSR223 Sampler to kick off AJAX requests. Main request and nested AJAX calls should be placed under Transaction Controller to look like a real-browser behavior.

另外,您可以开发自己的JMeter取样器将能够产卵额外的线程来模拟AJAX请求。

Alternatively you can develop your own JMeter Sampler which will be able to spawn extra threads to simulate AJAX requests.

有关方法2的详细信息,请参阅上面的如何负载测试AJAX / XHR启用站点JMeter的指导。

For details on 2 approaches above see How to Load Test AJAX/XHR Enabled Sites With JMeter guide.

这篇关于通过JMeter的AJAX性能测试要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆