firefox os real-phone automation lab: goals, challenges, and successes

23
Building a 40+ real-phone test-automation lab for Firefox OS: Goals, Challenges, Accomplishments San Francisco Selenium Meetup Group November 19, 2014 Stephen Donner [email protected]

Upload: stephen-donner

Post on 02-Jul-2015

374 views

Category:

Engineering


3 download

DESCRIPTION

You might not find much information on the topic of large-scale, real-device (phone) test-automation labs, searching the Web. At least, Stephen and his team didn't, and, chartered with designing, building, and maintaining a Firefox OS phone-automation lab of over 40 devices, from the ground up, will share their goals, many challenges, successes, and lots of lessons learned along the way.

TRANSCRIPT

Page 1: Firefox OS real-phone automation lab: goals, challenges, and successes

Building a 40+ real-phone test-automation lab for Firefox

OS:

Goals, Challenges, Accomplishments

San Francisco Selenium Meetup Group

November 19, 2014

Stephen Donner

[email protected]

Page 2: Firefox OS real-phone automation lab: goals, challenges, and successes

Goals:

● (much) greater capacity

o keep up with b2g-inbound builds for UI + perf (esp. the latter), as much

as possible

● maximal use of resources (devices, limited personnel, etc.)

● multi-node adb mapping/support

● high[er|est] reliability

● easier device troubleshooting/administration

● break new ground and help inform the testing world

Page 3: Firefox OS real-phone automation lab: goals, challenges, and successes

From this...

(which itself is “test rig 3.0” -- if you can believe that!)

Page 4: Firefox OS real-phone automation lab: goals, challenges, and successes

1st Buildout

Page 5: Firefox OS real-phone automation lab: goals, challenges, and successes

To this...

Page 6: Firefox OS real-phone automation lab: goals, challenges, and successes

2nd Buildout

Page 7: Firefox OS real-phone automation lab: goals, challenges, and successes

Present day

(Bam!)

Page 8: Firefox OS real-phone automation lab: goals, challenges, and successes
Page 9: Firefox OS real-phone automation lab: goals, challenges, and successes

Challenges: (1/4)

● balancing aggressive buildout schedule and challenge with current-rig’s maintenance (a.k.a.

“changing a plane’s engine at 30,000 feet”)

● near-constant task (re)prioritization (a.k.a “new capabilities, new requests/demands”)

● real carriers/networks (AT&T/T-Mobile), real problems:

o spam calls/voicemail

o Amber alerts

o low signal strength/data-connection resets

slow throughput

DNS-lookup failures

o logistics of provisioning 40 SIMs

● phone flashing (en masse):

o base (OEM/vendor/reference) build

non-engineering

● vs.

o daily builds (release candidates, nightlies, etc.)

o aggressive power-management features

Page 10: Firefox OS real-phone automation lab: goals, challenges, and successes

Challenges: (2/4)

● multi-node adb mapping

o solution had to work with both UI and perf tests

o also required:

Jenkins-config changes (job/system)

physical reconfiguration

● and powered hubs

● active SIMs vs. inactive SIMs

o reduce interference/cost/maintenance cost

● DSDS (Dual SIM, Dual Standby)

● SecOps/NetOps requirements

o new office, new problems (new policies)

basically, new office == slackware of offices ;-)

port-by-port, host-by-host firewall pass-through

o VPN/Jenkins (CI) access granted on a user-by-user basis

Page 11: Firefox OS real-phone automation lab: goals, challenges, and successes

Challenges: (3/4)

● RF (Radio Frequency)

o Wi-Fi

ateam vs. Mozilla Mobile

● capacity + speed + reach

o channels, bands, new router vendor

o FM tuner interference

requires cabling magic

● ...and perhaps a low-power, local FM transmitter?

o more devices, moar interference?

● physical space/configuration

o shelving space

o power-strip capacity

Page 12: Firefox OS real-phone automation lab: goals, challenges, and successes

Challenges: (4/4)

● remote teams requested live Air Mozilla streams of the phones, i.e. “what in

the world is the state of that phone in?”

o prototype works, but doesn’t immediately scale bandwidth (# streams,

codecs/encoders)

informs # of encoder boxes/# of channels

o live (remote) demo

● “keeping the light on”

o camera test failures due to low light

...but intermittent

Page 13: Firefox OS real-phone automation lab: goals, challenges, and successes
Page 14: Firefox OS real-phone automation lab: goals, challenges, and successes

Multi-node adb MappingBackground:

● Jenkins allows many "nodes" to run on 1 host

● ‘node’ meaning ‘agent’

● ADB permits multiple sessions on 1 host

● $ adb -s <serial_num> <command>

Problems:

● Some vendors don't provide a unique serial

● Sometimes OEM (base build) may have same serial number hard-coded in all devices!

o You might not have any control over this :-(

o There are tools for unpacking Android base images and rewriting those serial numbers:

https://github.com/AndroidRoot/BootTools

Solution:

● Create 1 unique node per mobile device

● This = 4 devices to one slave host, 1 per USB port

● Manage scripts - modify our scripts to pass in device serial numbers (to all adb commands)

Page 15: Firefox OS real-phone automation lab: goals, challenges, and successes

Currently*, we have:

● ~30 active Flame nodes (phones)

o 15 dedicated to UI / 12 perf

o 26 potentially

● attached to 13 active Mac Minis

Page 16: Firefox OS real-phone automation lab: goals, challenges, and successes
Page 17: Firefox OS real-phone automation lab: goals, challenges, and successes
Page 18: Firefox OS real-phone automation lab: goals, challenges, and successes
Page 19: Firefox OS real-phone automation lab: goals, challenges, and successes
Page 20: Firefox OS real-phone automation lab: goals, challenges, and successes

What (was?) is Left?

● MozPool[1] for managing devices, including:

o taking devices offline

o power measurement through in-house, custom-3D-printed ammeters

o remote-reboot capability through power harness

● Puppetization for managing node configurations

[1] https://github.com/mozilla/mozpool

Page 21: Firefox OS real-phone automation lab: goals, challenges, and successes
Page 22: Firefox OS real-phone automation lab: goals, challenges, and successes

Credit Where Credit is Due

● Malini Das

● Raymond Etornam

● Jonathan Griffin

● Andrew Halberstadt

● Dave Hunt

● Johan Lorenzo

● Richard Milewski

● Richard Pappalardo

● Clint Talbert

● Dylan Wong

● Rob Wood

o … and everyone else I forgot!

Page 23: Firefox OS real-phone automation lab: goals, challenges, and successes

Contact

● Mailing list: [email protected]

● Team page: https://quality.mozilla.org/teams/web-qa/

● IRC: #mozwebqa on irc.mozilla.org