Challenges in writing roboelectric tests

Post on 12-May-2015

705 views 0 download

Tags:

description

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

Transcript of Challenges in writing roboelectric tests

ROBOLECTRIC TESTShow-to, challenges & everything else

WHAT IS ROBOLECTRIC

GETTING STARTED

• Create Java project

• Add Robolectric jars

• Add android & junit jars

• Add Android project as dependency

• Create junit run configuration

ROBOLECTRIC ELEMENTSwhich we used for codelearn.org tutorial tests

@RunWith

Robolectric.buildActivity(myClass)

Robolectric.shadowOf(..)

AsyncTask testing

getNextStartedActivity(..) quirk

Network calls

ANNOUNCEMENT

REGISTRATION LINK

http://hacknight.in

THANK YOU

!

• Email - pocha@codelearn.org

• www.codelearn.org

• @pocha on twitterAshish Sharma