UI Activity Test

UI slowness has been rated as one of the top reasons why users may be unhappy with a mobile app. In an era where users expect fast and instant results, a UI that loads slowly or responds lethargically to user actions can quickly frustrate users and compel them to uninstall the app. Since the digital world is spoilt for choice, any app that does not offer users a superlative experience will be quickly and easily replaced, thus resulting in loss of business and revenue.

If this is to be avoided, it is important that app developers continuously monitor how the app responds to each action/activity that a user initiates on the app's UI, and proactively identify activities that are performing poorly - i.e., activities that are taking too long to complete. This is exactly where the UI Activity test helps! 

This test automatically discovers the activities that users perform on the target mobile app's UI. The test then measures the app's responsiveness to each activity and the overall experience of users with each activity - whether they are satisfied? or frustrated? This way, the test points to activities that are consistently slow / are performing poorly. Detailed diagnostics pinpoint the precise instances where user experience with the activity was unsatisfactory. From these detailed metrics, you can even glean the device and country from which each such activity was initiated. By quickly studying these analytics, you can easily deduce deviant trends and their probable causes. Armed with this information, you can optimize the app's UI, so it responds briskly to user interactions and keeps the user hooked throughout!

Agent deploying the test : A remote agent

Outputs of the test : One set of results for every activity users initiate on the target app's UI for each native app platform

Configurable parameters for the test
Parameter Description

Test Period

How often should the test be executed.

Proxy Host

If the eG agent communicates with the Mobile RUM collector via a proxy, then specify the IP address/fully-qualified host name of the proxy server here. By default, this is set to none, indicating that the eG agent does not communicate with the collector via a proxy.

Proxy Port

If the eG agent communicates with the Mobile RUM collector via a proxy, then specify the port at which the proxy server listens for requests from the eG agent. By default, this is set to none, indicating that the eG agent does not communicate with the collector via a proxy.

Proxy Username and Proxy Password

If the eG agent communicates with the Mobile RUM collector via a proxy server, and if proxy server requires authentication, then specify valid credentials for authentication against Proxy Username and Proxy Password. If no proxy server is used or if the proxy server used does not require authentication, then set the ProxyUsername and ProxyPassword to none.

Confirm Password

Confirm the Proxy Password by retyping it here.

Note:

If you Reconfigure the test later to change the values of the Proxy Username, Proxy Password, Confirm Password parameters, then such changes will be effected only if the eG remote agent monitoring the Mobile RUM component is restarted.

URL Segments to be used for Page Groups

Using this parameter, you can specify a comma-separated list of URL segment numbers based on which the activities are to be grouped.

URL segments are the parts of a URL (after the base URL) or path delimited by slashes. So if you had the URL: http://www.eazykart.com/web/shopping/login.jsp, then http://www.eazykart.com will be the base URL or domain, /web will be the first URL segment, /shopping will be the second URL segment, and /login.jsp will be the third URL segment.

By default, this parameter is set to 1,2. This default setting, when applied to the sample URL provided above, implies that the eG agent will aggregate request and response time metrics to all instrumented web pages under the URL /web/shopping. Here, /web corresponds to the specification 1 (URL segment 1) and /shopping corresponds to the specification 2 (URL segment 2) in the default value 1,2. This in turn means that, if the target app consists of activities with URLs such as http://www.eazykart.com/web/shopping/products.jsp, http://www.eazykart.com/web/shopping/products/travel/bags.jsp, http://www.eazykart.com/web/shopping/payment.jsp, etc., then the eG agent will track the requests to and responses from all these web pages, aggregate the results, and present the aggregated metrics for the descriptor /web/shopping. This way, the test will create different activity groups based on each of the second-level URL segments in the managed app – eg., /web/movies, /web/travel, /web/reservations, /partner/contacts etc. - and will report aggregated metrics for each group so created.

If you want, you can override the default setting by providing different URL segment numbers here. For instance, your specification can be just 2. In this case, for the URL http://www.eazykart.com/web/shopping/login.jsp, the test will report metrics for the descriptor /shopping. You can even set this parameter to 1,3. For an app that contains URLs such as http://www.eazykart.com/web/shopping/products.jsp, http://www.eazykart.com/web/shopping/products/travel/bags.jsp, and http://www.eazykart.com/web/shopping/payment.jsp, this specification will result in the following descriptors: /web/products, /web/products.jsp, and /web/payment.jsp.

