Can we able to get page load time after every actions.(App level)
Testcase 1: Login to Driver application
Steps: 1. Enter username and password
2.Click on submit button
Expected resulthould display the driver dashboard
In above test case we are giving username and password and clicking on submit button
After click action(in back end It will get data from api) then display in the UI. We want to know the response time for Page loading after every actions.
At current moment we don't have such feature, but there might be possibility to do such measurement on the tests level. You can also go through the "device.log" which contains timestamps for commands executed on device.
> We want to know the response time for Page loading after every actions.
a) It would help if you let us know what are you using to create and execute your tests. (Selenium/Appium is assumed so far.)
b) You need to clarify what is your definition of 'response time for Page loading'.
In general, the process for interactive web page looks like this:
-- user initiates some action;
-- a request to web server is sent by the application;
-- server spents some time processing the request and sends response back to the application;
-- application processes the response and renders a new page. New page might not be rendered immeditely but require additional (AJAX) requests to be executed and some page scripting to complete before the page is rendered and becomes interactive (i.e. can accept and respond to user's actions).
Considering the above, two basic types of measurements can be done to measure response time:
1) API performance measurement. This is when the request is issued to the server and the time required to get a response is measured. Usually such type of testing is done with the help of specialized tools (e.g. LoadComplete, JMeter) and the goal of API performance testing is usually to get an understanding of how many requests per second can be served by your web server.
API performance testing is rather of a back-end type of tesing because it is not a rare case when, for example, it takes 0.5 sec to the server to serve all requests from the application, but the application itself requires 5 sec to process all data on the client side and render the page. This leads to the second type of the measurement:
2) Client performance measurement. This is when you do not care about every single request sent by your application but do care about the time it takes for the application to render new page and become responsive.
This type of testing is done on the client side (using UI tests with TestComplete/Selenium/Appium/etc.). The implementation of this testing type is specific for your given tested application. I.e. the test needs to take a timestamp and initiate some action. Then test code must wait until the new page is received from the server, wait until the anchor element is rendered on the page and wait until this elemnt is populated with data. Then test code takes another timestamp, deducts initial one and obtains the sought for response time.
Anchor element is the element that defines that the tested web page was loaded and is accessible to the user.
Note, that the anchor element is not necessarily the last element on the page, but the one that meets your definition of 'page has been loaded'. For example, the page may be rendered and can accept user's input, but continue to execute AJAX requests to get, say, some advertising content and to display it. Depending on your definition of 'page has been loaded' you might or might not need to wait for these AJAX requests.