CI, Unit Testing and Code Coverage in Android
Submitted by Arnav Gupta (@championswimmer) on Friday, 1 July 2016
Full talk (40 minutes)
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)
- Unit Testing (JUnit4 style)
- Instrumentation Testing (Android Test Support Library)
- Android Framework mocking tools (mockable-android.jar, Robolectric)
- UI Testing (Espresso, UIAutomator)
- 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
- 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
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.