agile - How do you do Test Driven Development on Mobile Android project? -
tdd requires automated testing, hear others how have applied tdd in android projects? worked/did not work team? how did automate visual testing in particular? can see tdd service layer , model how tdd , activities, visual changes layouts etc?
the monkey tool, called ui/application exerciser monkey, can useful in identification of ui bugs , errors. practice run against apk before release of android application.
how works
the monkey command-line tool can run on emulator instance or on device. sends pseudo-random stream of user events system, acts stress test on application software developing. control have list of options.
the options give control on :
- basic configuration : number of events
- constraints : restriction on packages
- event types , frequencies
- debugging options
this generic command run monkey :
adb shell monkey [options] //example adb shell monkey -p your.package.name -v 500 for more information see link on officiel android developer website
best practices unit testing android apps:
in apidemos sample app, can find activityunittestcase , activityinstrumentationtestcase classes.
these utility classes testing android programs.
here links reference: activityinstrumentationtestcase , activityunittestcase
android.jar includes subset of junit test framework plain old unit test. take @ apidemos sample learning how write , run it.
you can try robotium! , robolectric
Comments
Post a Comment