TMF2014 Mobile Testing Workshop Michael Palotas

79
TEST MANAGERS FORUM 2014 SYDNEY, AUSTRALIA MOBILE TESTING WORKSHOP 1

description

A very big thank you to Michael Palotas from Grid Fusion & eBay International for taking the time and effort to travel across the globe to present at the Australian Test Managers Forum 2014. If you would like any information on TMF please email [email protected]

Transcript of TMF2014 Mobile Testing Workshop Michael Palotas

Page 1: TMF2014 Mobile Testing Workshop Michael Palotas

TEST MANAGERS FORUM 2014 SYDNEY, AUSTRALIA MOBILE TESTING WORKSHOP

1

Page 2: TMF2014 Mobile Testing Workshop Michael Palotas

2

WHO AM I? Gridfusion Software Solutions Contact: Michael Palotas Gerbiweg 2 8853 Lachen SWITZERLAND Tel.: +41 79 6690708 Email: [email protected]

Head of Productivity & Test Engineering, eBay

Founder / Principal Consultant Gridfusion Software Solutions

Page 3: TMF2014 Mobile Testing Workshop Michael Palotas

SETTING THE STAGE

Tell me about yourself J

What are your expectations for today?

3

Page 4: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING SPECIFICALITIES

4

Page 5: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE IS A VAST LAND

5

Page 6: TMF2014 Mobile Testing Workshop Michael Palotas

YOU ONLY HAVE ONE SHOT

6

Page 7: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES DEVICE DIVERSITY

7

Page 8: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES NEW OS VERSIONS

New versions usually fix issues

but

May also introduce new ones

8

Page 9: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES NEW OS VERSIONS

9

Page 10: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES NEW OS VERSIONS

10

Page 11: TMF2014 Mobile Testing Workshop Michael Palotas

NATIVE APPS AND MOBILE WEB

11

Page 12: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES LOCALIZATION

12

Page 13: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES NETWORK

13

Page 14: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES OPERATORS

14

Page 15: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES MOBILE ENVIRONMENT

15

Page 16: TMF2014 Mobile Testing Workshop Michael Palotas

16

Page 17: TMF2014 Mobile Testing Workshop Michael Palotas

17

Page 18: TMF2014 Mobile Testing Workshop Michael Palotas

18

Page 19: TMF2014 Mobile Testing Workshop Michael Palotas

19

Page 20: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TESTING CHALLENGES DEVICE MANAGEMENT

20

Page 21: TMF2014 Mobile Testing Workshop Michael Palotas

DEVICE OR EMULATOR?

21

Page 22: TMF2014 Mobile Testing Workshop Michael Palotas

RISK ASSESSMENT AND STRATEGIES

22

Page 23: TMF2014 Mobile Testing Workshop Michael Palotas

RISK & STRATEGIES

Hotfixes are difficult and expensive

Agile?

...yes...but...for mobile the goal should be to get it right the first time

23

Page 24: TMF2014 Mobile Testing Workshop Michael Palotas

RISK & STRATEGIES

May shift back to waterfall

(waterfall is not that bad)

Difficult to get (mobile) experienced people

Need to grow capabilities in-house

24

Page 25: TMF2014 Mobile Testing Workshop Michael Palotas

RISK & STRATEGIES

No automation in most places today

No continous integration / continous delivery

25

Page 26: TMF2014 Mobile Testing Workshop Michael Palotas

RISK & STRATEGIES DEVICE SELECTION

26

Be pragmatic

Focus on where your money is coming from

Forget the “Long Tail”

Page 27: TMF2014 Mobile Testing Workshop Michael Palotas

RISK & STRATEGIES

Multi code base

Many devices

Device / OS management

Simulator vs. real devices

27

Page 28: TMF2014 Mobile Testing Workshop Michael Palotas

CLOUD TESTING

28

Page 29: TMF2014 Mobile Testing Workshop Michael Palotas

CLOUD VENDORS - DEVICE ANYWHERE

29

Page 30: TMF2014 Mobile Testing Workshop Michael Palotas

CLOUD VENDORS - SAUCELABS

30

Page 31: TMF2014 Mobile Testing Workshop Michael Palotas

TESTDROID

31

Page 32: TMF2014 Mobile Testing Workshop Michael Palotas

GENERAL EXPERIENCES WITH THE CLOUD

No dedicated devices

Or no devices at all

Device management

Your company firewall...

Trust issues

Slow(er)

No in-house knowledge

Not onsite

It is a bit like outsourcing

$ in the beginning

$$$$$$ when you are scaling