URL Patterns to be Ignored from Monitoring

By default, this test does not track requests to the following URL patterns: *.js,*.css,*.jpeg,*.jpg,*.png. If required, you can remove one/more patterns from this default list, so that such patterns are monitored, or can append more patterns to this list in order to exclude them from monitoring. For instance, to additionally ignore URLs that end with .gif and .bmp when monitoring, you need to alter the default specification as follows: *.js,*.css,*.jpeg,*.jpg,*.png,*.gif,*.bmpS

Number of Healthy Executions Per Test Period

By default, this parameter is set to 5 indicating that the detailed diagnosis of this test will collect and display metrics related to the top-5 normal/healthy activities, in terms of the Average execution time, for each measurement period in the timeline chosen for detailed diagnosis. To identify the top 5, the eG agent sorts all healthy executions in a measurement period in the ascending order of their Average execution time, and picks the first 5 executions from this sorted list for display in the Detailed Diagnosis page and for storing in the eG database.

You can however, increase or decrease this value depending upon how many healthy executions you want to see in your detailed diagnosis, and how well-tuned or well-sized the eG database is.

If you do not want the detailed diagnosis to include any healthy execution, set the value of this parameter to 0. To view all healthy executions, set the value of this parameter to all. Before setting the value of this parameter to all, make sure that you have a well-sized eG database in place, as this setting will store details of every execution that registers an Average execution time value that is lower than the Slow Transaction Cutoff specification. On a good day, this can result in numerous executions, and can consume considerable space in the eG database.

Number of Slow Executions Per Test Period

By default, this parameter is set to 5 indicating that the detailed diagnosis of this test will display metrics related to the top-5 slow executions, in terms of the Average execution time, for each measurement period in the timeline chosen for detailed diagnosis. To identify the top 5, the eG agent sorts all slow executions in a measurement period in the descending order of their Average execution time, and picks the first 5 executions from this sorted list for display in the Detailed Diagnosis page and for storing in the eG database.

You can however, increase or decrease this value depending upon how many slow executions you want to see in your detailed diagnosis, and how well-tuned or well-sized the eG database is.

If you do not want the detailed diagnosis to include any slow execution, set the value of this parameter to 0. To view all slow executions, set the value of this parameter to all. Before setting the value of this parameter to all, make sure that you have a well-sized eG database in place, as this setting will store details of every execution that registers an Average execution time value that is higher than the slow transaction cutoff specification. On a bad day, this can result in numerous executions, and can consume considerable space in the eG database.

Slow Transaction Cutoff (Ms)

This test reports the count of slow executions and also pinpoints the executions that are slow. To determine whether/not a page is slow, this test uses the Slow Transaction Cutoff parameter. By default, this parameter is set to 4000 millisecs (i.e., 4 seconds). This means that, if an execution takes more than 4 seconds to load, this test will consider that as a slow execution by default. You can increase or decrease this slow transaction cutoff according to what is ‘slow’ and what is ‘normal’ in your environment.

Note:

The default value of this parameter is the same as the default Maximum threshold setting of the Average execution time measure – i.e., both are set to 4000 millisecs by default. While the former helps eG to distinguish between slow and healthy page views for the purpose of providing detailed diagnosis, the latter tells eG when to generate an alarm on Average execution time. For best results, it is recommended that both these settings are configured with the same value at all times. Therefore, if you change the value of one of these configurations, then make sure you update the value of the other as well. For instance, if the Slow Transaction Cutoff is changed to 6000 millisecs, change the Maximum Threshold of the Average execution time measure to 6000 millsecs as well.

Tolerating Cutoff (MS)

This test reports the count of tolerating executions and also pinpoints the executions with a tolerating experience. For an execution to be considered as a tolerating execution, this test uses the Tolerating Cutoff parameter. By default, this parameter is set as 4 times the default value of the Slow Transaction Cutoff parameter. Since the default Slow Transaction Cutoff is 4000 milliseconds, the Tolerating Cutoff is set as 16000 milliseconds (4 * 4000) - i.e., 16 seconds - by default. This means that, if an activity execution takes anywhere between 4 to 16 seconds to load, then, this test will consider that execution as a tolerating execution by default. You can increase or decrease this Tolerating Cutoff according to what is 'tolerating', what is ‘slow’ and what is ‘normal’ in your environment.

