on ‎2022 Aug 18 1:08 PM
We are migrating our storefront to Spartacus on CCV2.
Does anyone has advice on performance testing/stress testing approach?
Selenium Webdriver is not advised for performance testing as its not optimised but then individual API calls will not give us actual response times on the browser, also there can be multiple API calls happening on the browser which can't be simulated without reading the API responses.
Also if we only test the API's response times we can't compare the page speeds with acc storefront.
Your advice is kindly appreciated.
Thank you
Request clarification before answering.
Hi Jadhav,
You're right, JMeter is not a browser, it only works on HTTP protocol level, so it cannot render the pages or components by executing JS codes in a SPA application like Spartacus.
In that regard, I'm not aware of any free and open source load testing tools for SPA applications, maybe you can try some non-opensource load testing tools like loadview or flood, they should have a free tier to at least try it out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jadhav,
With JMeter or Gatling, you can do e2e UI performance testing, which includes the underlying API calls and UI rendering in the browser.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Appreciate your response Samuel.
Yes I agree that we need to use Jmeter or Gatling for performance testing, but because Jmeter doesn't render the response or executes scripts to make underlying API calls(async rest calls in spartacus/headless implementation) and if we add separate ajax calls to match actual calls, Jmeter doesn't aggregate response times of all rest calls which are required for single page load.
(say PDP page load without considering browser rendering time of css, js. It still needs to fetch pages, components and stock data required within components)
Hi Jadhav,
You're right, Selenium Webdriver is usually used for end-to-end functional UI testing, it's not optimized for performance testing. And API testing is not end-to-end in that UI rendering performance is not included.
So for end to end performance testing, You can try JMeter or Gatling to record performance testing scripts in browsers and run the scripts against your target environment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So do you suggest to test only API's using jmeter and we not test rendering in jmeter?
Issue with this approach is that some scenario's may call additional API endpoints and we can not compare page speed with API only testing.
So I hear that its not possible to compare page performance in headless. Is this correct assumption?
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.