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
Automate All The Things!
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Tim Bugai
April 29, 2013
Technology
0
59
Automate All The Things!
Adding automated user interface testing to your iOS project.
Tim Bugai
April 29, 2013
Tweet
Share
More Decks by Tim Bugai
See All by Tim Bugai
A Frank Discussion About iOS BDD
tbugai
0
100
RubyMotion
tbugai
0
140
Other Decks in Technology
See All in Technology
Red Hat OpenStack Services on OpenShift
tamemiya
0
100
OpenShiftでllm-dを動かそう!
jpishikawa
0
100
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
220
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
450
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
400
IaaS/SaaS管理における SREの実践 - SRE Kaigi 2026
bbqallstars
4
2.2k
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
170
Agile Leadership Summit Keynote 2026
m_seki
1
610
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
240
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
180
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
4
1.3k
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
Paper Plane
katiecoart
PRO
0
46k
Exploring anti-patterns in Rails
aemeredith
2
250
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.9k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Paper Plane (Part 1)
katiecoart
PRO
0
4.2k
Transcript
Automate All The Things! Adding automated tests to your iOS
project Wednesday, May 1, 13
Tim Bugai Wednesday, May 1, 13
Tim Bugai Network Administrator Wednesday, May 1, 13
Tim Bugai Network Administrator Agile Transformation Consultant Wednesday, May 1,
13
Tim Bugai Network Administrator Agile Transformation Consultant Java Wednesday, May
1, 13
Tim Bugai Network Administrator Agile Transformation Consultant Rubyist Java Wednesday,
May 1, 13
Tim Bugai Network Administrator Agile Transformation Consultant Rubyist Java iOS
Developer Wednesday, May 1, 13
Tim Bugai Network Administrator Agile Transformation Consultant Rubyist Java iOS
Developer DAD!!! Wednesday, May 1, 13
Wednesday, May 1, 13
Tenn Pinn Wednesday, May 1, 13
Tenn Pinn Wednesday, May 1, 13
Tenn Pinn Downside Wednesday, May 1, 13
grocery list app Wednesday, May 1, 13
UIAutomation Wednesday, May 1, 13
Objective-C Wednesday, May 1, 13
Objective-C Javascript Wednesday, May 1, 13
Instruments Wednesday, May 1, 13
Instruments Wednesday, May 1, 13
var target = UIATarget.localTarget(); var app = target.frontMostApp(); var window
= app.mainWindow(); target.logElementTree(); Wednesday, May 1, 13
var target = UIATarget.localTarget(); var app = target.frontMostApp(); var window
= app.mainWindow(); target.logElementTree(); Wednesday, May 1, 13
var target = UIATarget.localTarget(); var app = target.frontMostApp(); var window
= app.mainWindow(); target.logElementTree(); Wednesday, May 1, 13
var target = UIATarget.localTarget(); var app = target.frontMostApp(); var window
= app.mainWindow(); var table = window.tableViews()[0]; var cells = table.cells(); var testName = "Mark of Item"; UIALogger.logStart(testName); var cell = cells.firstWithName("Milk") if (cell.isValid()) { cell.tap(); } else { UIALogger.logFail(testName); } cell = cells.firstWithName("Milk-Acquired"); if (cell.isValid()) { UIALogger.logPass(testName); } else { UIALogger.logFail(testName); } Wednesday, May 1, 13
Pass Wednesday, May 1, 13
Accessibility Labels Wednesday, May 1, 13
Accessibility Labels “Milk” Wednesday, May 1, 13
Accessibility Labels “Milk” “Milk-Acquired” Wednesday, May 1, 13
Accessibility Labels Do NOT set them on a container element
unless you know what you are doing! Wednesday, May 1, 13
Accessibility Inspector Wednesday, May 1, 13
Accessibility Inspector Wednesday, May 1, 13
Accessibility Inspector Wednesday, May 1, 13
bwoken Wednesday, May 1, 13
Gemfile source :rubygems gem 'bwoken' Wednesday, May 1, 13
Gemfile Rakefile source :rubygems gem 'bwoken' require 'bwoken/tasks' Wednesday, May
1, 13
rake bwoken:init Wednesday, May 1, 13
rake bwoken:init integration/javascript/iphone Wednesday, May 1, 13
rake bwoken:init integration/javascript/iphone rake Wednesday, May 1, 13
rake bwoken:init integration/javascript/iphone rake Wednesday, May 1, 13
target = UIATarget.localTarget() app = target.frontMostApp() window = app.mainWindow() table
= window.tableViews()[0] cells = table.cells() testName = "Mark of Item" UIALogger.logStart(testName) cell = cells.firstWithName("Milk") if cell.isValid() cell.tap() else UIALogger.logFail(testName) cell = cells.firstWithName("Milk-Acquired") if cell.isValid() UIALogger.logPass(testName) else UIALogger.logFail(testName) Coffeescript Wednesday, May 1, 13
tune_up.js Wednesday, May 1, 13
test "Mark off item", (target, app) -> table = app.mainWindow().tableViews()[0]
cells = table.cells() cell = cells.firstWithName("Milk") assertNotNull(cell) cell.tap() cell = cells.firstWithName("Milk-Acquired") assertNotNull(cell) Wednesday, May 1, 13
Device Rotation #github "alexvollmer/tuneup_js/tuneup.js" test "Add a new item", (target,
app) -> target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT) table = app.mainWindow().tableViews()[0] cells = table.cells() assertEquals 3, cells.length target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_LANDSCAPELEFT) app.keyboard().typeString("Cheese\n") target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT) assertEquals 4, table.cells().length assertNotNull table.cells()["Cheese"] Wednesday, May 1, 13
Device Rotation #github "alexvollmer/tuneup_js/tuneup.js" test "Add a new item", (target,
app) -> target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT) table = app.mainWindow().tableViews()[0] cells = table.cells() assertEquals 3, cells.length target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_LANDSCAPELEFT) app.keyboard().typeString("Cheese\n") target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT) assertEquals 4, table.cells().length assertNotNull table.cells()["Cheese"] Wednesday, May 1, 13
Swipe Gesture #github "alexvollmer/tuneup_js/tuneup.js" test "delete an item", (target, app)
-> target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT) table = app.mainWindow().tableViews()[0] cell = table.cells().firstWithName('Eggs') assertNotNull cell cell.dragInsideWithOptions({startOffset:{x:0.0, y:0.1}, endOffset:{x:0.5, y:0.1}, duration:0.25}) deleteButton = table.cells().firstWithName('Eggs').buttons()[0] assertNotNull deleteButton deleteButton.tap() assertEquals 2, table.cells().length assertNull table.cells().firstWithName("Eggs") Wednesday, May 1, 13
Cons Pros Wednesday, May 1, 13
Cons Pros •Apple uses it Wednesday, May 1, 13
Cons •Apple uses it Pros •Apple uses it Wednesday, May
1, 13
Cons •Apple uses it •Documentation is lacking Pros •Apple uses
it Wednesday, May 1, 13
Cons •Apple uses it •Documentation is lacking •CoreData is hard
Pros •Apple uses it Wednesday, May 1, 13
Cons •Apple uses it •Documentation is lacking •CoreData is hard
•Can’t mock interfaces Pros •Apple uses it Wednesday, May 1, 13
Continuous Integration Wednesday, May 1, 13
Travis CI Wednesday, May 1, 13
Travis CI Open Source Wednesday, May 1, 13
Travis CI Open Source .travis.yml language: objective-c before_script: rake xcode:cleanbuild
script: rake Wednesday, May 1, 13
Travis CI Open Source Gemfile source :rubygems gem 'xcodebuild-rb' gem
'bwoken' Wednesday, May 1, 13
Travis CI Open Source Rakefile require 'rubygems' require 'xcodebuild' require
'bwoken/tasks' XcodeBuild::Tasks::BuildTask.new do |t| t.configuration = "Debug" t.sdk = "iphonesimulator" t.formatter = XcodeBuild::Formatters::ProgressFormatter.new end Wednesday, May 1, 13
cisimple.com Wednesday, May 1, 13
Jenkins Wednesday, May 1, 13
fin Wednesday, May 1, 13
Tim Bugai @timbugai
[email protected]
github.com/tbugai/grocery-list speakerdeck.com/tbugai/automate-all-the-things Wednesday, May 1, 13