Skip to content

Robolectric 2.0

Compare
Choose a tag to compare
@erd erd released this 18 Mar 14:46
· 10409 commits to master since this release

Features

  • Support for library projects.
  • More realistic resource loading, including system resources.
  • Much better support for resource qualifiers (e.g. locale, resolution, etc.).
  • Groundwork to remove many shadows and use actual android sdk code.
  • Moved to org.robolectric package and maven groupId.
  • Switched from Javassist to ASM for bytecode manipulation: much faster.
  • All classes in android.support.* are now unshadowed and should work as expected.
  • Improved resource and library project support.
  • Massive realism upgrade.
  • Dramatically improved resource loading, with support for themes and styles.
  • Easier TestRunner setup and configuration.
  • The new @config annotation to specify config for a test class or test method:
  • The SDK level to report: @config(reportSdk=Build.VERSION_CODES.FROYO)
  • Qualifiers for resource loading: @config(qualifiers="fr-port-hdpi")
  • Custom shadow classes to enable.
  • For classes and methods that aren’t explicitly shadowed, Robolectric now calls through to the real SDK code.
  • Views now complain if you try to pass in a null Context. Don’t do it!
  • SDK method execution is now much much faster, especially in cases where we use the actual SDK code rather than a shadow (which will increasingly be the normal case).
  • Performance and memory use improvements.
  • Removed Hamcrest matchers; use fest-android instead.
  • Numerous fixes and improvements from the Robolectric community. Thank you, contributors!