Step by Step process for Robotium With APK file for Android

Robotium with APK.

Step 1 :            Start Eclipse

Step 2:             File →  New →  other → Android → Android Test Project → Project name → Next → This project → Next → Android version → finish

Step 3:             To find Launcher activity ID and launcher activity Name
                        Open the Respective application from emulator.

Step 4 :            kalyan@kumar-desktop:~/android-sdk-linux/platform-tools$ ./adb logcat

Step 5:             Find the last line (I/ActivityManager(   59): Displayed activity com.ni.sniffer/.Sniffer: 922 ms (total 922 ms))

Step 6:             Here Target Package is “com.ni.sniffer”

Step 7:             Launcher activity is “com.ni.sniffer.Sniffer” (Case sensitive)

Step 8:             Open the AndroidManifest.xml from res folder

Step 9:             Change the target package and save then close

Step 10:           Right click package, New → class

Step 11:           Change package and give name

Step 12:           Coding with similar changes

Step 13:           Right click on project Build path → Configure build path → libraries → Add external JARs and browse the Robotium.jar

Step 14:           Select order and export tab and select the Robotium and then click OK.

Step 15:           Signature

Step 15.1:        Unzip the apk zip file

Step 15.2:        Delete the Meta-INF file

Step 15.3:        Rezip the file

Step 15.4:        Open the Terminal

Step 15.5:        kalyan@kumar-desktop:~/android-sdk-linux/platform-tools$  jarsigner -keystore ~/.android/debug.keystore -storepass android -keypass android '/home/kalyan/Desktop/Working/APKs_to_work/Sniffer/Sniffer.apk.zip'                             

androiddebugkey

Step 15.6:  kalyan@kumar-desktop:~/android-sdk-linux/tools$ zipalign '/home/kalyan/Desktop/Working/APKs_to_work/Sniffer/Sniffer.apk.zip' Sniffer1.apk
Note : Sniffer1.apk is the new name which given by us.

Step 16:           Right click the project Run as →Android Junit Test                                          

Comments

Popular posts from this blog

Online Selenium Training With Real Time Scenario

Online Tricentis Tosca Automation Training with Real Time Scenarios

Online Training for Manual/Functional