33
Chris Lample - TestObject DevOps for Mobile Automate Your Tests With Appium

DevOps for Mobile: Automate Your Tests With Appium

Embed Size (px)

Citation preview

Page 1: DevOps for Mobile: Automate Your Tests With Appium

Chris Lample - TestObject

DevOps for Mobile Automate Your Tests With Appium

Page 2: DevOps for Mobile: Automate Your Tests With Appium

Your Speaker• Test Automation Engineer at TestObject

• Experience and Responsibilities:

• Test automation for client projects and proof of concepts

• Improve automated testing infrastructure

• Support TestObject users

Page 3: DevOps for Mobile: Automate Your Tests With Appium
Page 4: DevOps for Mobile: Automate Your Tests With Appium

About TestObject• Cloud based platform for Mobile testing

• Run manual and automated tests on hundreds of real Android and iOS devices

• Fast growing customer base, from small startups to multinational corporations

Page 5: DevOps for Mobile: Automate Your Tests With Appium

About TestObject

• Based in Berlin!

• We support multiple automation frameworks, but we’re an advocate for Appium

Page 6: DevOps for Mobile: Automate Your Tests With Appium

Challenges of Mobile Development

• Different OSs

• Different OS versions

• Device model fragmentation

• Wide range of screen-sizes

Page 7: DevOps for Mobile: Automate Your Tests With Appium

Test AutomationKey Benefits

• Shorten release cycle

• Increase app store ratings

• Test efficiently

Page 8: DevOps for Mobile: Automate Your Tests With Appium
Page 9: DevOps for Mobile: Automate Your Tests With Appium

Appium’s Flexibility

iOS Android Web Sprache

Calabash x x - Ruby

Robotium - x - Java

Espresso - x - Java

Appium x x x Java, JavaScript, Python, Ruby ...

Page 10: DevOps for Mobile: Automate Your Tests With Appium

About Appium

Cross-Platform Cross Technology

Automate with your language of choice

Page 11: DevOps for Mobile: Automate Your Tests With Appium

How It Works

Page 12: DevOps for Mobile: Automate Your Tests With Appium

Appium’s Philosophy1. You shouldn’t have to recompile your app

or modify it in order to automate it.

Page 13: DevOps for Mobile: Automate Your Tests With Appium

Appium’s Philosophy1. You shouldn’t have to recompile your app

or modify it in order to automate it.

2. You shouldn’t be locked into a specific language or framework to write and run your tests.

Page 14: DevOps for Mobile: Automate Your Tests With Appium

Appium’s Philosophy1. You shouldn’t have to recompile your app

or modify it in order to automate it.

2. You shouldn’t be locked into a specific language or framework to write and run your tests.

3. A mobile automation framework should be open source, in spirit and practice as well as in name!

Page 15: DevOps for Mobile: Automate Your Tests With Appium

Appium’s Philosophy4. A mobile automation framework shouldn’t reinvent

the wheel when it comes to APIs

• iOS: Apple’s UIAutomation, XCUITest in development

• Android: Google’s UIAutomator

Page 16: DevOps for Mobile: Automate Your Tests With Appium

Typical Appium Test

Page 17: DevOps for Mobile: Automate Your Tests With Appium

Typical Appium Test• Find UI elements and interact with them

• Make assertion about UI

• Test case mimics user’s use case

Page 18: DevOps for Mobile: Automate Your Tests With Appium

Problems With Our Test• High level and low levels of abstraction are

mixed

• Low readability

• No code reuse

Page 19: DevOps for Mobile: Automate Your Tests With Appium

Page Object Design Pattern

• Encapsulate low level interactions

• Test cases are readable

• Improved code reuse

Page 20: DevOps for Mobile: Automate Your Tests With Appium

With Page Object

Page 21: DevOps for Mobile: Automate Your Tests With Appium

Page Object Key Components

• Test Cases

• Page Objects

• Data Class

Page 22: DevOps for Mobile: Automate Your Tests With Appium

Our Test Case

Page 23: DevOps for Mobile: Automate Your Tests With Appium

Our Page Objects

Page 24: DevOps for Mobile: Automate Your Tests With Appium

Our Data Class

Page 25: DevOps for Mobile: Automate Your Tests With Appium

Running Tests in the Cloud

Page 26: DevOps for Mobile: Automate Your Tests With Appium

Test Portability• Tests are most useful when they’re portable

• You want your tests in Continuous Integration or on your colleagues laptop

• Appium tests can be in any of several languages

Page 27: DevOps for Mobile: Automate Your Tests With Appium
Page 28: DevOps for Mobile: Automate Your Tests With Appium

Docker• Docker is already an important tool in

DevOps

• Containers act as sandboxed environments

• These environments can include your dependencies and software

Page 29: DevOps for Mobile: Automate Your Tests With Appium

Docker• Let’s distribute our tests with Docker!

1. Create an image containing our tests and dependencies

2. Build a container using this image. This will run our tests

Page 30: DevOps for Mobile: Automate Your Tests With Appium

Our Dockerfile

Page 31: DevOps for Mobile: Automate Your Tests With Appium

What we’ve covered• Test Automation is an invaluable tool for

mobile development

• Appium is a flexible and powerful tool for Test Automation

• The Page Object design keeps our tests maintainable

• Integrate with Docker for portability

Page 32: DevOps for Mobile: Automate Your Tests With Appium

Questions and Answers

Page 33: DevOps for Mobile: Automate Your Tests With Appium

• contact me at: [email protected]

• visit our booth at DevOpsCon

• Sign up for a free trial at testobject.com