Robolectric

Developer Tools

Runs Android unit tests on the JVM, without an emulator or a device.

Latest 4.17 · by RobolectricWritten in JavaWebsiterobolectric/robolectricRSS

Release activity

Release activity — 6 releases across 6 days in the last year. Each cell is one day; darker means more releases that day. Older weeks are hidden at this screen width.
JunJulAugSep
SundayNo releases on May 31, 2026No releases on Jun 7, 2026No releases on Jun 14, 2026No releases on Jun 21, 2026No releases on Jun 28, 2026No releases on Jul 5, 2026No releases on Jul 12, 2026No releases on Jul 19, 2026No releases on Jul 26, 2026No releases on Aug 2, 2026No releases on Aug 9, 2026No releases on Aug 16, 20261 release on Aug 23, 2026No releases on Aug 30, 2026No releases on Sep 6, 2026No releases on Sep 13, 2026
MondayNo releases on Jun 1, 2026No releases on Jun 8, 2026No releases on Jun 15, 2026No releases on Jun 22, 2026No releases on Jun 29, 2026No releases on Jul 6, 2026No releases on Jul 13, 2026No releases on Jul 20, 2026No releases on Jul 27, 2026No releases on Aug 3, 2026No releases on Aug 10, 2026No releases on Aug 17, 2026No releases on Aug 24, 2026No releases on Aug 31, 2026No releases on Sep 7, 2026No releases on Sep 14, 2026
TuesdayNo releases on Jun 2, 2026No releases on Jun 9, 2026No releases on Jun 16, 2026No releases on Jun 23, 2026No releases on Jun 30, 2026No releases on Jul 7, 2026No releases on Jul 14, 2026No releases on Jul 21, 2026No releases on Jul 28, 2026No releases on Aug 4, 2026No releases on Aug 11, 2026No releases on Aug 18, 2026No releases on Aug 25, 2026No releases on Sep 1, 2026No releases on Sep 8, 2026
WednesdayNo releases on Jun 3, 2026No releases on Jun 10, 2026No releases on Jun 17, 2026No releases on Jun 24, 2026No releases on Jul 1, 2026No releases on Jul 8, 20261 release on Jul 15, 2026No releases on Jul 22, 2026No releases on Jul 29, 2026No releases on Aug 5, 2026No releases on Aug 12, 2026No releases on Aug 19, 2026No releases on Aug 26, 2026No releases on Sep 2, 2026No releases on Sep 9, 2026
ThursdayNo releases on Jun 4, 2026No releases on Jun 11, 2026No releases on Jun 18, 2026No releases on Jun 25, 2026No releases on Jul 2, 2026No releases on Jul 9, 2026No releases on Jul 16, 2026No releases on Jul 23, 2026No releases on Jul 30, 2026No releases on Aug 6, 2026No releases on Aug 13, 2026No releases on Aug 20, 2026No releases on Aug 27, 2026No releases on Sep 3, 20261 release on Sep 10, 2026
FridayNo releases on Jun 5, 2026No releases on Jun 12, 2026No releases on Jun 19, 2026No releases on Jun 26, 2026No releases on Jul 3, 2026No releases on Jul 10, 2026No releases on Jul 17, 2026No releases on Jul 24, 2026No releases on Jul 31, 2026No releases on Aug 7, 2026No releases on Aug 14, 20261 release on Aug 21, 2026No releases on Aug 28, 2026No releases on Sep 4, 2026No releases on Sep 11, 2026
SaturdayNo releases on Jun 6, 2026No releases on Jun 13, 2026No releases on Jun 20, 2026No releases on Jun 27, 2026No releases on Jul 4, 2026No releases on Jul 11, 20261 release on Jul 18, 2026No releases on Jul 25, 2026No releases on Aug 1, 2026No releases on Aug 8, 2026No releases on Aug 15, 2026No releases on Aug 22, 2026No releases on Aug 29, 2026No releases on Sep 5, 2026No releases on Sep 12, 2026

6 releases in the last year

Changelog

robolectric-4.17Latest

Robolectric 4.17

Added 8
  • Support for SDK 37
  • Shadow for getDeviceOwnerComponentOnAnyUser
  • ShadowTelMan implementation of get/setPreferredOpportunisticDataSubscription
  • Robolectric support for AccessibilityWindowInfo.get/setRegionInScreen()
  • Support for mouse wheel scroll events to the simulator
  • SurroundingTextCallback to ShadowAccessibilityInputConnection
  • setInformationElements() to WifiScanResultBuilder
  • isWallpaperBackupEligible and getWallpaperFile with cropping
