[Paper Review] On the Energy Footprint of Mobile Testing Frameworks
This paper evaluates the energy consumption overhead of eight mobile UI automation frameworks during testing, revealing that some increase energy use by up to 2200%. Espresso is the most energy-efficient framework, while methods using content-based UI component lookup (e.g., Find by Content) incur up to 600% higher energy costs. The study provides a decision tree and best practices to guide developers in selecting energy-aware testing frameworks and minimizing instrumentation overhead.
High energy consumption is a challenging issue that an ever increasing number of mobile applications face today. However, energy consumption is being tested in an ad hoc way, despite being an important non-functional requirement of an application. Such limitation becomes particularly disconcerting during software testing: on the one hand, developers do not really know how to measure energy; on the other hand, there is no knowledge as to what is the energy overhead imposed by the testing framework. In this paper, as we evaluate eight popular mobile UI automation frameworks, we have discovered that there are automation frameworks that increase energy consumption up to roughly 2200%. While limited in the interactions one can do, Espresso is the most energy efficient framework. However, depending on the needs of the tester, Appium, Monkeyrunner, or UIAutomator are good alternatives. In practice, results show that deciding which is the most suitable framework is vital. We provide a decision tree to help developers make an educated decision on which framework suits best their testing needs.
Motivation & Objective
- To investigate whether UI automation frameworks introduce significant energy overhead that distorts energy efficiency measurements of mobile apps.
- To compare the energy footprint of popular mobile testing frameworks under common user interactions.
- To identify best practices for writing energy-efficient automated test scripts, particularly regarding UI component lookup methods.
- To provide a decision framework to help developers select the most energy-efficient testing framework based on project constraints.
Proposed method
- The authors evaluated eight popular mobile UI automation frameworks: Espresso, Appium, UIAutomator, Monkeyrunner, AndroidViewClient, Calabash, and two others.
- Energy consumption was measured using a power meter during execution of common UI interactions: Tap, Long Tap, Drag and Drop, Swipe, Pinch & Spread, Back button, Input text, and various Find operations.
- The study compared energy usage across frameworks for identical interactions, isolating the overhead introduced by each framework’s internal logic.
- Lookup methods (Find by ID, Description, Content) were evaluated for energy cost, with a focus on how content-based searches impact performance.
- A decision tree was constructed based on energy efficiency, feature support, and project-specific constraints to guide framework selection.
- Best practices were derived from empirical results, particularly advocating for avoidance of content-based lookups and caching of component references.
Experimental results
Research questions
- RQ1RQ1: Does the energy consumption overhead created by UI automation frameworks affect the results of the energy efficiency of mobile applications?
- RQ2RQ2: What is the most suitable framework to profile energy consumption?
- RQ3RQ3: Are there any best practices when it comes to creating automated scripts for energy efficiency tests?
Key findings
- Espresso demonstrated the lowest energy footprint, consuming only 0.09J per Tap, making it the most energy-efficient framework among those evaluated.
- The energy overhead of the Drag and Drop interaction reached up to 2200% across some frameworks, significantly distorting energy measurements.
- Using Find by Content for UI component lookup incurred up to 600% higher energy consumption than Find by ID in Espresso, increasing energy cost from 1.4J to 9.4J.
- Appium, Monkeyrunner, and UIAutomator were identified as strong alternatives to Espresso, especially for projects where Espresso’s limitations (e.g., source code access, WebView incompatibility) are prohibitive.
- AndroidViewClient and Calabash were found to be unsuitable for energy efficiency testing due to their high energy overhead.
- Caching the results of UI component lookups and preferring Find by ID or Find by Description over Find by Content can significantly reduce energy consumption in test scripts.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.