robolectric

Android Unit Testing Framework

OTHER License

Stars
5.8K
Committers
672

Bot releases are visible (Hide)

robolectric - Robolectric 2.1

Published by erd almost 11 years ago

Features

  • Layout inflation is now handled by real Android OS code.
  • Improved support for “style” attribute and theme queries in layout attributes.
  • Implemented AssetManager.openXmlResourceParser().
  • Support for using disk-based SQLite databases.

Bug Fixes

  • ActionBarSherlock should work, pretty much.
  • Fixed bugs in Handler.sendMessageAtTime(), and various timing issues.
  • Numerous other fixes and improvements from the Robolectric community! Thank you contributors!
robolectric - Robolectric 2.2

Published by erd almost 11 years ago

We are happy to announce that the latest version of Robolectric, 2.2, has been released. This release represents several months of work by the Robolectric team and includes some notable improvements. Most interesting is that we've moved one step closer to "Android Reality" by removing one of the main fake pieces of Robolectric — the RoboWindow. We now use the real implementation of Window from the AOSP sources. This has far-reaching consequences but the main one is that we now support the native ActionBar. Your code can now call getActionBar() without getting back a null, and you'll be able to interact with an ActionBar in your tests as well.

Features

  • Robolectric now does not have a fake implementation of Window (RoboWindow). It has been removed and we now use the internal PhoneWindow class. This allows the getActionBar()method in Activity to return a real ActionBar implementation in tests.
  • To create and manage Activity instances, you must now use the ActivityController interface (see Robolectric.buildActivity()).
  • Added visible() method to ActivityController. visible() must be called on an activity in order for View.isShown() to report back anything but false, since it hooks up the Activity's view hierarchy to the WindowManager.
  • Some shadows were removed (ShadowListActivity)

Bug Fixes

  • Animation.hasEnded() works as expected.
  • AsyncTasks no longer swallow exceptions that are thrown during onPostExecute().
  • Context.startActivity() calls can now optionally check if the specified Activity is in thePackageManager using Robolectric.checkActivities(true).
  • Many many issues fixed.
  • Better support for Windows development environments.
  • Documentation updates!