Robotium and testdroid recorder
In this post I will show you how to automate android application using robotium framework with testdroid recorder.
Testdroid recorder is capture user action , generate reusable android test case into robotium framework.
For more detail about Testdroid visit link (click here)[http://testdroid.com/product/testdroid-recorder#0]
Prerequisites:
1.Eclipse should be installed in your machine.
2.Android SDK should be installed.
3.ADT Plug-in installed in to Eclipse.
Testdroid installation:
1.Start Eclipse and go to Help –> Install New Software
2.Click Add button; enter to field asking you a site to work with.
3.Fill in “Testdroid plug-in” for the Name
4.For the Location provide URL to Testdroid repository: [http://www.testdroid.com/updates/]
5.Click ok button.
6.Click next button. During installation you must see below warning pop up
7.Click on “OK” button of warning popup window.
8.After successful installation restart your eclipse.
Creating project in eclipse:
1.Create new android test project.
2.Click next button.
3.Enter project name and click on next button.
4.Chose Android API and click finish button.
Run Emulator:
Run your emulator having API 11 or as per your selection.
Recording test Script:
1.Goto File menu and select New > Other and select option “New Robotium Test”.
2.Click next button.
3.Enter user name and password of Testdroid application and Click Authorize button.
4.Click next button. Browse your apk file and click next button again.
5.Select recording method name and click on recording button. Your apk file will install in opened emulator , launch the application on emulator and start the recording.
6.After recording click on stop recording button and click on finished button. Your recorded scenario automated converted in java junit test and save in eclipse like as below java code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
Post a Comment
Post a Comment