Challenges in writing roboelectric tests

Preview:

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

Citation preview

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

Recommended