Code Coverage Measurement Framework for Android Devices

Szabolcs Bognár, Tamás Gergely, Róbert Rácz, Árpád Beszédes and Vladimir Marinković 

Software testing is a very important activity in the software development life cycle. Numerous general black- and white-box techniques exist to achieve different goals and there are a lot of practices for different kinds of software. The testing of embedded systems, however, raises some very special constraints and requirements in software testing. Special solutions exist in this field, but there is no general testing methodology for embedded systems.
One of the goals of the CIRENE project was to fill this gap and define a general testing methodology for embedded systems that could be specialized to different environments. The project included a pilot implementation of this methodology in a specific environment: on an Android-based Digital TV receiver (Set-Top-Box).

In this pilot, we implemented method level code coverage measurement of Android applications. This was done by instrumenting the applications and creating a framework for the Android device that collected basic information from the instrumented applications and communicated it through the network towards a server where the data was finally processed. The resulting code coverage information was used for many purposes according to the methodology: test case selection and prioritization, traceability computation, dead code detection, etc.

In this paper, we introduce this pilot implementation and, as a proof-of-concept, present how the coverage results were used for different purposes.