Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load testing the UI

Tags:

I have been working on a site that makes some pretty big use of AJAX and dynamic JavaScript on the front end and it's time to start stress testing. But how do you properly stress test something that requires clicking several links on the front-end? One way I was able to easily hit every page of the site quickly and repeatedly was to point a Google Mini at it. But that's not going to click links and then navigate Modal windows and things like that.

Edit - I should point out that the site is done in PHP5 and the JavaScript library used is jQuery. Not sure if this would make any difference but felt it might be useful to know.

like image 496
Steven Surowiec Avatar asked Feb 19 '09 20:02

Steven Surowiec


1 Answers

JMeter is great at this. You may record your sessions and tweak them to your liking.

So-called 'ajax load testing' is a recurring subject on this site, and is often confused. So let's get it straight: There is really no difference between load testing a normal web page and load testing with ajax. It all boils down to discrete requests; they just happen to not be full page refreshes.

One thing to keep in mind is there is a distinct difference between load testing the server processing the requests (a load test) and the performance on screen of the UI components being updated (how well your javascript performs.)

Simple load test example:

  1. initial page load
  2. login
  3. navigate?
  4. 5-10 'ajax' requests (or whatever may fit your application usage pattern)
  5. logout
like image 63
Nathan Avatar answered Oct 11 '22 03:10

Nathan