Description: Only basic test logic is described here
Sort out a list of top-level pages that the app needs to focus on
Basic tools: UT (internal tools, inconvenient to reveal details)
Introduce the Timeprofile class in the development code: This class is the top of the UT, exposing some simple time-of-day methods, start (), End (), and so on;
In the corresponding code of the first level page, mainly refers to the activity class, the Oncreat () method in the body of the Initview () method call, before the start (), to record the current timestamp;
Then, in the request callback function body of the onsucess () method inside the body, get to the back of the data, call method End (), record the time stamp;
Finally, these 2 time subtraction, obviously, get the activity basic time;
The relevant data obtained in step 4 is stored in the device's cache in a certain format;
To the mobile phone in the WiFi environment (detection of the current network type), the stored local data, uploaded to the UT platform display platform for users to view ...
Ps:
In particular, it shows that only one test page is opened to the response time after the request data is returned;
There is still a lot of time to refine, such as API response time (minus the time before the API is called and after the data is successfully returned);
There is also a lot of testing space;
Page response time Test in Android app app