Changed 5
  • ShadowCameraCharacteristics.set(Key, Object) has been changed to set(Key, T) to correctly reflect type enforcement in the framework
  • Make all static fields emitted by Reflector volatile
  • Update listener logic of getProfileProxy to match actual behavior
  • Update ShadowTelephonyManager to support updateAvailableNetworks
  • Make Scheduler#size as unsupported on SDKs greater than Baklava
Fixed 3
  • UiModeManager contrast handling in in-development SDK
  • ShadowPausedLooper#poll when sync barrier is blocking the queue
  • UserManager.isMainUser on in-development SDK
Removed 1
  • AndroidVersions has been removed in favor of using android.os.Build constants

From Robolectric

Robolectric 4.17 supports SDK 37 and contains many other features and enhancements.

Please note you may need to add jvmFlags configuration when using JDKs >= 17 at https://robolectric.org/getting-started/

If you have any issues, please file them here.

Breaking Changes

AndroidVersions has been removed in favor of using android.os.Build constants ShadowCameraCharacteristics.set(Key, Object) has been changed to set(Key, T), in order to correctly reflect type enforcement in the framework

What's Changed
New Contributors

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.16.1...robolectric-4.17

View originalPermalink
How robolectric-4.17 went
robolectric-4.17-beta-4Pre-release

Robolectric 4.17-beta-4

Added 1
  • Expose BouncyCastle BoM as api dependency
Fixed 2
  • Fix ResTable_package.SIZEOF value
  • Fix Javadoc for VersionCalculator

From Robolectric

Robolectric 4.17 Beta 4 is a minor release that includes the following fixes:

  • Expose BouncyCastle BoM as api dependency #11363
  • fixed ResTable_package.SIZEOF value #11331
  • Fix Javadoc for VersionCalculator

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.17-beta-3...robolectric-4.17-beta-4

View originalPermalink
How robolectric-4.17-beta-4 went
robolectric-4.17-beta-2Pre-release

Robolectric 4.17-beta-2

Changed 1
  • Enable CONSCRYPT mode for Mac arm64, making CONSCRYPT mode available for all supported platforms
Fixed 1
  • Fix issue #11345

From Robolectric

Robolectric 4.17 Beta 2 is a minor release that fixes https://github.com/robolectric/robolectric/issues/11345. It also enables CONSCRYPT mode for Mac arm64, meaning that CONSCRYPT mode is now enabled for all platforms supported by Robolectric.

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.17-beta-1...robolectric-4.17-beta-2

View originalPermalink
How robolectric-4.17-beta-2 went
robolectric-4.17-beta-1Pre-release

Robolectric 4.17-beta-1

Added 8
  • Support for SDK 37
  • Shadow for getDeviceOwnerComponentOnAnyUser
  • ShadowTelMan implementation of get/setPreferredOpportunisticDataSubscription
  • Robolectric support for AccessibilityWindowInfo.get/setRegionInScreen()
  • Support for mouse wheel scroll events to the simulator
  • SurroundingTextCallback to ShadowAccessibilityInputConnection
  • setInformationElements() to WifiScanResultBuilder
  • isWallpaperBackupEligible and getWallpaperFile with cropping
Changed 4
  • ShadowCameraCharacteristics.set(Key<T>, Object) has been changed to set(Key<T>, T) to correctly reflect type enforcement in the framework
  • Make all static fields emitted by Reflector volatile
  • Update listener logic of getProfileProxy to match actual behavior
  • Update ShadowTelephonyManager to support updateAvailalbeNetworks
Fixed 3
  • UiModeManager contrast handling in in-development SDK
  • ShadowPausedLooper#poll when sync barrier is blocking the queue
  • UserManager.isMainUser on in-development SDK
Removed 1
  • AndroidVersions has been removed in favor of using android.os.Build constants
Deprecated 1
  • Scheduler#size is unsupported on SDKs greater than Baklava

From Robolectric

Robolectric 4.17-beta-1 supports SDK 37 and contains many other features and enhancements.

Please note you may need to add jvmFlags configuration when using JDKs >= 17 at https://robolectric.org/getting-started/

If you have any issues, please file them here.

Breaking Changes
  • AndroidVersions has been removed in favor of using android.os.Build constants
  • ShadowCameraCharacteristics.set(Key, Object) has been changed to set(Key, T), in order to correctly reflect type enforcement in the framework
