The document discusses challenges in mobile automation testing and provides an overview of Appium as a tool for mobile test automation. It covers Appium architecture, requirements, capabilities, and tips for scaling mobile tests. Advanced Appium actions like horizontal and vertical swiping and chained locators are mentioned. The document also discusses visual testing, accessibility testing, and performance testing for mobile apps using Appium.
2. About Me
✓Open Source Enthusiast
(Selenium, ngWebdriver, Serenity, Protractor et..)
✓Author assertselenium.com & official documentation of Selenium
✓Organizer & Program Chair seleniumconf.com
✓Member of Project Leadership committee - Selenium
✓Accessibility enthusiast
✓I work at Applitools AI-POWERED VISUAL TESTING AND MONITORING
3. Today’s Session
✓Challenges of Mobile Automated testing
✓Getting started with Automated Mobile Testing -Appium
✓Advanced features and unique capabilities
✓Scaling your Appium tests
✓State of Mobile Automation testing tools
✓& More
7. Challenges - Mobile Automation
• Validate every OS version your app supports
• Validate every locale your app supports
• Validate different device manufacturers
• Validate performance of your mobile apps
• Simulator vs Real Device differences
12. Appium Philosophy
• Test the Same app you submit to the marketplace
• Write automated tests in any language / framework
• An open-source mobile automation framework
• Come up With your own driver implementation
13. Appium
• Appium is a HTTP server that creates and handles WebDriver session
through Mobile JSON WP
14. Appium Architecture
• Similar to WebDriver Server
• A Client-Server architecture
• Server - Node Js
• Client - your Automated Scripts
• Receive request from Client > Executes commands on devices/emulators
> A HTTP response is responded
15. Appium Architecture
• When you download Appium Desktop or install via npm - you’re just
downloading or setting up the Server part of Appium
• When you write an automated Appium Script and execute it, a HTTP
request in JSON format is sent to Server
• Appium sends the commands to iOS and Android platform in a way that it
understands via bootstrap- which acts as a Unix/TCP server
30. Tips & Tricks
• No XPath
• Use Predicates in iOS
• Appium is slow
• Stability over speed
• No Docs
31. Performance Testing for Mobile apps
• Mobile apps are usually run in a very constrained environment
• Mobile apps have the potential to create bad user experience not only from
UI perspective but also by jamming CPU or memory and shown as a
“battery draining app”
32. • At least with Android
• dumpsys is a tool that runs on Android devices and provides information
about services and can be used wth Android Debug Bridge
• Allow you to check how your application affects the overall device through
CPU, RAM, Battery, storage stats
List<List<Object>> data =
driver.getPerformanceData("io.appium.android.apis", "memoryinfo",
10);
Performance Testing with Appium
33. Visual Testing for mobile Apps
• Validate if your app looks same on different screen sizes, different
manufacturers
• How will your app layout or structure looks when used in different language
which has long strings like Deutsch
• Consider testing in Landscape mode
35. Accessibility Testing for Mobile Apps
• All activatable elements should be focusable
• The user flow on the screen should be from top to bottom and left to right.
The flow throughout the app should be intuitive.
36. Accessibility testing with Espresso
• Accessibility Test framework from Google - Plugged into any Java
framework
• Espresso:
import android.support.test.espresso.contrib.AccessibilityChecks;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class AccessibilityChecksIntegrationTest {
@BeforeClass
public static void enableAccessibilityChecks() {
AccessibilityChecks.enable();
}
}
38. Scaling Mobile Automation
• Dockerize Appium Tests - Easy Parallel tests
• Docker based Setup
• https://github.com/butomo1989/docker-android
• https://github.com/appium/appium-docker-android
• No more worry about requirements
• Comes pre-built in a docker image
• Build an Image and execute it!
Unlike 5 or 10 years ago in todays world, when testing a web or mobile app - whether native or responsive, it’s important to be able to test on all devices and browsers.
The problem is, there are simply too many device and browser combinations.
Chrome, Firefox, IE, Safari, each one has multiple versions that customers may be using, on different devices (PC, MAC, Mobile Devices, Smart watches) Running on different operating systems (Windows, Linux, IOS, Android etc.) and in different screen resolutions according to the device.
In some cases the application under test may also have responsive design to optimize the layout according to the viewable portion of the screen.
In these cases we also need to check the app across the different layouts.
While there are tools that let you test on a wide variety of devices, there is no automated testing tool that can see that the app looks and acts right on all devices.
So someone still manually goes through each and every device, to ensure that everything is displaying properly. This causes major bottlenecks which adds cost to the dev process.
On top of that we also know that release cycle are keep getting shorter and shorter.
Many organisations already have CI in place and some already has full CD.
It simply means that everything must be automated has we have zero time for manual bottle necks.
So, we have more and more things that we need to cover and less and less time to do it.