Last week I attended the Eclipse Testing Day 2013 in Darmstadt/ Germany. The main topic of the conference was Mobile Testing. One of the best talks was “Energy testing and optimization of mobile applications” by Claas Wilke. Claas talked about the energy consumption of apps and that this topic is not considered by all developers during the development and testing phase. To prevent apps to consume to much battery, Claas developed a tool called JouleUnit. JouleUnit is an energy profiler, that can be used for Android apps, to find unnecessary battery usage of the app during runtime. JouleUnit is using the Android instrumentation framework to test the app. Beside profiling the battery usage you can also monitor the device CPU, WiFi or the display brightness. JouleUnit tests have the same structure like JUnit tests. At the end of the test run a nice graph is generated to see the battery consumption of the app.
To use JouleUnit you need the JouleUnit workbench to integrate it to Eclipse IDE. The wiki pages of the project describe how to install and use JouleUnit in your current project. To get a first impression you can also check the following screencast.
I really like JouleUnit and will use it in one of my next Android projects. What do you think about the tool? Are there similar projects out there?
Have fun and give it a try!
JouleUnit Example Project:
- Energy testing and optimization of mobile applications
- Image was taken while screencast was running