Top Banner
iOS Testing with Appium Details learned the hard way
36

iOS Testing With Appium at Gilt

Jan 15, 2015

Download

Technology

Gilt Tech Talks

A talk by Gilt Senior Software Engineer Matt Isaacs for the Appium Roadshow, August 2014.
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: iOS Testing With Appium at Gilt

iOS Testing with AppiumDetails learned the hard way

Page 2: iOS Testing With Appium at Gilt

What is Gilt?

Page 3: iOS Testing With Appium at Gilt

Luxe brands up to 60% off

Page 4: iOS Testing With Appium at Gilt

Inventory Changes DailySales are available for a limited time.

Page 5: iOS Testing With Appium at Gilt

Sales start at noon ET.New sales start daily at 12pm, with bonus sales at 9pm.

Page 6: iOS Testing With Appium at Gilt

Gilt MobileCovers apps + mobile infrastructure.

Team of 12 (And counting). QA Team offsite.

Page 7: iOS Testing With Appium at Gilt

iPhone • iPad • Android

Page 8: iOS Testing With Appium at Gilt

Previously form Gilt MobileTest benefits need to be balanced with effort.

UI Tests offer the most benefit to QA. Increased revenue → Quality focus.

Really hard to change established practices.

Page 9: iOS Testing With Appium at Gilt

What are we automating?Full sanity - Can customers login in and buy stuff?

iPhone only. For now.

Page 10: iOS Testing With Appium at Gilt

Run daily at 19:15 EST…Tests take a long time.

Can conflict with customers.

Page 11: iOS Testing With Appium at Gilt

…On ProductionInfrastructure is quite complex.

Infrastructure is constantly evolving. Impractical to mock.

Page 12: iOS Testing With Appium at Gilt

Why Appium?We’ve already built Selenium infrastructure.

We already have Selenium skills.

Page 13: iOS Testing With Appium at Gilt

All part of the Philosophy!No SDK to compile in.

Strong open source community. Cross-platform support.

Page 14: iOS Testing With Appium at Gilt

No libs? What is this sorcery?Appium serves as a webdriver proxy for UIAutomation.

Part of instruments.

Page 15: iOS Testing With Appium at Gilt

Accessibility makes it workUIAutomation drives apps via iOS Accessibility.

Elements located by accessibility labels.

Page 16: iOS Testing With Appium at Gilt

Where do we start?We already have the Selenium fundamentals.

We’re already mostly accessible. Lets build some page objects.

Page 17: iOS Testing With Appium at Gilt

Convention on top of Actions and Locators. Page validated during construction. Actions return new page objects.

What are Page Objects?

Page 18: iOS Testing With Appium at Gilt

When to wait? - Page object construction. Page objects represent state.

Actions → State transitions

Solves some reliability issues

Page 19: iOS Testing With Appium at Gilt

Sore points.Accessibility.

Overlays and pass-throughs. Partially obscured controls.

Execution time.

Page 20: iOS Testing With Appium at Gilt
Page 21: iOS Testing With Appium at Gilt

About that Accessibility thingYou’re probably not accessible enough.

Container views hide their contents!

Page 22: iOS Testing With Appium at Gilt

Accessibility isn't overheadGood for your users and your tests. UIAccessibilityIdentifier is for tests.

Implementing UIAccessibilityContainer helps.

Page 23: iOS Testing With Appium at Gilt

That’s a lot of workAccessibility feels like overhead.

Rich Views → Complex Page Objects

Page 24: iOS Testing With Appium at Gilt

But wait! There’s more work!We still need to write the actual tests.

Page Objects might require some debugging.

Page 25: iOS Testing With Appium at Gilt

Debug Page Objects?Test code needs tests?

Page 26: iOS Testing With Appium at Gilt

(╯°□°)╯︵ ┻━┻Too. Much. Work.

Page 27: iOS Testing With Appium at Gilt

Issue amplified by cultureNo problem in enterprise.

Mobile seems to be different.

Page 28: iOS Testing With Appium at Gilt

– NSHipster

“Objective-C developers have, for the most part, remained relatively apathetic to Unit

Testing.”

Page 29: iOS Testing With Appium at Gilt

Issue amplified by cultureApp features take priority. Testing delegated to QA. QA is doing a great job!

Page 30: iOS Testing With Appium at Gilt

Artist dont Test!They might if it doesn’t get in the way.

Page 31: iOS Testing With Appium at Gilt

The hardest partGetting the team involved.

Page 32: iOS Testing With Appium at Gilt

Not knocking the teamPeople are busy.

They understand the benefits of testing. Benefits need to be balanced with effort.

Page 33: iOS Testing With Appium at Gilt

The TakeawayThe overhead involved is a developer deterrent. Appium tests are not yet integral to our process.

But Appium is only getting better.

Page 34: iOS Testing With Appium at Gilt

Buy some cool stuff!!Preferably on mobile.

Page 35: iOS Testing With Appium at Gilt

Give us a visit

tech.gilt.com @gilttech

Page 36: iOS Testing With Appium at Gilt

Thanks!

Matt Isaacs @haveahennessy