Example of android command line unit testing under the MVP approach
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
app
gradle/wrapper
tests
.gitignore
LICENSE.txt
MVPTest.iml
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Description

This repo gives example on how to do unit testing under the MVP approach on Android.

The tools involved are:

I also included Cobertura in this repo since it helps if you want to analyze the test coverage.

The gradle plugin is Kageiit's Gradle Robojava Plugin

Motivation

Unit testing on android is hard and usually requires you to use a device or emulator. Robolectric helps us to do a headless testing so we can do quick TDD iteration that can boost the code quality

However, most available references are not that clear. This repo gives you an example on how you can do unit testing from command line leveraging gradle.

Installation

To try out this repo simple clone this repo.

$ git clone git@github.com:femmerling/MVPTest.git

And then

$ cd MVPTest

To run tests simply run

$ ./gradlew test