droidconIN 2016

The sixth edition of droidconIN

Arnav Gupta

Arnav Gupta


CI, Unit Testing and Code Coverage in Android

Submitted Jul 2, 2016

This talk shall deal with Android Testing & Deployment lifecycle, including CI Setup, Unit Tests, Instrumentation Tests, UI Tests and wrapping up them up in test suites and harnesses and getting coverage reports.
I will be demonstrating the available tools to continuously integrate your tests (for open source these tools are fully free, for closed source, they come at nominal fees) like Travis CI (for building), Codacy (for code quality) and Codecov.io or Coveralls (for code coverage)


Android Testing

  • Unit Testing (JUnit4 style)
  • Instrumentation Testing (Android Test Support Library)
  • Android Framework mocking tools (mockable-android.jar, Robolectric)
  • UI Testing (Espresso, UIAutomator)

Continuous Integration

  • Setting up gradle tasks for different test packages
  • Travis-CI + Github integration (optionally Gitlab CI for free private repository CI)
  • Setting up deployment hooks to generate .apk files in Github releases
  • Setting Play Store publising API to publish apk to Play Store from Travis automatically

Code Coverage

  • Codecov.io / Coveralls integration for code coverage view
  • Code Coverage reports and viewing on Android Studio
  • Coverage for Instrumentation Tests (custom Jacoco tasks in Gradle)


  • Android Studio 1.8 or above
  • Android SDK API 16 or above
  • Github Account

Speaker bio

Currently I teach Android Application Development at CodingBlocks, a programming bootcamp startup.
I have been a Developer and Device Maintainer at CyanogenMod and AOKP, building latest Android images for Sony Xperia devices, while adding awesome usability features that make users fall in love. A couple of features I have written have also made their way into Google’s Android Open Source Project, and can be found in Kitkat and Android L.
I have been a Open Source community partner with Sony Mobile for the last two years, which basically means I get the latest Xperias to hack around with as soon as they are launched.
While working at Cube26, I have been part of the team that made many contextually smart UI/UX enhacements for the Micromax Canvas A290, A310, A315 series of phones.
I am also an open source enthusiast with contributions to Linux, GNOME, Arduino, Android and other open source projects, and a Google Summer of Code alumnus.
Have been a speaker at Mobile Developer Summit 2014, and DroidCon 2014, 2015.


{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

droidconIN is an annual conference on Android, part of the worldwide series of events. more