We can automate our UI / API request & responses. We can check the expected responses. But there is another aspect: How long can we wait? What is the maximum acceptable waiting time?
Yes, waiting duration is important. From the product owners point of view, percentile checks are performed. (i.e What percentage of requests are responded under X ms.) This is called SLA (Service Level Agreement). But how can we measure it? Firstly principles in the background should be understood. When we navigate to a page, a flow is conducted started from the click. Lets see the package structure:
You can concentrate on any of them. Perhaps TTFB -Time to First Byte-, time lasting from request until the first response byte which gives a clue about the internal processing time of the service. And finally, lets check how they are parsed inside the browser by W3C Nagivation & Timing APIS:
Various audits can be performed over them as well:
Then, time to use those APIs:
For API requests, we can use again RestAssured to check timings: