Pavel Kulagin
Scaling Mobile Automation
…probably not just mobile in the end…
Pavel Kulagin
Hello, my name is
github.com/badoo
badootech.badoo.com
github.com/kuwizard
Professional focus: QA & mobile since 2009
Background: big Russian companies - Yandex and OK
Current role: scaling automation at Badoo for the last 2.5 years
About
350m
Messages per day
380m
Registered users
worldwide
60m
Monthly active users
300k
New daily sign ups
Agenda
First tests and first problems
Increasing amount of tests
Company culture
Tips & Tricks
Mythbusting
Why Automate?
We need tests to provide confidence
that the software being released to
production works as intended
“
”
— Sathish Gogineni,
Badoo mobile automation team lead
Continuous Integration
• The first few tests are green
• It takes only 10 minutes to run all of the tests
• We’ve even included tests for the automated
deployment pipeline!
Build Release
Internal
App
Store
QA
Auto
Tests
Auto
Tests
Build
Internal
App
Store
QA Release
Auto
Tests
Auto
Tests
Build
Internal
App
Store
QA Release
Auto
Tests
Auto
Tests
Build
Flaky tests
Auto
Tests
Auto
Tests
Build
Slow tests
Flaky tests
• Flaky App
Wait for specific event
Backdoors
• Wait/sleeps
• User is not eligible
Flaky tests
Flaky tests
• Fragile Locators
• Flaky App
Wait for specific event
Backdoors
Use server API to get users
• Wait/sleeps
• User is not eligible
Fragile locator example
(//div[contains(@title,’title’)]//p[text()="Some Text 1”]/following-sibling::span[5]/parent/)[position() < 6]
Flaky tests
• I know this test fails usually
• Fragile Locators
Work with/as a
developer
Debug and fix it!
• Flaky App
Wait for specific event
Backdoors
Use server API to get users
• Wait/sleeps
• User is not eligible
• Slow response from server
Slow tests
• Something else
• Tests do some repetitive
actions
• Slow infrastructure
Mock it
Backdoors again!
😥
Analyse every test
step-by-step and
think bigger
Build
Internal
App
Store
QA Release
Auto
Test
Build
Internal
App Store
QA
Release
Fixes
Happy release pipeline
Mutes
Auto
Tests
Auto
Tests
Auto
Tests
First tests and first problems
Increasing amount of tests
Company culture
Tips & Tricks
Mythbusting
Agenda
Scaling is…
NOT about
increasing amount of UI tests!
Manual
QA
Test Pyramid
Integration
tests
Unit tests
UI
tests
Test Pyramid
Integration
tests
Unit
tests
UI
tests
Test Pyramid
UI
tests
Integration
tests?
Unit
tests?
Test Pyramid
Integration
tests
Unit tests
UI
tests
Agenda
First tests and first problems
Increasing amount of tests
Company culture
Tips & Tricks
Mythbusting
Company culture
Company culture
• Help, don’t obstruct
• Move away from the “Devs VS QA” paradigm
• Help, don’t obstruct
• Move away from the “Devs VS QA” paradigm
Company culture
• Calculate the time you saved for others
Calculations example
Before After
x
3 days
Total: 12 person-days
x
2 days
=
6 person-days
x
0.5 days
=
0.5 person-days
Total: 6.5 person-days
• Help, don’t obstruct
• Move away from the “Devs VS QA” paradigm
• Calculate the time you saved for others
• Use company resources (people)
• Involve others to contribute
• Make it easy to procure hardware
Company culture
• Gather feedback for your tool and make it convenient to use
Fast-forward to the future
Agenda
First tests and first problems
Increasing amount of tests
Company culture
Tips & Tricks
Mythbusting
• Treat automation code as production one
• Support parallelisation (Selenium Grid?)
• Smartify your test runs
• Write documentation
• Make first start as easy as possible
Tips & Tricks
Automation framework installation instructions
Before After
• Install Docker
• Run docker-compose run <options> test <tests>
Agenda
First tests and first problems
Increasing amount of tests
Company culture
Tips & Tricks
Mythbusting
Mythbusting
Mythbusting
• You can automate 100% of functionality (and dismiss QAs)
• You should test everything on real devices only
Mythbusting
• We need to cover every possible environment
• Every test should be atomic - check one thing only
• You can automate 100% of functionality (and dismiss QAs)
• You should test everything on real devices only
Summary
• Decrease flakiness
• Increase speed
• Make easy-to-use tool
• Keep the test pyramid in mind
• Support developers & QA
Thank you!
Pavel Kulagin
pavel.kulagin@corp.badoo.com
kuwizard

Scaling mobile automation by Pavel Kulagin