Stress / Load Test a web app with ReactJS FE / Java BE: which tool to use

Viewed 4684

the company I currently work for wishes to perform a load test on its online shop, by being as close to reality as possible. Notably, they want to load test the entire process of making a purchase (Go to website -> article -> add to cart -> guest or login -> finalize).

The issue I have is, add to cart button has a randomized class name, and it's through this class that a JS function will be called on click. Moreover, most of a pages element are called via ReactJS.

I already looked into Locust.io, but I failed to send a JS event. Selenium would allow me to perform the task, but not to scale it to tens of thousands of users. I did a quick check of JMeter, but apparently it doesn't deal with JS either.

So, I would like to get your input as to which load testing tool would be adapted for this scenario?

Thanks in advance!

3 Answers

All scalable load test tools work at protocol level and JMeter is no exception.

The process is to record your scenario using JMeter recording feature described here:

If you want to also have User eXperience feedback then the solution is to add Webdriver test representing slight percentage of the total in order to have an idea of the response times at Browser level.

If you'd like to learn more about load testing and JMeter, this book will help you.

Any tool which is capable of sending HTTP Requests and behave like a real browsers (handle images, scripts, styles, fonts, headers, cookies, cache, etc. like browser does)

HTML class attribute is for assigning CSS styles, you ain't gonna need it for properly forming the relevant HTTP Request, you should focus on other things, i.e. capture the associated traffic using your browser Developer Tools and see how does the request look like and how to configure the load testing tool of your choice to mimic this request.

JMeter might be a good option, as far as I'm aware it is the only one tool which is capable of simulating AJAX requests via Parallel Controller

You can try HPE's LOADRunner, use a combination of both TC Web and WEB(http/html)protocol to test your application. You can try the 30 free trial to see if it works.

Loadtesting the ReactJS components or props(DOM stuff) is a little complex, you will have to use a combination of selenium (UI) +jmeter (Web http traffic) to capture a complete (arond 80% accurate) end user behavior.

cheers Arjun

Related