/AndroidStudioAndRobolectric

Minimal Robolectric and Android Studio example

Primary LanguageJava

AndroidStudioAndRobolectric

For details see http://nenick-android.blogspot.de/2015/02/android-studio-110-beta-4-and.html

Get Started

  1. Just clone and open this project with Android Studio
  2. Change the Build Variant // Test Artifact to Unit Test (http://tools.android.com/tech-docs/unit-testing-support)
  3. Right click on a test and get started with robolectric.

Flavors

Here an example with flavors https://github.com/nenick/AndroidStudioAndRobolectric/tree/flavors

Multi Modules (Android Library)

Here an example with android library module https://github.com/nenick/AndroidStudioAndRobolectric/tree/library

Separate Test Module

For some use cases it is great to split tests in different modules https://github.com/nenick/android-gradle-template