Bot releases are visible (Hide)
Published by hoisie about 4 years ago
NOTE: Robolectric 4.4-alpha-5 is a outdated preview release; please use 4.4-beta or later instead.
Published by hoisie about 4 years ago
NOTE: Robolectric 4.4-alpha-5 is a outdated preview release; please use 4.4 or later instead.
Published by hoisie about 4 years ago
NOTE: Robolectric 4.4-alpha-2 is a outdated preview release; please use 4.4 or later instead.
Published by hoisie over 4 years ago
NOTE: Robolectric 4.4-alpha-1 is a outdated preview release; please use 4.4 or later instead.
Published by brettchabot about 5 years ago
Robolectric 4.3.1 adds support for Android API 29 (Q final).
Published by brettchabot over 5 years ago
This release introduces a new PAUSED Looper mode, enhanced Espresso compatibility, support for Android Q Beta 2, and numerous SDK support improvements and bug fixes
PAUSED
Looper
mode.ShadowApplicationPackageManager.getLeanbackLaunchIntentForPackage()
(wraps getLaunchIntentForPackage()
) [c16c3bf1b]Looper
APIs for retrieving the scheduled time for tasks. [6494bdec3]TotalCaptureResult
. [8e1e585d4]ShadowLooper#isIdle
[f4a5d49bf]PAUSED
looper mode. [d29bf898b]get
/setLockTaskPackages
support to DevicePolicyManager
[b1ecc5a1b]ShadowSubscriptionManager#getAvailableSubscriptionInfoList
- ShadowSubscriptionManager#setAvailableSubscriptionInfoList
- ShadowSubscriptionManager#setAvailableSubscriptionInfos
- SubscriptionInfoBuilder#setMnc
[95bac4a59]ShadowLocationManager
to respect LOCATION_MODE
. [348d0d256]ActivityController#recreate
aware of the current lifecycle state [7cc5b4240]ActivityManager#isBackgroundRestricted()
[4cbe3493a]UiModeManager
[78a4eecc2]OsConstants
errno
values [aeadc2919]ShadowBluetoothGatt.connect()
[8cffa2914]SubscriptionManager.getPhoneId()
with a map between subscription IDs and phone IDs. [01ea6800f]ShadowCameraManager
. [f25ec775e]ShadowContextWrapper
to expose the options of the most recently started activity [da1bace63]setInMultiWindowMode()
to change multi window state for ShadowActivity
. [9b2af0b0a]setProfileClass
& setIsEmbedded
in SubscriptionInfoBuilder
[4c746118a]EuiccManager#getEid
in ShadowEuiccManager
[e64f675dd]ShadowSliceManager.getPinnedSlices()
. [2f7aa83d3]setSeedAccountType()
for ShadowUserManager
[70d712f1d]ColorDisplayManager
per-app grayscale [095c527bc]ShadowApplication#clearRegisteredReceivers
helper method [c0d171989]ShadowBroadcastReceiver
to allow testing async receivers [78c39985a]supportsMultipleUsers()
& setSupportsMultipleUsers()
for ShadowUserManager
[50ec6ed51]ShadowWakeLock
[3137c1cf8]createConfirmFactoryResetCredentialIntent
to ShadowKeyguardManager
[1d200339f]ShadowInputDevice
: Add shadow implementation for the getProductId()
and getVendorId()
methods. [8aa09a5bd]switchUser(UserHandle)
for ShadowActivityManager
[7a6379688]NetworkCapabilities
. The current implementation only overrides fetching and updation of transport. [d432dcfce]ShadowEvent
to set thread id as well. [ff8472301]@Implementation
of goBackOrForward(steps)
to ShadowWebView
[a61692694]SigningInfo
, which was added in API 28. [dd1d40849]ShadowBinder.setCallingUserHandle()
/ Binder.getCallingUserHandle()
[aaa393bb9]ShadowBluetoothDevice.connectGatt()
overloads. [7d95ef401]AccountManager.removeAccount(...)
with Activity
parameter. [63816d7ff]ShadowMediaPlayer.setDataSource(MediaDataSource)
[c3037c18e]MediaPlayer.setDataSource(MediaDataSource)
[2876f578b]getDefault{X}SubscriptionId()
equivalents for older versions of Android to ShadowSubscriptionManager
. [daa72ae65]TextView
s in Robolectric [9bfa258b2]AndroidEnvironment
and ClassInstrumentor
[3604e4216]TextView
s in Robolectric [9bfa258b2]androidx.room.CoroutinesRoom$Companion
. [6d246391f]CachedDependencyResolverFileCacheTest
flakiness by increasing valid cache time. [10acb64c5]LocalActivityInvoker
to RoboMonitoringInstrumentation
. [017559d64]@Deprecate
a bunch of methods in ShadowView
where alternatives exist in Espresso [312376dd1](Android)?Environment
to (Android)?TestEnvironment
. [6308e4f44] [issue #4850]SupportFragmentTestUtil
call when looper mode is PAUSED
. [78d27a92b]ShadowRenderNode
[77405621c]setExecutor
shadow API [1e2c79c61]ShadowNativeAllocationRegistry
to use loose signatures [5409c0d9f]LooperMode
configurer annotation. [8e26be1c7]callThroughByDefault
for NativeAllocationRegistry
, and explicitly shadow methods instead. [1f5f0fe0b]ShadowAppOpsManager#toOpEntry
to be overridden, and make TestUtil
use injected DependencyResolver
and SdkProvider
. [adad50341]ThrowableSubject.hasMessageThat()
. [729acc293]Util.sneakyThrow()
disrupts program flow. [316e3f07a]ShadowHandler
- it is an empty implementation now. [bcbf11dca]ShadowAppOpsManager.toOpEntry()
compilation. [37d9948a4]postCreate()
and start() in ActivityController#recreate
. See https://developer.android.com/reference/android/app/Activity.html#onPostCreate%28android.os.Bundle%29 [0cbe259fc]ShadowProviders
via Injector
. [0e4184c86]BuildCompat
[cf3a057a6]postCreate()
and start()
in LocalActivityInvoker
. See https://developer.android.com/reference/android/app/Activity.html#onPostCreate%28android.os.Bundle%29 [d64534c27]Activity.recreate()
should call back to the ActivityController
to handle the recreation. This is because we wish to simulate real Android which schedules the activity for recreation with a new instance by the framework. [84f330f7e]DisplayConfig.address
for now. [444300249]Unsafe
[13cc3ef8c]RuntimeException
when Activity
cannot be resolved. [5923f510b]DefaultSdkProvider
to allow plugins to customize. [d43598f38]ShadowExifInterface
to allow calling actual methods. [2127bbfcd]WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
. Android Gradle Plugin 3.4 will resolve this issue.testCompile "org.robolectric:robolectric:4.3"
Find more details here. Report issues here. Enjoy!
Published by brettchabot over 5 years ago
NOTE: Robolectric 4.3-beta-1 is a outdated preview release; please use 4.3 or later instead.
Published by brettchabot over 5 years ago
NOTE: Robolectric 4.3-alpha-3 is a outdated preview release; please use 4.3 or later instead.
Published by xian over 5 years ago
NOTE: Robolectric 4.3-alpha-2 is a outdated preview release; please use 4.3 or later instead.
Published by xian over 5 years ago
This release introduces a new extension mechanism for Robolectric, fixes a major performance regression in 4.x, and includes numerous SDK support improvements and bug fixes.
RoboMonitoringInstrumentation
[4c7f96820].WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
. Android Gradle Plugin 3.4 will resolve this issue.testCompile "org.robolectric:robolectric:4.2.1"
Find more details here. Report issues here. Enjoy!
Published by xian over 5 years ago
NOTE: Robolectric 4.3-alpha-1 is a outdated preview release; please use 4.3-alpha-2 or later instead.
Published by xian over 5 years ago
This release introduces a new extension mechanism for Robolectric, fixes a major performance regression in 4.x, and includes numerous SDK support improvements and bug fixes.
RobolectricTestRunner
, providing system properties, etc.). The old mechanisms are deprecated and will eventually be removed; let us know if there are missing extension points you need. See org.robolectric.pluginapi for more details [issue #4362].PackageManager
is moving to returning defensive immutable copies of its internal data (as on a real device). A series of new testing APIs have been added to modify the package under test; see PackageManager.addOrUpdateActivity()
and removeActivity()
, plus Service
, ContentProvider
, and BroadcastReceiver
equivalents [issue #4489].PackageManager.isSafeMode()
[issue #4526].ShadowDisplayManager.getSaturationLevel()
is now an instance method [issue #4522].slotId
based getImei()
and getMeid()
to TelephonyManager
[issue #4521].TelephonyManager.getListenersForFlags
in tests [issue #4469].TelephonyManager.getVisualVoicemailPackageName()
[issue #4444].APIs
for BluetoothSocket
and BluetoothServerSocket
connections [issue #4510].BluetoothLeAdvertiser
[issues #4478 and #4454].BluetoothHeadset.getConnectedDevices()
, getConnectionState()
, and sendVendorSpecificResultCode()
, with test APIs [issue #4442].ActivityManager#getCurrentUser()
[issue #4483].UserManager
UserManager.getUserSerialNumber()
[issue #4501].UserManager#addUser
returns a UserHandle
to the user it creates [issue #4449].isRestrictedProfile()
and setIsRestrictedProfile()
[issue #4554].Context.sendBroadcastAsUser
[issue #4486].WindowManagerImpl#removeViewImmediate(View)
[issue #4447].SensorManager.registerListener()
: [issue #4446].NetworkScoreManager.disableScoring()
and isScoringEnabled()
to [issue #4436].DevicePolicyManager
now enforces password restrictions [issues #4532, #4545, and #4539].UiModeManager
[issue #4548].AccessibilityManager#addAccessibilityStateChangeListener(AccessibilityStateChangeListener
, Handler) [issue #4448].ParcelFileDescriptor.createReliablePipe
method [issue #4562].WifiRttManager
and RangingResult
[issue #4561].Sensor
wake-up mode [issue #4558].PowerManager.WakeLock
getTimesHeld()
test API to count number of times the wakelock was held [issue #4551].MediaCodec
and MediaMuxer
shadows to robolectric. The MediaCodec
shadow implements basic passthrough asynchronous encoding, and the MediaMuxer
shadow muxes input bytes directly to the file without modification [issue #4550].ShadowDevicePolicyManager
to allow uses-policy granting [issue #4546].ShadowParcel
to throw an Error instead of RuntimeException
to discourage [issue #4528].LocalActivityInvoker
anymore [issue #4582].ActivityInfo
whenever asked [issue #4580].WebView.removeJavascriptInterface
[issue #4575].ShadowDevicePolicyManager
to set storage encryption [issue #4563].LegacyDependencyResolver
javadoc)[http://robolectric.org/javadoc/4.2/org/robolectric/plugins/LegacyDependencyResolver.html] for details [issue #4599].android
system context is no longer a parent of the application context [issue #4481].LocalActivityInvoker.recreateActivity.
Before this change, it called Activity.onRetainNonConfigurationInstance()
directly to obtain nonConfigInstance
for the activity. This should've called indirectly from Activity.retainNonConfigurationInstances().
retainNonConfigurationInstances()
also creates nonConfigInstances
for fragments to prepare for the host activity recreation [issue #4511].FontsContract.getFontSync()
caused because Context.canLoadUnsafeResources()
now returns false since the context isn't a system context [issue #4517].processName
setting and add few more reasonable defaults when installing new package [issue #4465].LocationManager.setLocationEnabledForUser
[issue #4500].ShadowParcel
[issue #4468].NPE
Robolectric when a failure occurs before shadows are set up [issue #4467].AppBindData#processName
consistently with ApplicationInfo#processName
[issue #4537].NameNotFoundException
from Context.createPackageContext
for non-existing packages [issue #4527].ShadowPendingIntent
and ShadowUsageStatsManager
fields [issue #4520].Activity#isChangingConfigurations()
returning false during the recreation [issue #4540].ShadowNetwork
[issue #4464].FsFile
et al. have been removed in favor of java.nio.file.Path [issue #4265].ShadowPackageManager.addResolveInfoForIntent
is deprecated; add explicit activity declarations in your manifest, or use ShadowPackageManager.addOrUpdateActivity(ActivityInfo)
[issue #4489].setupActivity
in favor of ActivityScenario
[issue #4564].AARs
like the android plugins do (kind of) [issue #4279].API
28 image. Fix SDK
install license fail [issue #4541].TypedArray
doesn't need a shadow in binary mode [issue #4470].Sdk
from SdkConfig
[issue #4394].SdkProvider
interface [issue #4513].PerfStatsReporter
to pluginapi [issue #4471].PerfStatsCollector
retains min and max timing info for events [issue #4552].DefaultConfigMerger
[issue #4549].WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
. Android Gradle Plugin 3.4 will resolve this issue.testCompile "org.robolectric:robolectric:4.2"
Find more details here. Report issues here. Enjoy!
Published by xian over 5 years ago
NOTE: Robolectric 4.2-beta-1 is an outdated beta release; please use the latest release of 4.2 instead.
Published by xian over 5 years ago
NOTE: Robolectric 4.2-alpha-2 is an outdated alpha release; please use the latest release of 4.2 instead.
Published by xian over 5 years ago
NOTE: Robolectric 4.2-alpha-1 is an outdated alpha; please use the latest release of 4.2 instead.
Published by xian almost 6 years ago
Robolectric 4.1 has improved support for a number of androidx.test
APIs, and new and improved support and testing APIs for scores of Android classes. Robolectric also now works on Windows again, and has a bunch of other awesome bug fixes.
ShadowAccessibilityButtonController
.ShadowDevicePolicyManager.isDeviceManaged()
.androidx.test.core.app.ActivityScenario#getActivityResult
.androidx.test ActivityScenario#getResult
.ShadowActivity#getLastRequestedPermission
.ActivityManager#switchUser
.SupportFragmentController#saveInstanceState
.ShadowService#getStopSelfId
and getStopSelfResultId
.PackageManager#getPackagesForUid
.PackageManager#getResourcesForActivity
.PackageManager#isInstantApp
[issue #3991].SharedMemory#map
.ShadowTrafficStats#tagDatagramSocket
.VpnService
support.ShadowConnectivityManager#getLinkProperties
.StorageVolume
attributes via the builder.ShadowServiceManager#setServiceAvailability
.Bitmap#eraseColor
.Bitmap.createBitmap(Picture)
.GLES20 glGenFramebuffers
.Matrix#setRectToRect
.ShadowStatusBarManager#getDisableFlags
and getDisable2Flags
.AppsOpManager#noteProxOpNoThrow
.ShadowWebView#setCurrentWebViewPackage
.WifiManager#getActiveLockCount
.BluetoothSocket
.CaptioningManager
listeners.performAccessibilityShortcut
.hashCode
/toString
on subclasses [issue #3692].@Implements(inheritImplementationMethods)
[issue #3909].mapRadius
of ShadowMatrix
[issue #4055—thanks @crupest].mapRadius
for ShadowMatrix
[issue #4063—thanks @crupest].ShadowAssetManager
.ClassValueMap
exposed with newer versions of cglib with mockito.ApplicationInfo.sourceDir
for LOLLIPOP
+.androidx.test.rules.GrantPermissionRule
[issue #4133].android-all
download corruption [issue #4237].PackageManager
compatibility fixes:
ResolveInfo
and ApplicationInfo
objects.ResourcesCompat.getFont()
on API > 26.WebViewDatabase
support.ShadowSubscriptionManager
state between tests.typeText
[issue #4129].Bitmap.compress
actually write the image to the stream.androidx.test
GrantPermissionRule
[issue #4133].SupportFragmentController
call on postCreate
at correct point.getAuthToken
callback bundle if no token is available.SoundPool
callbacks for known sounds.ServiceInfo.processName
from ApplicationInfo.processName
[issue #4099].ShadowWindowManagerImpl#getViews()
for post-Lollipop.ShadowBitmapFactory.decodeByteArray()
always returns a 100x100 Bitmap [issue #4028—thanks @tryal-leaf].getLocales
in android.content.res.Configuration not mocked [issue #4015—thanks @nikoskyr].getLocales
in android.content.res.Configuration not mocked [issue #4073—thanks @ScottPierce].RuntimeException
: Failed to extractAlpha
on Bitmap [issue #2795—thanks @zhengxiaopeng].GrantPermissionRule
rule does not work on AndroidJUnit4
tests [issue #4133—thanks @goblinr].NoClassDefFound
EGLContext
error [issue #4146—thanks @jaredsburrows].ShadowKeyCharacterMap
doesn't handle '@' or '-' characters [issue #4129—thanks @aisanu].ActivityScenario.launch
fails with paused looper [issue #4157].maxParallelForks
> 1) [issue #2346—thanks @NicoloParolini].onActivityResult()
not invoked when intending() matches a component [issue #4150].IllegalStateException
: this method should only be called by Robolectric) [issue #4235—thanks @neworld].eraseColor
NPE
[issue #4289—thanks @NickButcher1].onCreate
fails [issue #4286].ApplicationInfo.sourceDir
for LOLLIPOP
+ [issue #4270].addPackage
to installPackage
in ShadowPackageManager
and deprecate.ShadowApplication.getAppWidgetManager()
.ShadowHandler
[issue #4245].ShadowSharedMemory
implementation methods protected.ShadowPackageManager#getPackageInfoForTesting
to getInternalMutablePackageInfo
.ShadowResolveInfo#setLabel
.RoboLayoutInflater
and ShadowApplication.getLayoutInflater
.WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
. Android Gradle Plugin 3.4 will resolve this issue.Published by brettchabot almost 6 years ago
NOTE: Robolectric 4.1-beta-2 is a outdated preview release; please use 4.1 instead.
Published by brettchabot almost 6 years ago
NOTE: Robolectric 4.1-alpha-1 is a outdated preview release; please use 4.1 instead.
Published by brettchabot almost 6 years ago
NOTE: Robolectric 4.1-beta-1 is a outdated preview release; please use 4.1-beta-2 instead.
Published by xian almost 6 years ago
Robolectric 4.0.2 fixes several bugs in 4.0:
Resources.getXml()
fails with Android 9/aapt2
/Studio 3.2.1 (android.content.res.Resources$NotFoundException: Resource ID #0x7f090005
) resources [issue #4082].ServiceInfo
doesn't contain processName
, causing LeakCanary
failure [issue #4090].java.lang.NoClassDefFoundError: android/text/TextUtils
[issue #4085].Resources.getFont
or ResourceCompat.getFont
[issue #3590].ShadowSmsManager
is missing a resetter for static state [issue #3811].java.lang.IllegalStateException - android.graphics.Canvas.__constructor__
[issue #4072].WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
. Android Gradle Plugin 3.3 will resolve this issue.Use Robolectric:
testCompile "org.robolectric:robolectric:4.0.2"
Getting Started | Migrating | Report Issues. Enjoy!