What's Changed
New Contributors

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.16.1...robolectric-4.17-beta-1

View originalPermalink
How robolectric-4.17-beta-1 went
robolectric-4.16.1

Robolectric 4.16.1

Changed 2
  • Updated to support the deletion of FingerprintManager in the Android Framework
  • Improved the VirtualDeviceManager shadow

From Robolectric

Robolectric 4.16.1 is a minor release that fixes some issues when Robolectric is used for Android Platform development. Most notably, it is updated to support the deletion of FingerprintManager in the Android Framework, as well as some improvements to the VirtualDeviceManager shadow.

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.16...robolectric-4.16.1

View originalPermalink
How robolectric-4.16.1 went
robolectric-4.16

Robolectric 4.16

Added 12
  • Support Android Baklava (SDK 36)
  • Add native resources mode (ResourcesMode.NATIVE) available in SDK 36
  • Add shadow for new resolveActivityAsUser variant
  • Add shadow for Equalizer
  • Add support for UiModeManager.setNightMode(UiModeManager.MODE_NIGHT_CUSTOM)
  • Add VirtualDeviceManager#getVirtualDevice(int deviceId) to ShadowVirtualDeviceManager
Changed 2
  • Require JDK 21 for running tests with SDK 36 target
  • Change ShadowChoreographer.getDefaultFrameDelay into a shadow method
Fixed 3
  • Fix ApplicationInfo inconsistencies in Robolectric
  • Fix condition in ResourceHelper#parseFloatAttribute()
  • Fix elevation in HW rendering for Android R (30) and below
Removed 1
  • Remove support for Android L (SDK 21 and 22)
Deprecated 1
  • Deprecate some Config.Builder methods

From Robolectric

Robolectric 4.16 supports Android Baklava (SDK 36), and you need to use JDK 21 if running tests with SDK 36 target. It also removes support for Android L (SDK 21 and 22).

One exciting new feature is native resources (ResourcesMode.NATIVE). Note this is currently only available in SDK 36.

If you have any issues, please file them here.

What's Changed
New Contributors

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.15.1...robolectric-4.16

View originalPermalink
How robolectric-4.16 went
robolectric-4.16-beta-1Pre-release

Robolectric 4.16-beta-1

NOTE: Robolectric 4.16-beta-1 is an outdated preview release; please use 4.16 or later instead.

View originalPermalink
How robolectric-4.16-beta-1 went
robolectric-4.15.1

Robolectric 4.15.1

Fixed 2
  • Fix onClick handler not being invoked in Compose on certain API levels
  • Remove Java 16 dependency to support Java 11 on applicable API levels

From Robolectric

Robolectric 4.15.1 is a minor release that fixes https://github.com/robolectric/robolectric/issues/9595, where the onClick handler now being invoked in Compose on certain API levels. Thanks to @GisoBartels for the fix.

It also fixes https://github.com/robolectric/robolectric/issues/10419, where a Java 16 dependency was added to Robolectric, even though many API levels should support Java 11. Thanks to @yschimke for the report and @utzcoz for the fix.

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.15...robolectric-4.15.1

View originalPermalink
How robolectric-4.15.1 went
robolectric-4.15

Robolectric 4.15

Added 1
  • Introduce the Robolectric Simulator, which makes it possible to launch an interactive preview of Android UI in a Robolectric environment
Removed 19
  • Remove AndroidManifest#supportsLegacyResourcesMode()
  • Remove AndroidManifest#supportsBinaryResourcesMode()
  • Remove ConfigMerger
  • Remove DependencyResolver#getLocalArtifactUrls(DependencyJar)
  • Remove Fs#fileFromPath(String path)
  • Remove Fs#newFile(File file)

From Robolectric

Robolectric 4.15 contains a lot of minor improvements, fidelity improvements, bug fixes, and shadow API enhancements. It also introduces the Robolectric Simulator, which makes it possible to launch an interactive preview of Android UI in a Robolectric environment.

NOTE Robolectric 4.15 does NOT support Android Baklava (SDK 36). Baklava will be supported in Robolectric 4.16.

If you encounter any issues, please file them on the GitHub issues page.

A huge thanks to @MGaetan89 and @utzcoz for all of their hard work that went into this release.

What's Changed

The following symbols have been removed in Robolectric 4.15.

