introduction to mobile-automation
DESCRIPTION
This presentation is all about Mobile Application Testing & the challenges faced there off.TRANSCRIPT
Introduction to Mobile AutomationPresenter: Sitam Jana, Mindfire Solutions
About MeSitam Jana, Software QA EngineerMindfire Solutions
Skills : WebDriver, Java, JUnit, TestNG, Maven, Oracle 11G, Robotium, Appium, MonkeyRunner
Certifications : ISTQB Foundation Level, V-Skills Selenium Certified
Connect Me :Facebook : https://www.facebook.com/sitam.jana.9LinkedIn : http://www.linkedin.com/pub/sitam-jana/39/444/b12
Contact Me :Email : [email protected] / [email protected]: mfsi_sitamj
Presenter: Sitam Jana, Mindfire Solutions
Agenda Mobile Application Testing - Brief Discussion Challenges of testing mobile application Mobile Automation - What is it? Tools available in the market Getting started Demo
Presenter: Sitam Jana, Mindfire Solutions
Mobile Application TestingMobile devices have seen tremendous growth over the past decade. With lots of Mobile applications being developed these days, confirming quality has become so key to prevent revenue loss, lost productivity and damage to brandreputation. A thorough test strategy needs to follow in order to get apps in good shape, reach market on time, within budget and to work well across devices, OS Distributions : Target Device Selection (Test environment should have a mix of Simulators and Real devices) Internet Connectivity (Wi-Fi, Cellular) Test Automation (Reduce effort of Regression by selecting an effective automation tool) Different testing aspects (Usability, Performance, Security, Reliability etc.)
Presenter: Sitam Jana, Mindfire Solutions
Mobile Application Testing
Compatibility
Application's compatibility with different computing environments (hardware peripherals, carriers, emulators, screen resolutions etc.)
Presenter: Sitam Jana, Mindfire Solutions
Interoperability
Ability to interact with other system(File transfer, sharing, remote access etc.)
Challenges Compatibility Testing- Testing across Mobile devices (Emulators, Real devices etc.)- Testing across OS flavors (Android, iOS, Windows etc.)- Testing across networks (Wi-Fi, Cellular etc.)- Testing across different Resolutions, Screen sizes Regression TestingBefore moving updates to Production, doing thorough Regression testing is very crucial. Automation is MUST here to reduce efforts,time to market and enhance productivity.
Presenter: Sitam Jana, Mindfire Solutions
Mobile AutomationAutomation of mobile applications is one of MOST emerging prospect in todays Agile world and can provide many advantages: Effieciency of testing process improve as Automation is accurate and work as
designed
Automation tests can be run repeatedly and consistently
Remove headache of Regression tests with every release
Improved test coverage in shorter time span
Resources can be utilized better with Regression being done by Automation and advanced testing done by Human QA
Presenter: Sitam Jana, Mindfire Solutions
Mobile Automation ToolsKey factors in selecting right Mobile automation tools
Support for multiple platformsList current and future target platforms and ensure tool supports them. Support for blackbox testingEnsure tool functions well without having access to application source code Root or Jailbreak requirementTool should work well across device which has not been rooted or jail broken Support for Integration into CI ServersAutomation Scripts should be able to run from CI servers
Presenter: Sitam Jana, Mindfire Solutions
Mobile Automation Tools
Platform Specific Tools (Provided by Mobile OS vendors)iOS Instrumentation, MonkeyRunner, UIAutomator Functional Testing ToolsRobotium, Appium, MonkeyTalk, Selendroid, ios-driver Unit Testing ToolsAndroid JUnit, Roboelectric, OCUnit Performance Testing ToolsNeoLoad, MobiTest
Presenter: Sitam Jana, Mindfire Solutions
Mobile Automation ToolsiOS InstrumentationDeveloper tool to interact with running processes in iOS and collect data.Developed by: Apple Inc.
Features:- Track Keyboard and Mouse events- Measure File I/O activity- Analyze CPU usage- Memory utilization- Track Network traffic
More Info: iOS Instrumentation User GuidePresenter: Sitam Jana, Mindfire Solutions
Mobile Automation ToolsMonkeyRunnerEmulates Android emulators and real devices.Developed by: Google Inc.
Features:- Multiple Device Control- Can install or uninstall application packages- Can capture screen shot of Android device- Functional and Regression testing can be done for Android apps
More Info: MonkeyRunner User GuidePresenter: Sitam Jana, Mindfire Solutions
Mobile Automation ToolsUI AutomatorTest UI of Android mobile applications across one or multiple devices.Developed by: Google Inc.
Features:- Multiple Device Control- Emulate Key events, gestures and screen actions- Come Pre-installed with Android SDK- Multiple applications can be accessed
More Info: UI Automator User GuidePresenter: Sitam Jana, Mindfire Solutions
Mobile Automation ToolsRobotiumAndroid test automation framework developed by Renas Rada and provide full support for Native and Hybrid applications.Developed by: Robotium TechFeatures:- Can handle multiple Android activities automatically- Support for Black-box and White-box test automation- Smooth integration with CI servers like Hudson, Jenkins etc.- Can be implemented as Maven, ANT etc.
More Info: Robotium User GuidePresenter: Sitam Jana, Mindfire Solutions
Mobile Automation ToolsAppiumOpen source test automation framework to drive native and hybrid mobile Applications for both Android and iOS.Developed by: Sauce LabsFeatures:- Can drive both Android and iOS applications- Use Selenium bindings to write tests- Smooth integration with CI servers like Hudson, Jenkins etc.- Can be implemented as Maven, ANT etc.
More Info: Appium User GuidePresenter: Sitam Jana, Mindfire Solutions
Mobile Automation ToolsMonkeyTalkOpen source test automation framework to drive native and hybrid mobile Applications, web and Flash applications.Developed by: Gorilla LogicFeatures:- Can drive both Android and iOS applications- Provide Record and Playback tool- Smooth integration with CI servers like Hudson, Jenkins etc.- Smooth integrations with Cloud servers like Cloud Monkey
More Info: MonkeyTalk User GuidePresenter: Sitam Jana, Mindfire Solutions
Getting Started – Android Automation Set up Working Environment
Install JDKhttp://www.oracle.com/technetwork/java/javase/downloads/index.html
Download Android SDKhttp://developer.android.com/sdk/index.html
Setting up Android Virtual Device (Emulator)Create new AVD from Android SDK to be able to run Automation tests there.
Resign Android application (If needed) and Install under AVDSome of the Automation tools require AUT to be resigned in order to communicate.
Write Automation scripts and execute them under AVD
Presenter: Sitam Jana, Mindfire Solutions
Demo - MonkeyRunner
MonkeyRunner APIMonkeyRunner API contains 3 modules: MonkeyRunner
Connects MonkeyRunner to emulator or real device
MonkeyDeviceRepresents a Device or emulator. Can install/uninstall application packages, start activity, emulate keyboard, touch events.
MonkeyImageRepresents a screen capture image. Capture screen shots, convert bitmap images to various formats, write an image to a file, compare two MonkeyImage objects.
Presenter: Sitam Jana, Mindfire Solutions
MonkeyRunner Sample Code# Imports the monkey runner modules used by this programfrom com.android.monkeyrunner import MonkeyRunner, MonkeyDevicefrom com.android.monkeyrunner.easy import EasyMonkeyDevicefrom com.android.monkeyrunner.easy import By
# Connects to the current device, returning a MonkeyDevice objectdevice = MonkeyRunner.waitForConnection()
# Install the application package to the devicedevice.installPackage('<Path to apk file>')
# Run the activity on the devicedevice.startActivity(component=runComponent)
# Use the EasyMonkey APIeasyDevice = EasyMonkeyDevice(device)
Presenter: Sitam Jana, Mindfire Solutions
MonkeyRunner Sample Code# Input values into Text boxtextBox = By.id('<textBox ID>')easyDevice.type(login, '<text to input>')
# Press keysdevice.press('<Key name e.g DEL>', MonkeyDevice.DOWN_AND_UP)
# Click on buttonbutton = By.id('<button ID>')easyDevice.touch(button, MonkeyDevice.DOWN_AND_UP)
# Take screenshot and writes the screenshot to a fileTakeScreenshot('<Screenshot destination>', device)
Presenter: Sitam Jana, Mindfire Solutions
MonkeyRunner – How it works Create a PyDev project under Eclipse
Need to install PyDev Eclipse plug-in
Set Jython Interpreter Preferences for MonkeyRunnerFrom Window → Preferences → Interpreter – Jython
Create New Jython Interpreter:Interpreter Name: Give any name e.g. MonkeyRunnerInterpreter Executable: Locate Jython utility (\adt-bundle-windows-x86_64\sdk\tools\lib\jython-standalone-x.x.x.jar)
Create New Libraries for MonkeyRunner:Click on 'New Jar/Zip(s)' button and locate MonkeyRunner utility (\adt-bundle-windows-x86_64\sdk\tools\lib\monkeyrunner.jar)
Presenter: Sitam Jana, Mindfire Solutions
MonkeyRunner – How it works Set Project to use configured MonkeyRunner Jython Interpreter
Right click on Project → Properties → PyDev Interpreter/Grammar
Project type: Jython
Interpreter: Select new Interpreter created for MonkeyRunner
Create an External Tool ConfigurationFrom Run → External Tools → External Tools Configurations → New Launch Configuration
Name: Give any name
Location: Point MonkeyRunner.bat file (\adt-bundle-windows-x86_64\sdk\tools\monkeyrunner.bat)
Working Directory: Browse Workspace and select PyDev project created
Arguments: Provide full path to the python program (.py) file
Presenter: Sitam Jana, Mindfire Solutions
Presenter: Sitam Jana, Mindfire Solutions
References
HSC Whitepaper Mobile Test Automation Mobility Whitepaper Mobile Application Testing.pdf Selecting the Right Mobile Test Automation Strategy Challenges and Principles
Question and Answer
Presenter: Sitam Jana, Mindfire Solutions
Thank you
Presenter: Sitam Jana, Mindfire Solutions
www.mindfiresolutions.com
https://www.facebook.com/MindfireSolutions
http://www.linkedin.com/company/mindfire-solutions
http://twitter.com/mindfires