Checklist of Load Testing Tips for AJAX Applications
Test and Monitor | Posted April 13, 2020

Asynchronous JavaScript and XML, better known by its cooler acronym AJAX, is a technique for sending and receiving XMLHttpRequests between a browser and server without reloading the page. These techniques power everything from Facebook's infinite scroll news feeds to Google's dynamic ads on publisher websites.

By updating specific page elements rather than reloading the entire page, AJAX reduces load times and improves the user experience. It also conserves server resources by minimizing the amount of information transferred. The catch is it's more complex to implement and test.

Read more about the challenges of testing AJAX applications in Selenium and some strategies that can help simplify the process.

Use this checklist to learn more about the unique requirements facing modern applications.

  • Don’t forget to account for server-side or CDN-level caching when testing AJAX requests. You may want to disable caching to provide an accurate look at performance and diagnose potential bottlenecks.
     
  • Test both happy and sad paths for AJAX requests to ensure that errors are gracefully handled by the application and the client doesn’t timeout. Sad paths could include both specific error responses or a lack of response (e.g. timeout).
     
  • Measure the impact of load testing on the database, as well as the API server. Don’t focus exclusively on the API server for optimizations since there are often better ways to structure data to fine-tune performance (e.g. indexing).
     
  • Use browser-based load testing tools, like LoadNinja, to simplify the load testing process and ensure accurate results. Protocol-based load testing frameworks don’t support client-side JavaScript execution out-of-the-box.
     
  • Look at virtual user sessions and their DOM at the time of performance degradation to speed up the time it takes to diagnose bottlenecks. Reading through server logs can be a very time-consuming process that doesn’t tell the whole story.
     
  • Check for the presence of timely animations to convey to the user that data is loading. Even if an AJAX request doesn’t fail, the failure to provide an indicator to the user could be a cause for a poor user experience.

Ready to start load testing? Sign up for your free, 14-day LoadNinja trial today.

Close

By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox