Wednesday, May 29, 2013

Robolectric 2.1

Robolectric 2.1 is released!

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!

Known Issues

  • Animations aren’t well-supported.

17 comments:

  1. So great that you are making such good progress on this!

    I'd love to see a post on writing Robolectric tests in other JVM languages. If you know of some good approaches that others are using, would love to see some links!

    ReplyDelete
  2. How about services, are those added now?

    ReplyDelete
    Replies
    1. Nothing new for services in 2.1 unfortunately.

      Delete
    2. Thanks Christian for the response, I really do appreciate it! Do you have any idea (or where I can go to learn more) about when you all are planning more stuff into Robolectric; like a road map?

      Delete
  3. This is the first time I am using Robolectric and wondering where can I find some examples on how to write CustomTestRunner for Robolectric 2.1 ?

    ReplyDelete
    Replies
    1. I'm also hoping for an updated guide to this. Struggling to figure it out at the moment, and would find a simple example really useful.

      Delete
    2. Are you trying to wire up the AndroidManifest.xml by chance? If you describe what you need or the problem you're facing, myself or another person can help you, Abhi.

      Delete
    3. I too am struggling to upgrade my current custom test runners(using Robolectric 1.2) to work the same or similarly with Robolectric 2.1. An example to start from would be very helpful and give a good starting point.

      Delete
    4. Same here. Are there any examples of test runners using the 2.1 framework? I've got several custom shadow classes I need to bind, calls to addClassOrPackageToInstrument that no longer compile, and overrides of beforeTest and afterTest that no longer have a base class implementation to override.

      Delete
  4. It looks like Robolectric 2.x more slower than 1.3. (It takes around 250-300 secs instead 40-45). Can someone explain me the reason of that?
    May be some ideas how to decrease that time?
    Thank you.

    ReplyDelete
  5. How up to date or the usage instructions for Eclipse? Seems to me some of the information is not up to date for the Robolectric 2.x series. I working a large project that lives in Eclipse with many different activities so switching to another environment is not an option.

    ReplyDelete
  6. Please provide us with more documentation + more samples. I find it very hard to setup Robolectric tests.
    There are some samples with IntelliJ and Maven but with Eclipse it seems not possible to run Robolectric tests... No to mention Gradle...

    ReplyDelete
  7. Any Documentation or examples on how to use the disk-based SQLite databases?

    ReplyDelete
  8. Is it possible to run tests via Roboelectric on emulator?

    ReplyDelete
  9. Is it possible to run tests via Roboelectric on emulator?

    ReplyDelete
  10. Is it possible to run via Roboelectric TestNG tests?

    ReplyDelete
  11. Normally I do not read article on blogs, but I wish to say that this write-up very pressured me to try and do it! Your writing taste has been amazed me. Thanks, quite great post. Visit telephone answering service for best Telephone Service.

    ReplyDelete