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
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
Digitization部 紹介資料
sansan33
PRO
1
6.8k
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
180
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
180
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
150
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
ファインディの横断SREがTakumi byGMOと取り組む、セキュリティと開発スピードの両立
rvirus0817
1
1.3k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
超初心者からでも大丈夫!オープンソース半導体の楽しみ方〜今こそ!オレオレチップをつくろう〜
keropiyo
0
110
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
3.2k
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
450
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
400
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Code Review Best Practice
trishagee
74
20k
Abbi's Birthday
coloredviolet
1
4.7k
How to Ace a Technical Interview
jacobian
281
24k
How STYLIGHT went responsive
nonsquared
100
6k
The SEO identity crisis: Don't let AI make you average
varn
0
240
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