Power Test Cloud: how to measure the energy consumption of a web or mobile app when you’re not an expert

Reading Time: 4 minutes

Are you an Android Developer? A Web Designer? Or a non-Developer, just like me? Do you know how much energy is consumed by your website or mobile application? More importantly, do you know how to optimize them to be more efficient?

GREENSPECTOR integrates a functionality which, in just a few clicks, allows you to launch a test and measure energy consumption, hence audit your app: the Power Test Cloud.

Power Test Cloud, you said ?

The Power Test Cloud allows to easily program a scenario of standardized or automated tests for your Internet site or Android application. Then, the tests are executed on real computers and smartphones hosted in GREENSPECTOR premises.

Standardized and automated tests

The advantage with automated standardized tests is that they enable a very quick launch of a consumption analysis, without having to develop elaborated functional tests. In the absence of link with functional, it also allows to benchmark applications. Despite this action’s simplicity, we can make a few very interesting observations.

Let’s talk websites now

Just with the website’s URL, the Power Test Cloud is capable of measuring the energy consumption on a platform you get to choose: an Android smartphone or a PC. The standard test scenario includes 4 steps:

  • Website launch
  • Execution in the foreground
  • Scrolling through the page
  • Execution in the background.

Focus on mobile applications

From the binary APK URL, the Power Test Cloud allows you to measure the energy consumption on an Android smartphone. The standard test scenario includes 3 steps:

  • Website launch
  • Execution in the foreground
  • Execution in the background.

I tested for you the Power Test Cloud!

First off, let me say the procedure felt pretty simple to me. In the GREENSPECTOR menu, I clicked on « Schedule a Test » :

  • I typed the application’s name for which the results had to be saved
  • I added the version number in order to keep track of the evolutions of the app through changes
  • I selected the platform on which I wanted to test my application (in this case a Nexus 6)
  • I selected the type of application (here, “Mobile app”)
  • I typed the binary APK address that I wanted to measure
  • I selected the number of iterations (you want at least 3 for a reliable test).

Once the form got validated, my test request was sent to the Power Test Cloud in GREENSPECTOR premises.

{{% note %}}
Here’s a guided tour: the Power Test Cloud is a server which manages programmed tests on real platforms. It controls queues, phones charge levels and measures retrieval.
{{% /note %}}

How I read the results

When the test was over, the Power Test Cloud updated my application’s dashboard. To have a look at it I selected the tested application in the tab « My applications ».

My test results were displayed in my application’s dashboard in different sections.

Firstly, the eco-score gave me the overall grade of my application and I was able to see the synthesis of the different eco-scores for each domain. In my case, only the “client resources” is evaluated, for a deeper analysis, I could have run a measure with the TestRunner tool and audit my application’s code with the functionality « Schedule a Scan ».

Then, the Improvement Summary and the Improvement List made me discover the good patterns that were respected, as well as the non-respected ones, with a prioritization level depending on potential gains. In the “Impact Resources” section, the battery logo indicated me an estimation of the phone’s actual battery life, plus the impact the application has on it.

Finally, the last two sections gave me a clear visualization of the results in terms of energy, memory and CPU. I was able to track consumption at every single step of the test with my application launching and idle states both in the foreground and in the background.

In just a few clicks I was able to get an overview and deduct a first analysis of my application. Thanks to those first observations I can now guide developers on how to optimize efficiently the application… Then I’ll measure it again and witness our evolution!

It’s your turn now !

Your mission, if you shall accept it : Get a better eco-score and lower your application’s resources consumption!

Helpful tools : The two modules Meter and Evolution give you the means to get a detailed analysis of these measures!

Conclusion

The Power Test Cloud is a clear and easy-to-use tool to analyze the resources consumption of your applications.

No need to develop a test platform yourself anymore, smartphones and computers are available in the GREENSPECTOR Cloud. Tests are standardized and automated, so we get precise and reliable measures.

The GREENSPECTOR modules and dashboard give you a clear and detailed analysis that should guide your action plan and optimize your applications in a continuous way.

Every measure we talk about on our blog (Cordova, Facebook, Energy Consumption) were realized with the Power Test Cloud. Indeed, the ease-of-use and the speed to get the measures back allow us to launch measurement campaign very frequently.