Slow Session Cutoff

By default, this parameter is set to 25 milliseconds. This means that the test will count any user session that takes more than 25 ms to execute as a slow session. You can change the value of this parameter depending upon what is 'slow' in your environment.

Max Slow Session DD Count

By default, this parameter is set to 5. This means that by default this test will only display details of the top 5 slow sessions, in terms of their execution time, in detailed diagnosis. You can increase or decrease the value of this parameter based on whether you need more or less number of slow sessions in the detailed diagnostics. Before increasing this value, check if the eG database is sized well enough to handle the additional load.

DD Frequency

Refers to the freqthe uency with which detailed diagnosis measures are to be generated for this test. The default is 1:1. This indicates that, by default, detailed measures will be generated every time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against DD frequency.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.

 

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Number of executions

Indicates the number of times this activity was initiated on the target app.

Number

Compare the value of this measure across activities to identify the 'most popular' activity.

You can also use the detailed diagnosis of this measure to know the responsiveness of the activity every time it was performed on the target app.

Apdex score

Indicates the apdex score of user satisfaction with this activity.

Number

Apdex (Application Performance Index) is an open standard developed by an alliance of companies. It defines a standard method for reporting and comparing the performance of software applications in computing. Its purpose is to convert measurements into insights about user satisfaction, by specifying a uniform way to analyze and report on the degree to which measured performance meets user expectations.

The Apdex method converts many measurements into one number on a uniform scale of 0-to-1 (0 = no users satisfied, 1 = all users satisfied). The resulting Apdex score is a numerical measure of user satisfaction with the performance of enterprise applications. This metric can be used to report on any source of end-user performance measurements for which a performance objective has been defined.

The Apdex formula is:

Apdext = (Satisfied Count + Tolerating Count / 2) / Total Samples

This is nothing but the number of satisfied samples plus half of the tolerating samples plus none of the frustrated samples, divided by all the samples.

A score of 1.0 means all responses were satisfactory. A score of 0.0 means none of the responses were satisfactory. Tolerating responses half satisfy a user. For example, if all responses are tolerating, then the Apdex score would be 0.50.

Ideally therefore, the value of this measure should be 1.0. A value less than 1.0 indicates that the user experience with the activity has been less than satisfactory.

Average execution time

Indicates the average time taken by this activity to complete.

Milliseconds

This is the average interval between the time that a user initiates a request for the activity and the completion of the activity.

If the value of this measure is consistently high for an activity, there is reason to worry. This is because, it implies that the app is slow in responding to requests for that activity. If this condition is allowed to persist, it can adversely impact user experience with the app as a whole. You may want to check the Apdex score in such circumstances to determine whether/not user experience has already been affected. Regardless, you should investigate the anomaly and quickly determine where the bottleneck lies.

Some of the common causes for slow UI responsiveness are as follows:

  • Heavy Operations on the Main Thread: Running network requests, database queries, or complex data processing directly on the UI thread.

  • Overdraw and Complex View Hierarchies: Rendering deeply nested UI layouts or drawing pixels on the screen multiple times in a single frame.

  • Memory Leaks and Garbage Collection (GC): Continuous allocation and deallocation of memory causing frequent GC pauses (known as "memory churning").

  • Slow Main-Thread Disk I/O: Reading or writing large files, shared preferences, or local databases without asynchronous workers.

  • Unoptimized Images: Loading massive, uncompressed images into memory without downscaling them to the actual UI container size.

