Challenges in writing roboelectric tests

1,545 views

Published on

Ashish from Codelearn explains what is Roboelectric and how it can be used to write Test Cases and do Test Driven Development, while also telling how Codelearn used Roboelectric Tests to build a training module for Android development

Published in: Technology, Education
  • Be the first to comment

Challenges in writing roboelectric tests

  1. 1. ROBOLECTRICTESTS how-to, challenges & everything else
  2. 2. WHAT IS ROBOLECTRIC
  3. 3. GETTING STARTED • Create Java project • Add Robolectric jars • Add android & junit jars • Add Android project as dependency • Create junit run configuration
  4. 4. ROBOLECTRIC ELEMENTS which we used for codelearn.org tutorial tests
  5. 5. @RunWith
  6. 6. Robolectric.buildActivity(myClass)
  7. 7. Robolectric.shadowOf(..)
  8. 8. AsyncTask testing
  9. 9. getNextStartedActivity(..) quirk
  10. 10. Network calls
  11. 11. ANNOUNCEMENT
  12. 12. REGISTRATION LINK http://hacknight.in
  13. 13. THANK YOU ! • Email - pocha@codelearn.org • www.codelearn.org • @pocha on twitter Ashish Sharma

×