Registry / testing / robolectric

robolectric

JSON →
library4.16.1javamavenunverified

An alternative Android testing framework that runs tests on the JVM, not an emulator.

<dependency> <groupId>org.robolectric</groupId> <artifactId>robolectric</artifactId> <version>4.16.1</version> </dependency>
INSTALL
IMPORT
SIG · ROBOLECTRIC
R
robolectric
testingjavav4.16.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RobolectricTestRunner
org.robolectric.RobolectricTestRunner

Minimal test class using RobolectricTestRunner.

import org.robolectric.RobolectricTestRunner; import org.junit.runner.RunWith; @RunWith(RobolectricTestRunner.class) public class MyActivityTest { @Test public void testSomething() { // Test code here } }
Debug
Known issues
breakingRobolectric 4.x requires Android SDK 28+ and may have compatibility issues with older Android versions.
fix
Ensure your project targets Android API 28 or higher.
affects: >=4.0.0
Upgrade
Version history
4.16.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
robolectric — mvn dependency:get robolectric · libregistry