AndroidStudioAndRobolectric

Minimal Robolectric and Android Studio example

  • Owner: nenick/AndroidStudioAndRobolectric
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

AndroidStudioAndRobolectric

Get Started on command-line

  1. Just clone.
  2. Go into the project directory.
  3. Run ./gradlew test and get started with robolectric.

Get Started with Android Studio

  1. Import 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.

More example project setups

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

Library depends on other android libraries

Here a special example when the library has aar dependencies https://github.com/nenick/AndroidStudioAndRobolectric/tree/library-with-aar

Separate Test Module

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

"THE BEER-WARE LICENSE":
As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. Nico Küchler

Main metrics

Overview
Name With Ownernenick/AndroidStudioAndRobolectric
Primary LanguageJava
Program languageJava (Language Count: 1)
Platform
License:
所有者活动
Created At2015-02-07 16:52:38
Pushed At2016-11-16 20:06:39
Last Commit At2016-11-16 21:06:39
Release Count0
用户参与
Stargazers Count139
Watchers Count10
Fork Count28
Commits Count62
Has Issues Enabled
Issues Count24
Issue Open Count11
Pull Requests Count2
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private