Bot releases are hidden (Show)
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 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 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!
Published by xian almost 6 years ago
Robolectric 4.0.1 fixes several bugs in 4.0:
PackageParser
in binary resources mode [issue #4026].Activity.getLifecycle().getCurrentState()==CREATED
although activity is resumed [issue #4038].WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
Use Robolectric:
testCompile "org.robolectric:robolectric:4.0.1"
Getting Started | Migrating | Report Issues. Enjoy!
Published by xian almost 6 years ago
Robolectric 4.0 brings support for the Android P (SDK 28) release, new and improved support and testing APIs for dozens of Android classes, initial support for some androidx-test
APIs, and a complete rewrite of the resource handling code making it behave much more like a real Android device.
With the major version number bump to 4.0, we're making changes to some public APIs, detailed below. Check out the migration notes and use the new automated migration tool to help convert your existing tests to be compatible with Robolectric 4.0.
@Implementation
methods in shadow classes are now protected
instead of public
. Tests should always prefer to call SDK methods directly on Android classes rather than on their shadows [issue #4007].RuntimeEnvironment.application
has been deprecated, use androidx.test.core.app.ApplicationProvider.getApplicationContext()
instead.AutoCloseable
is now supported. In earlier versions of Robolectric, try-with-resources blocks would fail to call close()
on the resource.In conjunction with Android Studio 3.2, Robolectric can now use resources processed using the Android build toolchain, and loads and handles those resources using the same logic as on an actual Android device. Robolectric’s old idiosyncratic resource handling mode is still available for projects not yet using the latest version of the build toolchain, but is now deprecated.
ActivityManager.getAppTasks()
ApplicationPackageManager
content providers, canRequestPackageInstalls()
AppOpsManager
AsyncQueryHandler
AudioManager.getActivePlaybackConfiguration()
BackupManager
BluetoothAdapter
profile connection state and bond stateBuild.getSerial()
CameraManager
and CameraCharacteristics
Camera.Parameters
preview sizesCarrierConfigManager.getConfigForSubId()
ConnectivityManager
support for NetworkCapabilities
, requestNetwork()
.ContentResolver.openOutputStream()
, 'getSyncAdapterTypes()'Context.bindServiceAsUser()
DevicePolicyManager.setUserProvisioningState()
EuiccManager
FontFamily
AccessibilityNodeInfo
NotificationManager
support for AutomaticZenRule
sPackageManager.checkPermission()
checks PackageInfo.requestedPermissionsFlags
to determine if a permission is granted.Path
, PathMeasure
, and PathParser
SensorManager
Service.stopSelfResult()
ShadowSensor.newInstance()
Sms
SoundPool
now records more details when play()
is called.StorageManager
test API for adding volumes.SubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex()
, getActiveSubscriptionInfoCount()
etc., 'getDefaultSubscriptionId()'SystemClock.elapsedRealtimeNanos()
and currentNetworkTimeMillis()
TelecomManager.silenceRinger()
TelephonyManager.getSubscriberId()
, getSimSerialNumber()
, 'getVoiceNetworkType()'TextToSpeech
Tile
and TileService
minimal implementationTimeZoneFinder
UsbManager
UserManager
now supports multiple users.UserStatsManager
test API: ShadowUserStatsManager.simulateTimeChange()
; use EventBuilder
can be used to return arbitrary eventsVMRuntime.is64Bit()
, ShadowVMRuntime.setIs64Bit()
, ShadowBuild.setSupported64BitAbis()
WebStorage
WebView.saveState()
and restoreState()
WifiManager.connect(int, ActionListener)
RoboCursor.getLong()
.Looper.myLooper()
@Config(qualifiers)
.ShadowMediaBrowserCompat
. Also added easy ways to create MediaItem
s and get all created MediaItem
s with their parent-child relationships [thanks Jehron Petty and Noah Luddy!].
getRoot()
, getItem()
, subscribe()
, and search()
can only be called successfully after ShadowMediaBroswserCompat.connect()
is called.root_id
. This is what will be returned by getRoot()
by default. The root id can be changed with setRootId()
. Note that if the root is created with createMediaItem()
, setRootId()
must also be called with the same mediaId
.getSessionToken()
method in ShadowMediaBrowserCompat
. Follow issue #3962 for updates.@Implementation
methods against SDKs [Issue #3952]androidx.test
's ActivityScenario
API.ShadowBitmap.(set|is)Premultiplied()
and ShadowWebView.copyBackForwardList()
ActivityScenario
support [Issue #4022]View.post()
and postDelayed()
. now more properly return true
, which fixes a bug that sometimes caused duplicate tap events to be delivered.ShadowApplication.getInstance()
ShadowLooper.getShadowMainLooper()
Config(packageName)
ShadowContentResolver.clearContentObservers()
ShadowAlertDialog.getShadowAlertController()
with getAlertController()
RobolectricTestRunner
methodsShadowAccountManager.get()
ShadowKeyguardManager.setinRestrictedInputMode()
ShadowNetworkInfo.newInstance()
ShadowGradientDrawable.getColor()
with getLastSetColor()
WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
Use Robolectric:
testCompile "org.robolectric:robolectric:4.0"
Find more details here. Report issues here. Enjoy!
Published by xian almost 6 years ago
NOTE: Robolectric 4.0-beta-3 is a outdated release candidate; please use 4.0 instead.
Published by xian about 6 years ago
NOTE: Robolectric 4.0-beta-1 is a outdated release candidate; please use 4.0 instead.
Published by xian over 6 years ago
NOTE: Robolectric 4.0-alpha-2 is a outdated release candidate; please use 4.0 instead.
Published by jongerrish over 6 years ago
Robolectric 3.7 brings simulation improvements and better shadow support as well as numerous other fixes and improvements.
This is the second of several releases in which we're replacing Robolectric's hacked-together approximations of the Android resource management code with actual code from the framework. The result should be a vastly more correct Android simulation.
FingerprintManager
, KeyguardManager
, SearchManager
, ShortcutManager
, UsbManager
, RestrictionsManager
, TextClassificationManager
, and AutofillManager
.PackageManager
, using much more actual Android framework code for manifest parsing.UserManager
, WifiManager
, TelephonyManager
, and DevicePolicyManager
.@Implementation
methods can and should now be protected.ActivityTestRule
and Espresso Intents.com.android.support.test:monitor:1.0.2-alpha1
. If your project already depends on com.android.support.test.*
, you should upgrade to 1.0.2-alpha1 to avoid potential conflicts e.g. java.lang.VerifyError: class org.robolectric.android.fakes.RoboMonitoringInstrumentation overrides final method specifyDexMakerCacheProperty
.public
to protected
. Your test code may have been calling these erroneously instead of calling the Android SDK method, e.g: preferPackageManager.getPackageInfo()
to ShadowPackageManager.getPackageInfo()
. This is easily fixed by calling the SDK method instead.AndroidManifest
has been removed; instead, use PackageManager
APIs.ShadowApplication.getReceiversForIntent()
and hasReceiversForIntent()
are deprecated; use PackageManager
APIs instead.ShadowUserManager.setSerlialNumberForUser()
is deprecated; use addUserProfile()
instead.@Implementation(inheritImplementationMethods = true)
is largely unnecessary and will be removed in a forthcoming release.equals/hashcode/toString
support in cases where the method exists only on a parent of the shadowed class is deprecated. Don't shadow equals()
for the purposes of testing or assertions, rather only for simulation equivalency.RoboLayoutInflater
is deprecated; use LayoutInflater
instead.RoboVibrator
is deprecated, functionality has moved to ShadowVibrator
.FingerprintManager
[issue #3266—thanks @andreszamoraglobant].ShadowMatrix
does not implement map* methods [issue #3602—thanks @Kalabasa].WifiManager
throws NPE [issue #3655—thanks @qsjh898].ShadowAccessibilityNodeInfo.equals()
test to use a unique source ID
[issue #3623].@Implementation
methods to be protected instead of public [issue #3130].ManifestIdentifier.create()
[issue #3634].minSdkVersion
should be Jelly Bean (16), not 1 [issue #3650].ManifestFactory.create()
[issue #3636].@Config
[issue #3667].ShadowPackageManager#setQueryIntentImplicitly
[issue #3672].ATSL
support as an optional dependency [issue #3679].getFromLocation
on ShadowGeocoder
[issue #3678—thanks @josecoelho].@Implementation
method resolution [issue #3705].RGBA_F16
to getBytesPerPixel
in ShadowBitmap
[issue #3687].Parcel.readByteArray()
[issue #3710—thanks @cesar1000].ShadowMatrix
mapPoints
and mapVectors
[issue #3609—thanks @Kalabasa].AndroidManifest
from shadows [issue #3682].UserManager
simulation improvements [issue #3681].PackageManager
[issue #3680].ShadowActivityThreadTest
[issue #3717].ConfigMerger
to be overridden [issue #3713].ShadowTelephonyManager.setIsSmsCapable
[issue #3702].FingerprintManager
[issue #3696].ConnectivityManager.OnNetworkActiveLi
… [issue #3694].RoboInstrumentation
and code cleanup [issue #3690].android.net.INetworkPolicyManager
to ServiceManager
[issue #3689].InstrumentationRegistryTest
when running on device [issue #3686].ActivityTestRule
support [issue #3685].KeyguardManager
simulation improvements [issue #3644].UserManager
simulation enhancements [issue #3643].UserManager.getApplicationRestrictions()
[issue #3637].DevicePolicyManager
simulation enhancements [issue #3675].JDK
version, Robolectric requires Java 8 anyway [issue #3669].activityInfo.exported
and permission and add ShadowPackageManager.getIntentFiltersForXXX
APIs [issue #3666].UserManager
simulation enhancements [issue #3662].RestrictionsMananger
support getManifestRestrictions()
[issue #3660].KeyguardManager
simulation improvements [issue #3658].RestrictionsManager
[issue #3656].ProxyMaker
to use reflection to run on ART API < 26 [issue #3649].UserManager
simulation enhancements [issue #3648].ShadowsAdapter
APIs [issue #3627].@Deprecated
TestLifeCycle.createApplication()
[issue #3624].Robolectric.getShadowsAdapter()
[issue #3622].KeyguardManager
's isKeyguardSecure()
is API 16 [issue #3631].RuntimeEnvironment.getAppManifest
[issue #3628].SQLiteDatabaseTest
[issue #3444].InstrumentingClassLoader.getCommonSuperClass()
[issue #3726].WORKSPACE
file and fix path [issue #3735—thanks @dkelmer].WifiManager
simulation enhancements [issue #3727].@Implementation
methods protected [issue #3724].NPE
when dereferencing [issue #3739].ShadowCanvas
[issue #3521—thanks @cesar1000].ATSL
Intents verification API on Robolectric [issue #3728].RobolayoutInflator
with PhoneLayoutInflator
as per framework [issue #3741].ShadowPorterDuffColorFilter
[issue #3522—thanks @cesar1000].ShadowToast
to check whether a toast was cancelled [issue #3711—thanks @cesar1000].SharedPreferences
will not persist edits across getSharedPreferences
calls [issue #3510—thanks @setheclark].SharedPreferences
' commit() hangs if executed after apply() on Android O [issue #3641—thanks @kzaikin].BadParcelableException
when unmarshalling Parcelable extending class [issue #2398—thanks @menny].WARNINGs
[issue #3646—thanks @XinyueZ].Use Robolectric:
testCompile "org.robolectric:robolectric:3.7"
Find more details here. Report issues here. Enjoy!
Published by xian almost 7 years ago
Robolectric 3.6.1 fixes a couple small issues in 3.6.
android.support.test
's InstrumentationRegistry
and ActivityTestRule
for now, didn't work with Android Gradle Plugin 2.x [issue #3614].Use Robolectric:
testCompile "org.robolectric:robolectric:3.6.1"
Find more details here. Report issues here. Enjoy!
Published by xian almost 7 years ago
Robolectric 3.6 provides enhanced device configuration, fixes lots of idiosyncrasies in how resources were picked based on device configuration, and includes numerous other fixes and improvements.
This is the first of several releases in which we're replacing Robolectric's hacked-together approximations of the Android resource management code with actual code from the framework. The result should be a vastly more correct Android simulation.
@Config(qualifiers="...")
are used to configure the virtual device's simulated locale, display, and hardware for the test.Display
and DisplayMetrics
now match the device's configuration.ShadowDeviceManager#addDisplay()
et al.Build
constants and ActivityManager.isLowRamDevice
[issue #3576].android.support.test
's InstrumentationRegistry
and ActivityTestRule
[issue #3568 and #3578].SmsManager
[issue #3561].ConnectivityManager
to bind networks [issue #3539].ContextImpl.getSystemService(Context.CAPTIONING_SERVICE)
[issue #3527].PackageManager.queryIntentServicesAsUser()
[issue #3597].ICU
[issue #3553].AppOpsManager
and CaptioningManager
[issues #3494 and #3527].context.startForegroundService()
[issue #3517].anydpi
and nodpi
may no longer be specified as @Config(qualifiers)
. SDKs which are able to render vector drawables will match anydpi
drawables.ContentObserver
s now respect notifyForDescendents
[issue #3544].AssetManager.open()
and list()
now include assets from libraries [issue #3605].AlarmClockInfo
to AlarmManager
[issue #3483].PackageManager
now handles the MATCH_DISABLED_COMPONENTS
flag [issue #3499].Log.getLogsForTag()
returns empty list instead of null
if no logs with that tag are present [issue #3550].ActivityController
lifecycle handling [issue #3591].AccountManageFuture.isDone()
no longer returns true on failure [issue #3603].AccessibilityNodeInfo
child comparing children [issues #3589 and #3579].PackageManager.getResolveInfo()
[issue #3513].PendingIntent
[issue #3465].TestLifecycle.createApplication()
[issue #3555].ShadowPackageManager.setQueryIntentImplicitly()
[issue #3584].ShadowsAdapter
and Robolectric.getShadowsAdapter()`: access shadows directly instead.Qualifiers
: use @Config(qualifiers)
and related Android platform APIs instead.Display
: eg. ShadowApplication.setDefaultDisplay()
, ShadowDisplay.setDisplayId()
: use @Config(qualifiers)
or RuntimeEnvironment.setQualifiers()
instead.Use Robolectric:
testCompile "org.robolectric:robolectric:3.6"
Find more details here. Report issues here. Enjoy!
Published by xian almost 7 years ago
NOTE: Robolectric 3.6-alpha-1 is a outdated release candidate; please use 3.6 instead.