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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
220
配列に見る bash と zsh の違い
kazzpapa3
1
140
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.3k
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
640
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
150
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
110
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
230
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
450
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
570
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
150
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
210
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
3.1k
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Abbi's Birthday
coloredviolet
1
4.7k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Visualization
eitanlees
150
17k
Faster Mobile Websites
deanohume
310
31k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Six Lessons from altMBA
skipperchong
29
4.1k
Become a Pro
speakerdeck
PRO
31
5.8k
Done Done
chrislema
186
16k
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