Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Automation Tests at Babylon
Search
Ilya Puchka
October 03, 2018
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Automation Tests at Babylon
Ilya Puchka
October 03, 2018
More Decks by Ilya Puchka
See All by Ilya Puchka
Dependency Injection in Swift
ilyapuchka
2
1.6k
Other Decks in Programming
See All in Programming
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
210
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
160
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
170
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
770
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
300
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
260
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
480
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
350
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
450
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
450
What's New in Android 2026
veronikapj
0
250
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
260
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
480
Documentation Writing (for coders)
carmenintech
77
5.4k
Evolving SEO for Evolving Search Engines
ryanjones
0
250
Google's AI Overviews - The New Search
badams
0
1.1k
Building an army of robots
kneath
306
46k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Side Projects
sachag
455
43k
Optimizing for Happiness
mojombo
378
71k
Designing for humans not robots
tammielis
254
26k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Code Review Best Practice
trishagee
74
20k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.2k
Transcript
Automation Tests at Babylon
What we will talk about: — What issues do we
face in UI tests — How do we solve them — BDD-style UI tests — Tooling
What we will not talk about: — Why — How
— What to test
What issues do we face? — unexpected failures — performance
— scenarios hard to automate & hard to test manually
Content stability
External system actions required — start/complete appointment — subscribe prescription
— answer patient question — etc
Network stability* * https://techcrunch.com/2016/07/13/facebook-lifts- the-veil-on-its-mobile-device-lab
Performance Repeated test steps — register new user — open
Appointments tab — enter your symptoms — book an appointment — add payment method — confirm payment
large tests, faster test suite vs focused tests, slower test
suite
How do we solve that?
Control the World** — Control the network — Control the
initial state of the app ** C. Montgomery Burns' Handbook of World Domination By Matt Groening.
How to control the network control == own data
How to control the network — from inside the app
— from inside the test runner
From inside the app - in-app stubs — straightforward ✅
— integrates in application code — not very flexible ❌
From inside test runner - local web server — harder
to setup ❌ — integrates in test runner ✅ — very flexible ✅
Local server setup In the app: — switch environment
Local server setup In the app: — allow local networking
in the app
Local server setup In the test: — web server implementation
(Ambassador, GCDWebServer, swifter, Kitura, SwiftNIO, ...) — request interception
Local server setup In the test: — web server implementation
(Ambassador, GCDWebServer, swifter, Kitura, SwiftNIO, ...) — request interception
Local server edge cases — Parallel testing — Absolute urls
in responses — Overriding response size
Local web server use cases — Logging — Snapshots —
Full mocks
Network session recording — Record and replay using mock URLSession
(Vinyl, DVR) — detect recording mode — configure matching strategy — create URLSession mock
Network session recording — Record random test input — match
full request — record random body data in a file
Network session recording — Override current date
Mocked backend — mock everything ❌ — a lot of
boilerplate code to write — total control ✅
Network stability Content stability ✅
Tests performance
Tests performance Shortcuts via launch arguments — Special feature toggles
— User defaults overrides — Memory storage
Tests performance API calls from tests — to register a
new user — to add a family member — to book an appointment — etc
BDD-style tests
None
None
Tests building blocks — Page Objects — Step Definers —
Features (XCTestCase)
None
Links Web servers envoy/Ambassador httpswift/swifter swisspol/GCDWebServer Snapshots Velhotes/Vinyl venmo/DVR BDD
tests net-a-porter-mobile/XCTest-Gherkin Ahmed-Ali/Cucumberish Other tools TitouanVanBelle/XCTestHTMLReport