To improve activity responsiveness, here are a few recommendations:

  1. Move Work Off the Main Thread:

    • Asynchronous Operations: Use background threads for networking, local storage updates, and heavy data parsing.

    • Language-Specific Solutions:

      • Use Coroutines or RxJava in Android.

      • Use Swift Concurrency (async/await) or Grand Central Dispatch (GCD) in iOS.

  2. Optimize UI Layouts and Rendering:

    • Flatten the Hierarchy: Keep UI trees shallow by using modern layouts like ConstraintLayout (Android) or modern stack configurations (iOS).

    • Lazy Loading: Use dynamic, recycling lists like RecyclerView (Android) or UICollectionView / LazyVStack (iOS) to only render what is visible on the screen.

    • Reduce Overdraw: Remove unnecessary background colors from layouts that are hidden behind other elements..

  3. Efficient Resource Management:

    • Image Caching: Use libraries like Glide/Coil (Android) or Kingfisher (iOS) to automatically resize, cache, and decode images in the background.

    • Fix Memory Leaks: Track down objects that remain in memory longer than necessary using tools like LeakCanary.

  4. Use the Detailed Diagnostics of this Measure: You can also use the detailed diagnosis of this measure to know the responsiveness of the activity every time it was performed on the target app. This will lead you to the exact instance that was the slowest. If the slowness has been consistent, then you can use the detailed metrics to know from which device and country each instance of the activity was initiated. By correlating these details with the responsiveness, you can deduce usage patterns that may be worrisome and if the device and/or country is contributing to these patterns in any way. The app can be optimized accordingly.

Executions per minute

Indicates the number of times this activity was executed per minute.

Number

This is a good indicator of the workload imposed by the activity on the app.

An unusually high value for this measure may require investigation.

Normal executions

Indicates the percentage of time for which the target app responded normally to requests for this activity.

Percent

The value of this measure indicates the percentage of time in which users have not experienced any slowness with this activity.

Ideally, the value of this measure should be 100%. A value less than 50% is indicative of a serious problem, where most of the time the activity is slow. Under such circumstances, you can use the detailed diagnosis of the Number of executions measure for deeper analysis of the slowness.

Slow executions

Indicates the percentage of time the app was responding slowly to requests for this activity.

Percent

Ideally, the value of this measure should be 0. A value over 50% implies that you are in a spot of bother, with the activity being sluggish for over half of the time. Use the detailed diagnosis of the No of executions measure to identify exact instances that were slow.

Slow executions (Tolerating & Frustrated)

Indicates the number of times the target app responded very slowly to requests for this activity.

Number

An activity is considered to be slow when the average time taken to complete that activity exceeds the Slow Transaction Cutoff configured for this test.

Ideally, a UI activity should run quickly. The value 0 is hence desired for this measure. If the value of this measure is high, it indicates that users frequently experienced slowness when performing this activity. To know which instances of this activity are slow and why, use the detailed diagnosis of this measure.

Satisfied users

Indicates the number of times the app responded quickly to requests for this activity.

Number

An activity is considered to be slow when the average time taken to complete that activity exceeds the Slow Transaction Cutoff configured for this test. If this Slow Transaction Cutoff is not exceeded, then the user experience with that activity is deemed to be ‘satisfactory’. To know which instances of this activity have delivered a satisfactory experience to users, use the detailed diagnosis of this measure.

Ideally, the value of this measure should be the same as that of the Page views measure. If not, then it indicates that one/more page views are slow – i.e., have violated theSlow Transaction Cutoff

If the value of this measure is much lesser than the value of the Tolerating executions and the Frustrated executions, it is a clear indicator that the UX with the activity is below-par. In such a case, use the detailed diagnosis of the Tolerating users and Frustrated users measures to know which specific instances of that activity were slow.

Tolerating users

Indicates the number of times the app's responsiveness to this activity exceeded the value set for the Tolerating Cutoff parameter of this test.

Number

If the Average execution timeof an activity exceeds the Tolerating Cutoff configuration of this test, then such execution is considered to be a Tolerating execution.

Ideally, the value of this measure should be 0. A value higher than that of the Satisfied executions measure is a cause for concern, as it implies that the overall user experience with the activity is less than satisfactory. To know which instances of the activity are contributing to this sub-par experience, use the detailed diagnosis of this measure.

Frustrated executions

Indicates the number of frustrated executions of this activity.

Number

If the Average execution time is over 4 times the Slow Transaction Cutoff configuration of this test(i.e., > 4 * Slow Transaction Cutoff ), then such an execution is considered to be a Frustrated execution.

Ideally, the value of this measure should be 0. A value higher than that of the Satisfied users measure is a cause for concern, as it implies that the overall user experience with the activity is less than satisfactory. To know which specific instances/executions of the activity are contributing to this sub-par experience, use the detailed diagnosis of this measure.

The detailed diagnosis of the Number of executions measure reveals the time each instance/execution of the activity took to complete. This way, the execution that was the slowest can be easily determined.

Figure 1 : The detailed diagnosis of the Number of executions measure of the UI Activity test