Should we use performance testing on UI? Should we use End to End testing scenarios for performance testing?
1 Answer
There are 2 different side of things:
- Server-side performance testing when you simulate hundreds/thousands of virtual users accessing your application. This way you're testing your server and assessing how it handles increasing load
- Client-side performance testing which targets what's going on in the web browser, i.e. rendering speed, JavaScript execution performance, etc.
The point 1 can be conducted using any load testing tool which is capable of acting on HTTP protocol level.
The point 2 can be tested using i.e. browser developer tools which normally come with profiler.
Using end-to-end tests for assessing performance is theoretically possible, but it isn't something I would recommend because:
- Real-browser tests are very resource intensive as one browser instance requires at least 1 CPU core and a couple of gigabytes of RAM while you can mimic several hundreds of users on HTTP protocol level on the same hardware
- You will not be able to collect performance metrics and build charts correlating increasing load with response time, transactions per second, won't be able to measure connect time and latency, etc.
The best approach would be conducting the main load on HTTP protocol level using a suitable load testing tool and at the same time have 1-2 virtual users operating real browsers to check client-side rendering performance using i.e. browser Performance API. If you don't have other tools in mind consider using Selenium
-
Sitespeed.io deals with the problem of rendering performance analysis. sqa.stackexchange.com/a/40714/12740 Commented Sep 9, 2019 at 13:20