32

Page 33: TMF2014 Mobile Testing Workshop Michael Palotas

CROWD TESTING

33

Page 34: TMF2014 Mobile Testing Workshop Michael Palotas

REALLY?

34

Page 35: TMF2014 Mobile Testing Workshop Michael Palotas

CROWD TESTING – WHAT USUALLY WORKS?

Fresh set of eyes

Access to many regions, devices, OS combinations

(at least theoretically)

Lots of issues reported

Relatively low cost

35

Page 36: TMF2014 Mobile Testing Workshop Michael Palotas

CROWD TESTING – CHALLENGES

Significant ramp up required for testers

Low bug quality

You don’t know who is on the other end...

People in mature markets won’t work for 5$ / bug

Only access to production environment

QA system access very difficult

Legal implications, NDAs etc.

No development resources to fix the bugs

36

Page 37: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE DEVELOPMENT APPROACHES

37

Page 38: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE DEVELOPMENT APPROACHES

Mobile First

Responsive Design

38

Page 39: TMF2014 Mobile Testing Workshop Michael Palotas

TEAM ORGANIZATION

39

Page 40: TMF2014 Mobile Testing Workshop Michael Palotas

AGILE AND MOBILE

CI – OK

CD – OK for QA versions

CD – NOK for prod versions

40

Page 41: TMF2014 Mobile Testing Workshop Michael Palotas

SKILLSET - THE PERFECT TESTER

41

Page 42: TMF2014 Mobile Testing Workshop Michael Palotas

GENERAL TEST AUTOMATION

42

Page 43: TMF2014 Mobile Testing Workshop Michael Palotas

FLIP THE AUTOMATION TRIANGLE

Unit Tests

E2E Automation Tests

Manual Tests

Unit Tests

E2E Tests

Manual Tests

Integration Tests

Page 44: TMF2014 Mobile Testing Workshop Michael Palotas

TEST AUTOMATION

WHY?

44

Page 45: TMF2014 Mobile Testing Workshop Michael Palotas

TEST AUTOMATION

WHO?

45

Page 46: TMF2014 Mobile Testing Workshop Michael Palotas

TEST AUTOMATION

WHAT?

46

Page 47: TMF2014 Mobile Testing Workshop Michael Palotas

TEST AUTOMATION

WHEN?

47

Page 48: TMF2014 Mobile Testing Workshop Michael Palotas

INSTANT FEEDBACK

D T D T D T D T D T D T D T D T

Development Test

Page 49: TMF2014 Mobile Testing Workshop Michael Palotas

AUTOMATION IS GOOD…BUT

Tools help, but tools don’t test

Manual testing is equally important

Manual (exploratory) and automated testing complement each other

49

Automation

Manual

Page 50: TMF2014 Mobile Testing Workshop Michael Palotas

WHY IS E2E TESTING SO IMPORTANT?

Because it is the most difficult way to test

Because our users use our products End2End

Because you can verify that the whole system works together

50

Page 51: TMF2014 Mobile Testing Workshop Michael Palotas

PERSONAL THOUGHTS ON AUTOMATION

Manual testing is still very important

E2E tests are expensive, so keep them to the minimum Automation is software development

Be careful with record & playback tools

Automate the repetitive tasks (regression)

Build testability into your product

ROI...

More at http://gridfusion.net/thoughtsonautomation.html

51

Page 52: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TEST AUTOMATION

52

Page 53: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE TEST AUTOMATION

Not as mature as web automation

Immature tools market

Tools are usually platform specific

Multi code base

Need to understand the underlying architecture much more than for the web

Need people who can code well

53

Page 54: TMF2014 Mobile Testing Workshop Michael Palotas

EMULATORS VS. DEVICES

What to test where?

54

Page 55: TMF2014 Mobile Testing Workshop Michael Palotas

WHAT TO TEST WHERE - EMULATOR

functional test

55

Page 56: TMF2014 Mobile Testing Workshop Michael Palotas

WHAT TO TEST WHERE - DEVICE

performance look and feel

memory usage carrier specific tests

56

Page 57: TMF2014 Mobile Testing Workshop Michael Palotas

IOS SIMULATOR SPECIFICS

57

Comes from Apple

Works well & reliable

Page 58: TMF2014 Mobile Testing Workshop Michael Palotas

ANDROID EMULATOR SPECIFIC

58

SLOW

Page 59: TMF2014 Mobile Testing Workshop Michael Palotas

ANDROID VS. IOS

Android: lots of variations, versions, vendors

Android: open source (sort of)

iOS: easy to update

