Tuesday, December 12, 2017

Client Side Response Time/Rendering Time and Server Side Time of Mobile app/Web Application

When we talk about the performance testing of any application weather it is web application of Mobile App. First question comes in our mind is about the user experience of the application.

Most of the tools that are available in the market gives the stats of only one component of this scenario i.e. they only provide the server-side response time. 

But client-side loading time/rendering time is also point of interest if we are taking about the end to end response time.

though not very useful information is available over the google from where you can get the client-side response time and server-side response time as well., but when there is an issue with the performance of the application then it becomes necessary to segregate even if the issue is at server side of at client side.

We can achieve this by a simple formula:

Capture over all page load time
Capture TTFB [Time to first buffer] 

1) There is an issue in page at server side if TTFB is high and difference of load time and TTFB is very low
2) There is an issue at client side if TTFB is very low and high page load time is there

Even we can get the segregation of server-side response time as well as client side response time using the Fiddler while capturing the Mobile App/Web App requestes:

You can easily understand these from the below screenshot:






Below parameters will give us this segregate results:

·  FiddlerBeginRequest – The time at which Fiddler began sending the HTTP request to the server.
·  ServerGotRequest - Exact time that Fiddler finished (re)sending the HTTP request to the server.
·  ServerBeginResponse - Exact time that Fiddler got the first bytes of the server's HTTP response.
·  ServerDoneResponse - Exact time that Fiddler got the last bytes of the server's HTTP response.
·  ClientBeginResponse - Exact time that Fiddler began transmitting the HTTP response to the client browser.
·  ClientDoneResponse- Exact time that Fiddler finished transmitting the HTTP response to the client browser.




Capturing Response time for Andriod App Launcher

Below are the scenario that we have tried to capture the response time of Google Now Launcher activities .

We have tried to capture the response time of below activities taking it as Minor Project : 

Minor Project – QA
Evaluate the performance of Google Now Launcher from Play Store.
• Install the latest version of Google Now Launcher
• Report the average application opening time of Hot-seat icons
• Report the average time to navigate to App Drawer
• Report the average application opening time of App Drawer icons
• Test that on long press the Launcher enters overflow mode
• Test that user is able to change wallpaper of Launcher

All the activities that are mentioned above are client side only and leg time for the same depend on the RAM in the test device, Though we can easily get the matrix for CPU, Memory,Network utilization on device but for capturing leg time, I have tried the following scenarios


1) Manually Using Stopwatch:
                 Major drawback of capturing Response time/Lag Time using this scenario is the non accuracy of the results as response time is in less than a second.
 
2) Using ADB Logs
                  We were expecting the time to be logged in Activity manager line item in the ADB logs, but for application(Purely Client side) like Launchers will not have any activity Manager line item in Logs., This is possible for Native app to get the response time of user activity 

Inline image 1

3) Using Debug Proxy : Not able to record any client side request in Google Now Launcher

4) Using Fiddler : Seems it can give the client side response time, we have tried for some web apps, (refer to attached snapshot), we are facing some issue while downloading and installing fiddler certificate for Andriod and trying to get the same.

5) Using Automation tools(Thought):
                 We can capture the client side response time using  the customization logs in the automation scripts to capture the time stamps , But when we tried this solution for app launhers, we were not able to get the response time for the same.

Apart from these , i have also tried many other things that i found on google, but was unabale to capture the same.