Search code examples
jmetertableau-apiperformance-testing

What should be the approach for react js based site's performance testing-Jmeter


I have an application which is in react js. Here I am giving demo site https://webix.com/demos/bank-app/#!/top/customers?user=1/information .Suppose I have to do performance test of statistics page tab how can I do this. As all the resources downloaded from the start when I hit the ttps://webix.com/demos/bank-app/ page. Now when I go to chrome developer tool and click on customer->statistics it shows me only static file.my client wants me to check the performance of those chart load time.

can anybody help.

Also do I have to load test google API's for charts that loaded on the page. There is so many SVG files and woff2 file. do I have to load test these things.enter image description here

Thanks, Bibek


Solution

  • client wants me to check the performance of those chart load time - if you mean chart rendering time - JMeter won't give this to you, as per JMeter project main page:

    JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).

    So if you want to include this rendering time into your report the only option I can think of is going for WebDriver Sampler which provides JMeter integration with Selenium browser automation framework

    There is so many SVG files and woff2 file. do I have to load test these things. - yes, but wisely, there is a special setting at "Avanced" tab of the HTTP Request sampler responsible for retrieval of these images, scripts, styles, fonts, etc.

    enter image description here

    the idea is to enable downloading for the domain you're testing (and exclude external assets if any). Also don't forget to add HTTP Cache Manager to your test plan because real browsers do download these "embedded resources" but they do it only once. See Web Testing with JMeter: How To Properly Handle Embedded Resources in HTML Responses article for more details.