Top "Robolectric" questions

Robolectric is a unit testing framework that allows Android applications to be tested on the JVM in seconds without using an emulator or device.

How to add Java 9 to Android Studio?

I am using Robolectric library and the latest version of it v4.3.1 requires Java 9 to run. I am trying to …

java android android-studio robolectric robolectric-gradle-plugin
Robolectric unit tests fail after Multidex

So I recently merged my robolectric 3.0 upgrade with our mainline, which had added multidex support to our application. Unfortunately, this …

android gradle robolectric android-multidex robolectric-gradle-plugin
Android: Unit testing Android applications with Robolectric and Mockito

I have a Java library that uses a few things from the Android APIs. I'd like to use Mockito to …

android unit-testing mockito robolectric
Android http testing with Robolectric

I have an Android app where the main part of the app is the APIcalls.java class where I make …

android robolectric android-testing
Using assets in robolectric tests

In my robolectric tests I am trying to read a file. Since this file contains just the test data I …

android robolectric android-testing
How do you force a configuration change in an Android Robolectric test?

I'm using robolectric to make my android unit tests fast enough to be useful. I want to test that code …

android unit-testing screen-orientation robolectric