Removed symbolReplacement
AndroidManifest#supportsLegacyResourcesMode()N/A
AndroidManifest#supportsBinaryResourcesMode()N/A
ConfigMergerProvider<Config>
DependencyResolver#getLocalArtifactUrls(DependencyJar)DependencyResolver#getLocalArtifactUrl(DependencyJar)
Fs#fileFromPath(String path)Fs#fromUrl(path)
Fs#newFile(File file)file.toPath() 
FsFile#getPath()Fs#externalize(this)
FsFile#join(String name)this.resolve(name)
InvokeDynamicClassInstrumentorClassInstrumentor
ManifestIdentifier(Path, Path, Path, String, List<Path>)ManifestIdentifier(String, Path, Path, Path, List<ManifestIdentifier>)
MavenManifestFactoryN/A
PackageItemData#getClassName()PackageItemData#getName()
Provider<T>javax.inject.Provider<T>
Qualifiers#addScreenWidth(String, int)Configuration#screenWidthDp
Qualifiers#addSmallestScreenWidth(String, int)Configuration#smallestScreenWidthDp
Qualifiers#getOrientation(String)Configuration#orientation
Qualifiers#getPlatformVersion(String)Build.VERSION#SDK_INT
Qualifiers#getScreenWidth(String)Configuration#screenWidthDp
Qualifiers#getSmallestScreenWidth(String)Configuration#smallestScreenWidthDp
RoboSettingsSet the specific system property directly
Scheduler#idleConstantly(boolean)Scheduler#setIdleState(IdleState)
SdkPickerDefaultSdkPicker
ShadowApplication#addWakeLock(PowerManager.WakeLock wl)ShadowPowerManager.addWakeLock(wl)
ShadowApplication#clearWakeLocks()ShadowPowerManager.clearWakeLocks()
ShadowApplication#getAppWidgetManager()Context#getSystemService(Context.APPWIDGET_SERVICE)
ShadowApplication#getBluetoothAdapter()BluetoothManager#getAdapter()
ShadowApplication#getForegroundThreadScheduler()Robolectric.getForegroundThreadScheduler()
ShadowApplication#getInstance()shadowOf(RuntimeEnvironment.getApplication())
ShadowApplication#getLatestWakeLock()ShadowPowerManager.getLatestWakeLock()
ShadowMap#convertToShadowName(String)N/A
XmlResourceParserImpl(Document, String, String, String, ResourceTable)XmlResourceParserImpl(Document, Path, String, String, ResourceTable)
List of changes
New Contributors

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.14.1...robolectric-4.15

View originalPermalink
How robolectric-4.15 went
robolectric-4.15-beta-1Pre-release

Robolectric 4.15-beta-1

NOTE: Robolectric 4.15-beta-1 is an outdated preview release; please use 4.15 or later instead.

View originalPermalink
How robolectric-4.15-beta-1 went
robolectric-4.14

Robolectric 4.14

Added 6
  • Support for Android V (SDK 35)
  • Support for RangingResult.Builder in ShadowRangingResult for Android V
  • Support for @ClassName in function return type
  • Support for ImageDecoder.createSource(File)
  • Shadow implementation for ShadowAppOpsManager.setUidMode
  • Extension API setAlias for ShadowBluetoothDevice's compatibility
Changed 6
  • Expose SimplePerfStatsReporter#finalReport
  • Make fields of ShadowBatteryManager static for context level instance
  • Update setDelegatedScopes to clear previously delegated scopes
  • Replace androidx.test.annotation.Beta with com.google.common.annotations.Beta
  • Keep parameter name of noteProxyOpNoThrow same as origin method
  • Bump Gradle to 8.9
Fixed 3
  • Skip instrumenting classes with junit methods
  • Fix XML validation error in testapp's AndroidManifest.xml
  • Add special case handling for NoClassDefError in SandboxTestRunner
Removed 4
  • Remove obsolete reference to per-sdk shadows
  • Remove google internal bug references from ExtractAarTransform
  • Remove additional unused logic for legacy resources
  • Remove looseSignatures usage from multiple shadow classes

From Robolectric

Robolectric 4.14 adds support for Android V (SDK 35)!

If you encounter any issues, please file them on the GitHub issues page.

Thanks to everyone who contributed to the release, especially our GSoC contributors @Mia0451 and @Devashishbasu!

What's Changed

Full Changelog: https://github.com/robolectric/robolectric/compare/robolectric-4.13...robolectric-4.14

View originalPermalink
How robolectric-4.14 went
View all

Discussion

If you publish Robolectric, you can claim this product by proving you administer its repository.