Top Banner
Mobile Cross Platform Automation in-practice and on a large scale Sathish Gogineni Mobile QA Automation Lead
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Mobile Cross Platform Automation in-practice and on a Large Scale

Mobile Cross Platform Automation in-practice and on a large scale

Sathish GogineniMobile QA Automation Lead

Page 2: Mobile Cross Platform Automation in-practice and on a Large Scale

Raise your hands if….

• You’re working in Mobile platform?

• You have apps on multiple platforms?

• You’re aware of the test automation tools in Mobile?

• You have functional test automation?

• You’re using Cross platform test automation?

Page 3: Mobile Cross Platform Automation in-practice and on a Large Scale

A bit of self promotion

Page 4: Mobile Cross Platform Automation in-practice and on a Large Scale

Mobile Automation at Badoo

• Badoo has 2 popular apps– Badoo

– HotOrNot

• Apps support 4 mobile platforms– Android

– iOS

– MobileWeb ( HTML5 )

– Windows

Page 5: Mobile Cross Platform Automation in-practice and on a Large Scale

Mobile Automation at Badoo

• A Single code base

• Run across two apps

• Runs on three platforms

• We have

– 350 scenarios for Badoo in Android & iOS ( 62%)

– 250 scenarios for HotOrNot in Android & iOS ( 76% )

– 75 scenarios for HotOrNot in MobileWeb ( 22% )

– And in Windows platform we have 0 ( 0% )

Page 6: Mobile Cross Platform Automation in-practice and on a Large Scale

Device Display Cabinet

Page 7: Mobile Cross Platform Automation in-practice and on a Large Scale

A bit of Cross platform test

Page 8: Mobile Cross Platform Automation in-practice and on a Large Scale

Mobile cross platform automation?

• Write once , Run anywhere(?)

– Write test specifications

– Implement the tests at high level

– Implement the platform specific code

Page 9: Mobile Cross Platform Automation in-practice and on a Large Scale

Why cross platform automation?

• Business logic is same. It is only interaction with UI is change

• We can make sure applications is same across platforms

• Pooled resources

• Less maintenance

Page 10: Mobile Cross Platform Automation in-practice and on a Large Scale

Mobile Cross Platform Tools

• Instrument based tools

– Calabash

– Appium

– MonkeyTalk

• Image based tools

– eggPlant

– seetest

Page 11: Mobile Cross Platform Automation in-practice and on a Large Scale

What should be considered?

• Who is writing the test cases? App developers or QA?

• Which model?

BDD/UnitTest/DDD

• Which programming language?

Page 12: Mobile Cross Platform Automation in-practice and on a Large Scale

Initial challenges

• “Our application is not exactly same for different platforms”

• “The performance of the tools are very slow”

• “It is better to write in the same language as application”

Page 13: Mobile Cross Platform Automation in-practice and on a Large Scale

A bit of Calabash

Page 14: Mobile Cross Platform Automation in-practice and on a Large Scale

What is Calabash?

• Implemented framework in “Ruby”

• Integrated with cucumber

• Supports simulator, emulators and devices

• Good community support

Page 15: Mobile Cross Platform Automation in-practice and on a Large Scale

Calabash stack

Scenarios

Feature

Step definitions

Android Page iOS Page

Gherkin

Ruby

Page 16: Mobile Cross Platform Automation in-practice and on a Large Scale

DEMO!

WHAT COULD POSSIBLY GO WRONG?

Page 17: Mobile Cross Platform Automation in-practice and on a Large Scale
Page 18: Mobile Cross Platform Automation in-practice and on a Large Scale

A bit of……

Page 19: Mobile Cross Platform Automation in-practice and on a Large Scale

#1 Problem : Most of the code is repeated in the pages for both platforms

Page 20: Mobile Cross Platform Automation in-practice and on a Large Scale

Solution:

• All the test logic in step definition.

• Pages should be light weight. It should only ‘interact’ with UI

• Transitions should be handled by Pages.

Page 21: Mobile Cross Platform Automation in-practice and on a Large Scale

#2 Problem : There are too many things in the screen and “Page” becomes long and complex

Page 22: Mobile Cross Platform Automation in-practice and on a Large Scale

Solution :

• Divide the screen into different panels

• Use ruby “modules” to represent each Panel

• Include the panels in the main “Page”

Page 23: Mobile Cross Platform Automation in-practice and on a Large Scale

#3 Problem :

Test case should be independent but it’s hard to set up the pre conditions every time

Page 24: Mobile Cross Platform Automation in-practice and on a Large Scale

Solution :

Implement an API with server

Examples: Create a new user ( from user pool )Add photoSend message from other user

Page 25: Mobile Cross Platform Automation in-practice and on a Large Scale

#4 Problem :

Some time test case fails due to networks issue and server glitches that are not reproducible

Page 26: Mobile Cross Platform Automation in-practice and on a Large Scale

Solution :

Re-run the failed test cases in the build server

• Run with “cucumber -f rerun -o rerun.txt”• Rerun with “cucumber rerun.txt”

Page 27: Mobile Cross Platform Automation in-practice and on a Large Scale

#5 Problem :

Testing scenarios which interact outside the app like Facebook sign in & taking photos

Page 28: Mobile Cross Platform Automation in-practice and on a Large Scale

Solution :

Integrate with tools which work outside application

• monkeyrunner/UIAutomator for Android • Sikuli for iOS

Page 29: Mobile Cross Platform Automation in-practice and on a Large Scale

#6 Problem :

Having the same environment setup everywhere

Page 30: Mobile Cross Platform Automation in-practice and on a Large Scale

Solution :Use Bundler for gem maintenance (http://bundler.io/)

• Write “Gemfile”• Run “bundle install”• Execute through “bundler exec”

Page 31: Mobile Cross Platform Automation in-practice and on a Large Scale