$30 off During Our Annual Pro Sale. View Details »
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
99
RubyMotion
tbugai
0
140
Other Decks in Technology
See All in Technology
GitLab Duo Agent Platformで実現する“AI駆動・継続的サービス開発”と最新情報のアップデート
jeffi7
0
200
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
ブロックテーマとこれからの WordPress サイト制作 / Toyama WordPress Meetup Vol.81
torounit
0
380
re:Invent2025 コンテナ系アップデート振り返り(+CloudWatchログのアップデート紹介)
masukawa
0
280
Ruby で作る大規模イベントネットワーク構築・運用支援システム TTDB
taketo1113
1
110
21st ACRi Webinar - Univ of Tokyo Presentation Slide (Ayumi Ohno)
nao_sumikawa
0
120
Agents IA : la nouvelle frontière des LLMs (Tech.Rocks Summit 2025)
glaforge
0
490
【CEDEC+KYUSHU2025】学生・若手必見!テクニカルアーティスト 大全 ~仕事・スキル・キャリアパス、TAの「わからない」を徹底解剖~
cygames
PRO
0
140
因果AIへの招待
sshimizu2006
0
820
知っていると得する!Movable Type 9 の新機能を徹底解説
masakah
0
310
AI時代におけるアジャイル開発について
polyscape_inc
0
120
乗りこなせAI駆動開発の波
eltociear
1
860
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
The Pragmatic Product Professional
lauravandoore
37
7.1k
The Cult of Friendly URLs
andyhume
79
6.7k
Side Projects
sachag
455
43k
Producing Creativity
orderedlist
PRO
348
40k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Code Reviewing Like a Champion
maltzj
527
40k
Done Done
chrislema
186
16k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
Site-Speed That Sticks
csswizardry
13
990
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