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
[AWS Summit Japan 2026]迷っているあなたへ_小さな一歩が、やがて自分を助けてくれる
sh_fk2
2
410
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
120
2026年6月23日 Syncable Tech + Start Python Club にて
hamukazu
0
150
ロボティクスの技術 / Robotics Technology
ks91
PRO
0
130
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
180
いまさら聞けない「仕様駆動開発入門」 〜AI活用時代の開発プロセスを考える〜
findy_eventslides
2
200
入門!AWS Blocks
ysuzuki
1
190
秘密度ラベル初心者が第1歩でつまづかないための「設計・運用」ポイント
seafay
PRO
1
480
AI-DLCを “そのまま導入しなかった”話 ~組織に合わせてアジャストした 私たちの実践共有~
hiroramos4
PRO
1
430
AIのReact習熟度を測る
uhyo
2
680
クレデンシャル流出 ― 攻撃 3 時間 vs 復旧 10 時間。この非対称性にどう備えるか
kazzpapa3
3
560
4人目のSREはAgent
tanimuyk
0
180
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
360
Believing is Seeing
oripsolob
1
150
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Google's AI Overviews - The New Search
badams
0
1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Side Projects
sachag
455
43k
Ruling the World: When Life Gets Gamed
codingconduct
0
260
Un-Boring Meetings
codingconduct
0
320
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
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