iOS: everything comes from one vendor

iOS: not exactly open source J

59

Page 60: TMF2014 Mobile Testing Workshop Michael Palotas

SAMPLE MOBILE AUTOMATION REQUIREMENTS

Use the same approach and infrastructure as web

Business is borderless à test automation needs to be as well

Aim for REAL E2E test automation

Use the Load Balancer / Resource Management Features of Selenium Grid

Manage multiple applications / versions / languages

No modification of mobile app

No modification of mobile device

Mobile App Runtime Inspection Support

Hybrid app support

Support for emulator + real device

Integration into CI system

60

Page 61: TMF2014 Mobile Testing Workshop Michael Palotas

SAME AUTOMATION CODE BETWEEN PLATFORMS?

Sounds good first

but

Most apps are different between platforms

Different element locator strategy

Do reuse the helper functions

61

Page 62: TMF2014 Mobile Testing Workshop Michael Palotas

MOBILE AUTOMATION IOS / ANDROID DIFFERENCES

iOS has no IDs à harder to automate

iOS relies on xcode

Android is open source

Android: ID support

62

Page 63: TMF2014 Mobile Testing Workshop Michael Palotas

TEST INFRASTRUCTURE

63

Driver Browsers Mobiles

AUT

DB

API

Page 64: TMF2014 Mobile Testing Workshop Michael Palotas

TOOLSETS - OVERVIEW

Ranorex

QTP

TOSCA

SeeTest

Selenium/ ios-driver/Selendroid

Selenium / APPIUM

64

Page 65: TMF2014 Mobile Testing Workshop Michael Palotas

SeeTest

65

Page 66: TMF2014 Mobile Testing Workshop Michael Palotas

WHAT ABOUT BDD / ATDD?

I have seen it working

Required to close the loop

Removed complexity

(while adding it at the same time)

Have you ever seen a product owner test?

66

Page 67: TMF2014 Mobile Testing Workshop Michael Palotas

SAMPLE TOOLS

JBehave

Fitnesse

Cucumber

67

Page 68: TMF2014 Mobile Testing Workshop Michael Palotas

SELENIUM

68

Page 69: TMF2014 Mobile Testing Workshop Michael Palotas

SELENIUM – WHAT IS IT?

Web testing tool Highly successful open source project Stable

Protocol describing the user interactions

Supports most browser implementations Support for most common programming languages

69

Page 70: TMF2014 Mobile Testing Workshop Michael Palotas

SELENIUM – WHAT IT IS NOT

a drag & drop tool

a network testing / monitoring tool

a performance testing tool

a reporting tool

a testcase management tool

70

Page 71: TMF2014 Mobile Testing Workshop Michael Palotas

SELENIUM

i.e. Firefox driver

Server

JSON WIRE PROTOCOL

Client

Java

C#

Ruby

Python

Server

i.e. Selendroid, iOS-Driver

Page 72: TMF2014 Mobile Testing Workshop Michael Palotas

SCALING - SELENIUM GRID

72

Page 73: TMF2014 Mobile Testing Workshop Michael Palotas

SELENIUM GRID

73

Page 74: TMF2014 Mobile Testing Workshop Michael Palotas

SCALING USING SELENIUM GRID

74

Client

server GRID Hub Client

CI

server

server

server

server

server

server

Page 75: TMF2014 Mobile Testing Workshop Michael Palotas

75

Implements the JSON Wire Protocol (so it is fully compatible with Selenium)

Runs on emulators and devices

Can be run as a node in Selenium Grid

Support for localized native apps (1 test for all locales)

No need to change the AUT

No need to jailbreak the device

Page 76: TMF2014 Mobile Testing Workshop Michael Palotas

76

Hybrid support Different locator types are supported to find elements Gestures are supported: Advanced User Interactions API Hot plugging It can be integrated as a node into the Selenium Grid for scaling and parallel testing Android target API support from 2.3.3 to 4.3 (latest) Built in Inspector to simplify test case development.

Page 77: TMF2014 Mobile Testing Workshop Michael Palotas

REPORTING

Invest into proper reporting Easy analysis of the reports is crucial

Selenium does no reporting

TestNG or JUnit are responsible for reporting 100% customizable reports (i.e. different reporting levels,

PDF, HTML, Email, SMS etc...) Hooks into test case management tools

77

Page 78: TMF2014 Mobile Testing Workshop Michael Palotas

REPORT WITH SCREENSHOT

78

Page 79: TMF2014 Mobile Testing Workshop Michael Palotas

SELENIUM SELENDROID IOS-DRIVER

79