Tools for Ajax load testing

2019-03-12 11:15发布

There seems to be a lot of stress/load testing tool that support AJAX.
I am wondering how well does these tool implemented.

Do they only record http request and replay it?
Is it the right way to test AJAX app?
How does google test their ajax apps?

14条回答
乱世女痞
2楼-- · 2019-03-12 11:33

Take a look at LoadBooster(https://www.loadbooster.com). It utilizes headless scriptable browser PhantomJS/CasperJs to test web sites. Phantomjs will parse and render every page, execute the client-side script. The headless browser approach is easier to write test scenarios to support complex AJAX heavy Web 2.0 app,browser navigation, mouse click and keystrokes into the browser or wait until an element exists in DOM. LoadBooster support selenium HTML script too.

Disclaimer: I work for LoadBooster.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-03-12 11:34

I've used Virtual User Generator, which is a part of the Loadrunner software from HP, to test AJAX applications. The software has several application protocols that can be used to record web applications, e.g. AJAX, and Click and Script.

For the majority of web application load testing it is sufficient to record and replay http requests. This will give the result of how the servers are handling the load. If your web application does a lot of asynchronous loading, and rendering on the client side, e.g. parsing large datasets of xml or json, or many DOM modifications, it can be relevant to include the browser tier to measure the end user experience.

查看更多
虎瘦雄心在
4楼-- · 2019-03-12 11:35

Most of the load testing tools out there do AJAX load testing the same way: they execute the raw HTTP traffic that is seen during a "recording" phase (which can be page requests, image requests, or even AJAX requests). The main difference among them is how good their recorder/IDE tool is and how easily it helps you parameterize the HTTP requests such that they reflect real world traffic based on dynamic/realtime results.

Warning, blatant plug: The only real exception to this is my company, BrowserMob. Instead of simulating the traffic observed, it actually uses real web browsers to drive back load. As such, the AJAX stuff is handled by the browser.

Useful link: Separate from the blatant plug above (though I do hope you check it out - we're up front with the pricing and provide a free trial), I recently wrote an article for Ajaxian about AJAX load testing. It goes in to more detail about the technical implications of using real browser users (RBUs) vs. virtual users (VUs).

查看更多
太酷不给撩
5楼-- · 2019-03-12 11:36

Better write isolated test method or API for load testing ajax application. There are some reasons:

  • It's not so easy to write functional tests to Ajax applications, for example for GWT.
  • You can use Jmeter WebDriver plugin, but for each run it starts browser which will use most of RAM and CPU.
  • You will load backend not frontend, so you can avoid ajax.

You can devide your testing like that: for Ajax application use Selenium or PhantomJS/CasperJS. For load testing use JMeter, Gatling via API not via Ajax.

查看更多
淡お忘
6楼-- · 2019-03-12 11:44

Google apps are written in GWT, which comes with its own extension to JUnit. Article on unit testing ajax applications with GWT.

查看更多
贪生不怕死
7楼-- · 2019-03-12 11:45

I've used SilkPerformer at a previous job. According to the link, they have some AJAX enhancements. Unfortunately, Silk is far from free.

查看更多
登录 后发表回答