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
0
46
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
Tweet
Share
More Decks by Jim Holmes
See All by Jim Holmes
Adapting to Change in Software Delivery
jimholmes
0
60
Public_Speaking.pdf
jimholmes
0
72
Trusted System Boundaries
jimholmes
0
77
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
94
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
48
Is Quality The Bottleneck?
jimholmes
0
110
Don't Fear Leadership
jimholmes
0
73
Intro To TDD
jimholmes
1
63
Honor Flight #20 (Bay Area) Recap
jimholmes
0
110
Other Decks in Technology
See All in Technology
製造業からパッケージ製品まで、あらゆる領域をカバー!生成AIを利用したテストシナリオ生成 / 20250627 Suguru Ishii
shift_evolve
PRO
1
160
Understanding_Thread_Tuning_for_Inference_Servers_of_Deep_Models.pdf
lycorptech_jp
PRO
0
150
Geminiとv0による高速プロトタイピング
shinya337
0
200
CursorによるPMO業務の代替 / Automating PMO Tasks with Cursor
motoyoshi_kakaku
2
810
mrubyと micro-ROSが繋ぐロボットの世界
kishima
2
380
Amazon Bedrockで実現する 新たな学習体験
kzkmaeda
2
690
開発生産性を組織全体の「生産性」へ! 部門間連携の壁を越える実践的ステップ
sudo5in5k
0
570
KubeCon + CloudNativeCon Japan 2025 Recap Opening & Choose Your Own Adventureシリーズまとめ
mmmatsuda
0
240
Delegating the chores of authenticating users to Keycloak
ahus1
0
130
B2C&B2B&社内向けサービスを抱える開発組織におけるサービス価値を最大化するイニシアチブ管理
belongadmin
0
310
OpenHands🤲にContributeしてみた
kotauchisunsun
1
500
AI専用のリンターを作る #yumemi_patch
bengo4com
4
2.2k
Featured
See All Featured
A better future with KSS
kneath
239
17k
Scaling GitHub
holman
459
140k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
How STYLIGHT went responsive
nonsquared
100
5.6k
Agile that works and the tools we love
rasmusluckow
329
21k
YesSQL, Process and Tooling at Scale
rocio
173
14k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
800
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
230
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