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
57
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
98
RubyMotion
tbugai
0
140
Other Decks in Technology
See All in Technology
激動の時代、新卒エンジニアはAIツールにどう向き合うか。 [LayerX Bet AI Day Countdown LT Day1 ツールの選択]
tak848
0
600
自分がLinc’wellで提供しているプロダクトを理解するためにやったこと
murabayashi
1
160
The Madness of Multiple Gemini CLIs Developing Simultaneously with Jujutsu
gunta
1
2.7k
MCPに潜むセキュリティリスクを考えてみる
milix_m
1
840
大規模組織にAIエージェントを迅速に導入するためのセキュリティの勘所 / AI agents for large-scale organizations
i35_267
6
310
20250719_JAWS_kobe
takuyay0ne
1
170
完璧を目指さない小さく始める信頼性向上
kakehashi
PRO
0
100
OpenTelemetry の Log を使いこなそう
biwashi
5
1.1k
AI駆動開発 with MixLeap Study【大阪支部 #3】
lycorptech_jp
PRO
0
260
MCPと認可まわりの話 / mcp_and_authorization
convto
2
270
OTel 公式ドキュメント翻訳 PJ から始めるコミュニティ活動/Community activities starting with the OTel official document translation project
msksgm
0
290
AWS表彰プログラムとキャリアについて
naoki_0531
1
130
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
370
YesSQL, Process and Tooling at Scale
rocio
173
14k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Scaling GitHub
holman
461
140k
Documentation Writing (for coders)
carmenintech
72
4.9k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Code Review Best Practice
trishagee
69
19k
Building an army of robots
kneath
306
45k
For a Future-Friendly Web
brad_frost
179
9.8k
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