35
Mobile Testing at Gilt Matt Isaacs @haveahennessy Gilt

Mobile Testing at Gilt

Embed Size (px)

DESCRIPTION

The slides from Gilt Senior Software Engineer Matt Isaacs' presentation for the Brooklyn iOS Developer Meetup, April 2014.

Citation preview

Page 1: Mobile Testing at Gilt

Mobile Testing at Gilt

Matt Isaacs@haveahennessy

Gilt

Page 2: Mobile Testing at Gilt

What is Gilt?

Page 3: Mobile Testing at Gilt

Luxe brands up to 60% off

Page 4: Mobile Testing at Gilt

Inventory Changes DailySales last 36 hours.

Page 5: Mobile Testing at Gilt

Sales start at noon ET.Bonus sales at 9PM, Sundays and Wednesdays.

Page 6: Mobile Testing at Gilt

Gilt MobileThe simplified story

Page 7: Mobile Testing at Gilt

iPhone • iPad • Android

Page 8: Mobile Testing at Gilt

Developers focus on building the App(s). QA handles testing - All of it.

No automation.

Informal Process

Page 9: Mobile Testing at Gilt

When feature sets were simple. When the team was small.

When the codebase was small.

No Big Deal

Page 10: Mobile Testing at Gilt

– Some App Store Reviews

“Perfect App !!! Well done”“Awesome app! Love it!”

“OMG! Amazing!”“Your app is great and keeps getting better."”

Page 11: Mobile Testing at Gilt

We added more features. The codebase grew.

The team grew.

Some time passed

Page 12: Mobile Testing at Gilt

5-stars become harder to getYou can’t please everyone - But still…

Page 13: Mobile Testing at Gilt

Informal process doesn't scale

Page 14: Mobile Testing at Gilt

Add some structureCI + Nightlies with Jenkins. Dogfooding with Hockey.

Code + git branching conventions.

Page 15: Mobile Testing at Gilt

And tests…

Page 16: Mobile Testing at Gilt

– NSHipster

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

Testing.”

Page 17: Mobile Testing at Gilt

How can this be?Objective-C is statically typed.

The compiler is awesome. TDD antipatterns - Cocoa makes heavy use of singletons.

Page 18: Mobile Testing at Gilt

~40% revenue comes from native mobile. Bad reviews hurt more than ever.

Increased pressure on QA.

Mounting cost of issues

Page 19: Mobile Testing at Gilt

So help out QAWrite some tests!

Page 20: Mobile Testing at Gilt

Bad habits are hard to breakMake time - Monthly testing hack-days.

Visibility - Make a scene when tests catch issues. Gentle, but firm approach.

Page 21: Mobile Testing at Gilt

Integration TestsUI + Functional tests. Notoriously difficult.

Provides the most benefit for QA.

Page 22: Mobile Testing at Gilt

AppiumSelenium webdriver for native mobile.

Actively developed. Open source.

Page 23: Mobile Testing at Gilt

Test

Appium

Instruments

App

HTTP

Unix Sockets

DTrace + Magic

Page 24: Mobile Testing at Gilt

Accessibility makes it work.Elements located via accessibility labels.

Be careful with container views. UIAccessibilityIdentifier is for tests.

Page 25: Mobile Testing at Gilt

Why we chose AppiumWe’ve already built Selenium infrastructure.

We already have Selenium skills. No SDK to compile in.

Page 26: Mobile Testing at Gilt

– Someone at Gilt

“Selenium is still too flaky. You can't trust the results. We need more dependable tests"

Page 27: Mobile Testing at Gilt

When should I wait? How long should I wait for?

Waiting

Page 28: Mobile Testing at Gilt

Where am I? Is it where I should be?

When should I be checking this?

State

Page 29: Mobile Testing at Gilt

Staging or Production? Painful issues with either.

Environment

Page 30: Mobile Testing at Gilt

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

Page Objects

Page 31: Mobile Testing at Gilt

When to wait? - Page object construction. Page objects represent state. Actions → State transitions

Solved!

Page 32: Mobile Testing at Gilt

Sore points.Accessibility.

Overlays and pass-throughs. Partially obscured controls.

Page 33: Mobile Testing at Gilt
Page 34: Mobile Testing at Gilt

End of the dayYou’ll need some process eventually.

It’s never too early - or late. TDD is not a religion.

Page 35: Mobile Testing at Gilt

Thankstech.gilt.com

@gilttech !

gilt.com/careers