Bot releases are hidden (Show)
Published by xian almost 7 years ago
Robolectric 3.5.1 provides support for Android O_MR1 8.1 beta and two regression fixes.
IllegalStateException
[issue #3478].Use Robolectric:
testCompile "org.robolectric:robolectric:3.5.1"
Find more details here. Report issues here. Enjoy!
Published by xian almost 7 years ago
Robolectric 3.5 provides support for Android O 8.0.0_r4 and includes numerous fixes and improvements.
DevicePolicyManager
[issue #3325] and UsbManager
[issue #3420].Filterable
filtering are now correctly caught [issue #3331].AlarmManager
and PendingIntent
s [issue #3332].WebView
handles history more consistently [issue #3347].BroadcastReceiverData
and ServiceData
from the manifest [issue #3361].ApplicationPackageManager.getPackageUid()
[issue #3370].ContentResolver.getPersistedUriPermissions()
[issue #3400].PowerManager.isIgnoringBatteryOptimizations()
[issue #3399].KeyguardManager#isKeyguardLocked()
[issue #3401].UserManager.getSerialNumberForUser()
[issue #3406].NotificationManager.deleteNotificationChannelGroup()
[issue #3334] and createNotificationChannels()
[issue #3340].ApplicationInfo.uid
and Process.myUid()
[issue #3440].TextUtils.ellipsize()
[issue #3442].KeyguardManager
on O [issue #3454].Activity.finishAffinity()
correctly causes an activity to be marked finished [issue #3460].AsyncTask
[issue #3321].AccessibilityManager
now retains state correctly [issue #3372].res
directory no longer cause an exception [issue #3398].ManifestFactory.create()
, RuntimeEnvironment.getAppManifest()
, and ShadowApplication.getAppManifest()
[issue #3447]. AndroidManifest
itself will be deprecated soon; use PackageManager
instead.WebView.setCanGoBack()
.org.robolectric.util.SimpleFuture
[issue #3321].shadows-framework
, etc. Sorry for the thrash on this.@Implementation
(issue #3122).Use Robolectric:
testCompile "org.robolectric:robolectric:3.5"
Find more details here. Report issues here. Enjoy!
Published by hoisie about 7 years ago
Robolectric 3.4.2 updates the supported version of Android O to Developer Preview 4.
Published by xian about 7 years ago
NOTE: this release has a minor bug and has been superseded by 3.4.2.
Published by xian about 7 years ago
Robolectric 3.4 improves support for Android O Developer Preview 2, PackageManager
, and many other Android classes, and resolves numerous bugs.
NotificationManager
features added in Android O [issue #3041].BatteryManager
[issue #3006].UserManager
user restrictions [issue #3027].PowerManager.newWakeLock()
[issue 3078].BackupAgentController
test API for backup agents [issue #3016].BuildCompat
's version checking methods; Build.VERSION.CODENAME
is now correctly initialized [issue #3031].ContentResolver
.Configuration.orientation
now matches the orientation indicated by @Config(qualifiers)
[issue #3046].SharedPreferences
uses real Android SDK code rather than a shadow [issue #3051].Robolectric.setupContentProvider()
can now be called with an authority string [issue #3019].ContentProvider
s [issue #3022].SensorManager.createDirectChannel()
.get{Target|Creator}Package()
to ShadowPendingIntent
[issue #3033].PackageManager.getResourcesForApplication()
[issue #3133].PackageManager.queryPermissionsByGroup()
[issue #3160].PackageManager.getApplicationInfo()
[issue #3160].PackageManager.getProviderInfo()
[issue #3191].ShadowInputMethodManager
now supports a callback mechanism for soft input visibility changes [Issue #3136].StatFs
[issue #3128].WifiManager.getPrivilegedConfiguredNetworks()
[issue #3134].WifiManager#getWifiState()
[issue #3146].WifiManager#isScanAlwaysAvailable()
[issue #3259].queryIntentService()
from Manifest [issue #3153].UserManager.isManagedProfile()
[issue #3154].PackageInfo.name
value to ActivityInfo
[issue #3159].DownloadManager
[issue #3163].Session.abandon()
[issue #3189].JobScheduler.getPendingJob(int)
introduced in Android N [issue #3195].TempDirectory
shared across entire test env [issue #3199].AudioManager
and TelephonyManager
[issue #3255].ShadowService.foregroundStopped
is now reset when a service goes into the foreground [issue #3261].ShadowChoreographer
now allows customized delay to be specified by application for postCallback
and postFrameCallback
to avoid animation problems during test [issue #3262].listen()
behavior to ShadowTelephonyManager
[issue #3271].ShadowLog.getLogs()
and getLogsForTags()
[issue #3007].targetSdkVersion
of O
[issue #3037].Resources.openRawResource()
to throw the wrong exception for missing resources [issue #3059].ContentResolver
[issue #3067].Looper
tasks to leak between tests [issue #2963].MessageQueue
to block adding messages to the queue while a message was being handled [issue #3082].ShadowSensorManager
and ShadowNotificationManager
to be compatible with older SDK versions [issue #3103, #3101].ActivityManager.getRunningAppProcesses()
to return an empty list instead of null [issue #3124].BluetoothDevice
objects from being created [issue #3197].WifiConfiguration.toString()
[issue #3144].Choreographer
constructor for O [issue #3240].ShadowSQLiteConnection.reset
[issue #3211].res
[issue #3158].DefaultPackageManager
and RobolectricPackageManager
[issues #3203 and #3264].org.robolectric.util
controllers [issue #3087].ShadowConfiguration
[issue #3094].Transcript
[issue #3113].*LayoutParams
Shadows [issue #3118].StubPackageManager
[issue #3151].*CursorAdapter
Shadows [issue #3117].ComponentController.attach()
method [issue #3185].org.robolectric.res.builder.XmlResourceParserImpl
.build.gradle
files will need to updated accordingly. [issue #3186]:
robolectric-annotations
-> annotations
robolectric-junit
-> junit
robolectric-processor
-> processor
robolectric-resources
-> resources
robolectric-sandbox
-> sandbox
robolectric-utils
-> utils
shadows-core
-> framework
shadows-httpclient
-> httpclient
shadows-maps
-> maps
shadows-multidex
-> multidex
shadows-play-services
-> playservices
shadows-support-v4
-> supportv4
@Config
attributes that are supplied via new build system API [issue #3230].RuntimeAdapter
[issue #3218].ShadowExtractor
, AccessibilityUtil
, and RoboExecutorService
[issue #3174].Use Robolectric:
testCompile "org.robolectric:robolectric:3.4"
Find more details here. Report issues here. Migration notes here. Enjoy!
Published by xian about 7 years ago
NOTE: Robolectric 3.4-rc4 is a outdated release candidate; please use 3.4-rc5 instead.
Published by hoisie over 7 years ago
NOTE: Robolectric 3.4-rc3 is a outdated release candidate; please use 3.4-rc4 instead.
Published by hoisie over 7 years ago
NOTE: Robolectric 3.4-rc2 is a outdated release candidate; please use 3.4-rc3 instead.
Published by xian over 7 years ago
NOTE: Robolectric 3.4-rc1 is a outdated release candidate; please use 3.4-rc2 instead.
Published by jongerrish over 7 years ago
Robolectric 3.3.2 provides support for Android O Developer Preview 1, improves startup time, and resolves a licensing issue.
PackageManager
simulation: addPackage()
should not create sessions [issues #2984 and #2950].NoClassDefFoundError: javax/microedition/khronos/opengles/GL
[issues #2960 and #1932].Use Robolectric:
testCompile "org.robolectric:robolectric:3.3.2"
Find more details here. Report issues here. Enjoy!
Published by xian over 7 years ago
Robolectric 3.3.1 fixes a few bugs; details below.
Html.fromHtml()
/System.arraycopy()
bug [issue #2959].testCompile "org.robolectric:robolectric:3.3.1"
Find more details here. Report issues here. Enjoy!
Published by xian over 7 years ago
Robolectric 3.3 fixes some long-standing bugs (notably PowerMock and Mockito integration) and adds some significant new features. Details below.
<array>
resources are now supported [issue #2064].Context#getExternalFilesDirs
now supported [issue #2818].android.opengl.Matrix
[issue #2893].PackageManager
: [issue #2913].
checkSignatures()
getDefaultActivityIcon()
getInstalledApplications()
getInstallerPackageName()
and setInstallerPackageName()
getPackageSizeInfo()
(Use addPackage()
to control behavior.)getPermissionInfo()
(Use manifest or addPermissionInfo()
to control behavior.)resolveContentProvider()
AccountManager
: [issue #2906].
AccountManagerFuture
will now post their work to the specified Handler
, so it will be deferred or executed immediately depending on the state of its Scheduler
.View.getGlobalVisibleRect()
now uses the framework implementation unless setGlobalVisibleRect()
has been called.PackageManager
's behavior is moving from a subclass to a shadow. See the Migration Guide [issue #2887]RuntimeEnvironment.getPackageManager()
. Use Android APIs instead.ShadowConfiguration
. Use Configuration
directly instead.ShadowView#getQualifiers()
. Use Robolectric.getQualifiers()
instead.*Controller.withIntent()
and .attach()
[issue #2938].ShadowLocation
. Note that Location.equals()
is no longer shadowed with special equality rules. [issue #2932]ShadowNotification.getProgressBar()
, ShadowDrawable.reset()
, ShadowContentResolver.registerProvider()
, ShadowContentResolver.getContentObserver()
, ShadowImageView.getImageResourceId()
, and ShadowImageView.getImageBitmap()
[issue #2932].ShadowIntentFilter
.RoboAttributeSet
and Attribute
class. Use Robolectric.buildAttributeSet()
instead.MultiApiRobolectricTestRunner
[issue #2924].View.getWindowId()
to behave more like Android [issue #2888].BitmapRegionDecoder
[issue #2926].PackageMAnager.queryIntentContentProviders()
[issue #2927].testCompile "org.robolectric:robolectric:3.3"
Find more details here.
Published by xian over 7 years ago
RobolectricTestRunner
now supports running tests against multiple SDKs. See Configuring Robolectric for more details.Matrix
is now more fully implemented.shadowOf(matrix).getDescription()
or shadowOf(matrix).getPostOperations()
etc. instead.Bitmap
s now cause the size of the Bitmap
to change accordingly.<item type="drawable"/>
are now supported.LocationManager.requestLocationUpdates()
will only receive one notification.Parcelable.readException()
, writeInterfaceToken()
and enforceInterface()
are now implemented.drawable-hdpi
) can now be accessed using Resources.openRawResource()
.BitmapRegionDecoder
is now implemented; bitmap width and height are correctly detected.AssetManager.getThemeValue()
now honors the value of the resolveRefs
argument, and correctly handles style references to attributes in another package.ShadowIcon
provides accessors for hidden Icon
internals.JobScheduler.cancel()
and Looper.quitSafely()
are now implemented.Canvas.drawBitmap()
with destination RectF
is now implemented.IntentFilter
now uses all-framework code. Previously, equals()
and hashCode()
had a partial shadow implementation, but now they are unimplemented.RoboCursor
are now implemented.XmlPullParser.getIdAttributeResourceValue()
now resolves references.NotificationManager.getActiveNotifications()
is now implemented.UserManager.isUserUnlocked()
.ManifestFactory.identify()
won't be called with manifest = "--default"
any more.@Implements(minSdk/maxSdk)
or @Implementation(minSdk/maxSdk)
to restrict shadow classes and methods to the given Android SDK levels.ShadowIntentFilter
has been deprecated and will be removed in the next major release.RobolectricTestRunner
you'll probably need to make a few changes. See Migration Guide for details.RoboCursor
, be sure to call setColumnNames()
on it if you care about what getColumnCount()
will return later.java.util.ServiceConfigurationError: org.robolectric.internal.ShadowProvider: Provider org.robolectric.Shadows not a subtype
[issue #2737].Thanks to the many contributors to this release!
testCompile "org.robolectric:robolectric:3.2"
Find more details here.
Published by xian almost 8 years ago
M
(getResourceAsStream
is broken) [issue #2773].robolectric.properties
file is not loaded [issue #2843].ShadowLocation
has been deprecated and will be removed in a future major release.testCompile "org.robolectric:robolectric:3.2.2"
Find more details here.
Published by xian almost 8 years ago
@InjectMocks
broken [issue #2442].RoboCursor.getColumnCount()
now returns the number of columns in the result data (as before), unless you explicitly call setColumnCount()
[issue #2830].testCompile "org.robolectric:robolectric:3.2.1"
Find more details here.
Published by xian almost 8 years ago
NOTE: Robolectric 3.2-rc1 is a outdated release candidate; please use 3.2 instead.
Published by xian almost 8 years ago
This release fixes an issue that prevented running tests for projects without an explicit dependency on org.robolectric:shadows-core
. If version 3.1.3 was working for you, there'll be no changes in 3.1.4.
Published by xian almost 8 years ago
Fixed a performance regression.
Published by xian almost 8 years ago
NullPointerException
when attempting to load non-existent resource (now correctly throws ResourceNotFoundException
).Published by xian almost 8 years ago
PackageManager
is more fully implemented; e.g. you can now setPackagesForUid()
.ContentProvider
s should be created using Robolectric.buildContentProvider()
, which simulates how the framework creates them (and calls onCreate()
automatically).RoboMenuItem
s should be constructed with a context.RobolectricTestRunner
has been changed to make it easier to customize manifest loading, while retaining caching. If you have a custom test runner, you should override getManifestFactory()
instead of getAppManifest()
.robolectric.logging.enabled
system property to "true"
).