DevOps for Mobile: Automate Your Tests With Appium

  • View
    466

  • Download
    3

  • Category

    Mobile

Preview:

Citation preview

Chris Lample - TestObject

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

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

About TestObject

• Based in Berlin!

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

Challenges of Mobile Development

• Different OSs

• Different OS versions

• Device model fragmentation

• Wide range of screen-sizes

Test AutomationKey Benefits

• Shorten release cycle

• Increase app store ratings

• Test efficiently

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 ...

About Appium

Cross-Platform Cross Technology

Automate with your language of choice

How It Works

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

or modify it in order to automate it.

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.

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!

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

Typical Appium Test

Typical Appium Test• Find UI elements and interact with them

• Make assertion about UI

• Test case mimics user’s use case

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

mixed

• Low readability

• No code reuse

Page Object Design Pattern

• Encapsulate low level interactions

• Test cases are readable

• Improved code reuse

With Page Object

Page Object Key Components

• Test Cases

• Page Objects

• Data Class

Our Test Case

Our Page Objects

Our Data Class

Running Tests in the Cloud

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

Docker• Docker is already an important tool in

DevOps

• Containers act as sandboxed environments

• These environments can include your dependencies and software

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

Our Dockerfile

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

Questions and Answers

• contact me at: clample@testobject.com

• visit our booth at DevOpsCon

• Sign up for a free trial at testobject.com

Recommended