1 / 11

Automation Lifecycle of Mobile Applications

Automation Lifecycle of Mobile Applications. Ashish Mishra. Agenda:. Why automate? Automation Lifecycle Application building Application installation Launching applications and tests Collecting test logs and results Result reporting. Demos Q&A. Why Automate:. Multiple Phone models

ghita
Download Presentation

Automation Lifecycle of Mobile Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Automation Lifecycle of Mobile Applications Ashish Mishra

  2. Agenda: • Why automate? • Automation Lifecycle • Application building • Application installation • Launching applications and tests • Collecting test logs and results • Result reporting. • Demos • Q&A

  3. Why Automate: • Multiple Phone models • Multiple Operating systems • Multiple Application versions • Multiple Carriers • Device specific features • Complex API testing • Large number of test cases

  4. Automation Lifecycle:

  5. Automation Lifecycle: Building applications • Jenkins – an extendable continuous Integration server. • Install Apache tomcat web server • Get Jenkins.war from Jenkins-ci.org and deploy. • Jenkins + Android: • Setup: Eclipse + Android SDK + ADT Plugin • Android App –android update project –p <path to android app> • Test App – android update test-project –m <path to App> -p <path to TestApp> • Build the android projects using: “ant clean debug” • Jenkins + iOS: • Setup: Mac + Xcode + iOS SDK • Build iOS project using: “xcodebuild -configuration ${BUILD_TYPE} -target ${TARGET_NAME} -sdk ${SIMULATOR_OR_IOS_SDK}”

  6. Automation Lifecycle: Installing Applications • Android: Android SDK provides “adb” which can be used to install/uninstall applications from simulator/devices. • adb [-e | –d <device_id>] install <path to .apk> • adb [-e | –d <device_id>] uninstall <application id> • Non-Jailbroken iOS devices: • Get sources from libimobiledevice.org and compile to create “ideviceinstaller” • This can be used to install/uninstall “IPAs” to any iOS device from command line. • Jailbroken iOS devices: • Install SSH server from Cydia App store. • Unzip IPA, modify Info.plist file to register for URL handler and copy inside device.

  7. Automation Lifecycle: Running Applications and launching tests • Android: Applications can be launched from command line in emulators/devices using: • adb shell am start –n com.google.android.contacts/.ContactsActivity –e <Key> <Value> • Jailbroken iOS device: Application need to register as an URI handler. • Install “Erica utilties” from Cydia app store. • Ssh into the device and use following command : uiopen testapp:// • Non-Jailbroken iOS device: The only option of launching apps from command line is using: • $ instruments -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate <path-to-your-app>/<appname>.app -e UIASCRIPT <path-to-js-test-file>

  8. Automation Lifecycle: Collecting test results and logs • Android: • To fetch logs and files from device to desktop: • adb pull <source path on device> <destination on desktop> • Jailbroken iOS devices: • Use scp to pull back results from device to desktop. • Non-Jailbroken iOS devices: • Fuse4x allows you to mount iOS device’s document directory on the desktop machine by the following command : • Ifuse <mount point> -u <udid of iOS device> --appid <application ID>

  9. Automation Lifecycle: Test result reporting • Jenkins provides in-built support for Junit test result xml reports. • Supply the path of test result in junit format in the jenkins job : • Graphs, trends and drill down options are also available. • Jenkins can be configured to preserve selective set or a predefined number of test results.

  10. Demos: Automation lifecycle of Android and iOS Applications

  11. Thank You

More Related