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
Four Tips for More Testable UI
Search
Jim Holmes
March 17, 2019
Technology
63
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Four Tips for More Testable UI
Quick talk given at the 2019 Microsoft MVP summit during the ALM group's MVP2MVP sessions.
Jim Holmes
March 17, 2019
More Decks by Jim Holmes
See All by Jim Holmes
Adapting to Change in Software Delivery
jimholmes
0
110
Public_Speaking.pdf
jimholmes
0
140
Trusted System Boundaries
jimholmes
0
130
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
160
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
73
Is Quality The Bottleneck?
jimholmes
0
150
Don't Fear Leadership
jimholmes
0
120
Intro To TDD
jimholmes
1
110
Honor Flight #20 (Bay Area) Recap
jimholmes
0
160
Other Decks in Technology
See All in Technology
AICoEでAIネイティブ組織への進化
yukiogawa
0
200
GoでCコンパイラを作った話
repunit
0
130
AI時代のYAGNI:「爆速で無駄になった機能」からの学び / 20260720 Naoki Takahashi
shift_evolve
PRO
3
380
ファミコンでPHPを動かす / PHP on the Famicom
tomzoh
2
480
41歳でAWSが好きすぎてITエンジニアになったおっさんの話
yama3133
0
120
LLMやAIエージェントをソフトウェアに組み込むプラクティス
shibuiwilliam
2
430
2年前に削除したPHPクラスが、 ある日突然決済をエラーにした
ykagano
1
470
AI時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
4
2.4k
生成AI×AWS CDK×AWS FISで"振り返れる"ミニGameDayをつくろう
yoshimi0227
1
430
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #kaigieffect_kaigi
sue445
PRO
0
150
CSに"SLO"は要らない、経営層に"99.9%"は伝わらない - SREを全社に"翻訳"する3原則
cscengineer
PRO
1
5.2k
「早く出す」より「事業に効く」 ── 顧客の業務サイクルから逆算するAI時代の二重ループ開発と「変化の設計者」 / devsumi2026
rakus_dev
1
420
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
420
Prompt Engineering for Job Search
mfonobong
0
380
Documentation Writing (for coders)
carmenintech
77
5.4k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
350
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
590
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.3k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
Tell your own story through comics
letsgokoyo
1
1k
Faster Mobile Websites
deanohume
310
32k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
650
Transcript
Testable UIs
Or: How to help your test automation folks drink less
[email protected]
@aJimHolmes
Fortune 10 client Java 6 Enterprise-ready components HP build and
SCM tools “What’s a unit test?”
Thank you ET
Generalized Talk Ideas apply to all UI and automation tools
https://github.com/jimholmes/ Demo-Site
Two main problems in all UI testing
Finding Stuff
Async
Also SharePoint
Finding stuff == Locators
For Web, prefer: IDs CSS/JQuery-ish Name Custom Attributes
As a last resort: XPath
None
Create Good Locators
0) Own Your HTML
None
None
None
FindElement.ById(“grid”)
None
None
1) Understand your controls / frameworks
None
None
None
FindElement.ByCss( “some big stupid CSS string”)
Someone changes style
None
None
None
FindElement.ById( “update-btn”)
2) Tweak dynamic data
None
Find elements by text content. Might not be granular enough.
None
None
No useful attributes
None
None
None
ID is position-based. Data changes, IDs change.
None
We own the code!
Is there some useful data in your objects?
None
None
None
None
None
FindElement.ById( contains(“Cobb”) )
“Name” isn’t all that useful. Got contract numbers? Project IDs?
Other stuff? Find good metadata!
3) Make complex async less painful
None
SharePoint
wait until expected condition 1 wait until expected condition 2
IF SOMETHING wait until expected condition 3 IF SOMETHING ELSE wait until expected condition 4 FINALLY wait until expected condition 342
We own the code!
Create “flags” when async is complete
None
None
None
None
None
Wait until flags.div(responseType=create) exists
0) Add static IDs 1) Tweak controls 2) Use data
for locators 3) Build flags/latches for complex async
None
https://github.com/jimholmes/ Demo-Site