Skip to content
Nico Küchler edited this page Jun 22, 2014 · 10 revisions

Welcome to the android-gradle-template wiki!

Milestones

  1. (done) working setup android studio + gradle + espresso + robolectric
  2. (done) extended app sample with database access
  • (done) test automation with code coverage
  • (done) decent test coverage with unit, component and acceptance tests
  • (done) http calls with android annotations + wiremock + improve rest communication http://android-restful-pattern.blogspot.de/ https://github.com/posco2k8/rest_loader_tutorial
  • (done) 3 week journey to USA west coast
  • (in progress) update dependencies like build tools
  • (plan) more component tests
  • (plan) more acceptance tests
  • (plan) measure memory usage, i believe there is a memory leak
  • (plan) fragment activity example with unit, component and acceptance tests
  • (plan) example what i mean with the experimental acceptance test with robolectric
  • (plan) ...

Test variants

unit test Test with mocks for all class dependencies. For testing direct database operations i don't like to mock the real database. Database is fast enough for unit tests and writing cursor mocks need much effort. Database tests are done here too.

component test Put app components under test. It's your decision, what you call a component. Good approaches maybe Activities, Fragments, (any other ideas?), ...

experimental For apps designed with single activity to handle all fragments. Try writing tests as component test like you will write they in espresso. This should work and is very fast, but not suggested by google coding guides and not from the robolectric programmer.

acceptance tests Instrument your app with espresso to show that your app may handle the basic work flows correctly on one or all your device variants.

See also my inspiration sources

Quality-Tools-for-Android

deckard-gradle

android-tdd-playground

Clone this wiki locally