0

Robolectric Android Unit Testing Framework

22,335

Published on

Robolectric is a unit test framework that de-fangs the Android SDK jar so you can test-drive the development of your Android app.

Published in: Technology, Education
1 Comment
15 Likes
Statistics
Notes
  • How to write robolectric test folder inside android project using eclispe and ant build.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
22,335
On Slideshare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
292
Comments
1
Likes
15
Embeds 0
No embeds

No notes for slide
















  • vs Robotium
  • Demonstrate the tests running in IntelliJ


  • Robolectric does include Mockito, uses it sparingly.

    Robolectric is compatible with mocking frameworks!




  • Show a demonstration in IntelliJ of a fake object

  • This means you can do operations like findViewById

  • Contains a .idea directory which has all of the module dependencies configured.
    Sadly there is currently no Eclipse support - Can anyone help?




  • Why is code module separate from RobolectricSample module?


    Running tests causes a build.  When running tests in the main Android module, IntelliJ will dex the classes adding overhead and time to tests.


    By placing the application code in a separate non-Android module, IntelliJ will not perform the slow dexing step, allowing for quicker iterations.








  • the real view is helpful for calling back into listeners and such
  • helpful when calling back into listeners that want to pass the ‘real’ object to the listeners







  • the real view is helpful for calling back into listeners and such
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×