$30 off During Our Annual Pro Sale. View Details »
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
49
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
72
Public_Speaking.pdf
jimholmes
0
93
Trusted System Boundaries
jimholmes
0
90
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
110
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
55
Is Quality The Bottleneck?
jimholmes
0
130
Don't Fear Leadership
jimholmes
0
90
Intro To TDD
jimholmes
1
78
Honor Flight #20 (Bay Area) Recap
jimholmes
0
130
Other Decks in Technology
See All in Technology
Bakuraku Engineering Team Deck
layerx
PRO
12
6.9k
Microsoft Agent 365 を 30 分でなんとなく理解する
skmkzyk
1
500
pmconf2025 - データを活用し「価値」へ繋げる
glorypulse
0
660
第4回 「メタデータ通り」 リアル開催
datayokocho
0
110
Agentic AI Patterns and Anti-Patterns
glaforge
1
190
新 Security HubがついにGA!仕組みや料金を深堀り #AWSreInvent #regrowth / AWS Security Hub Advanced GA
masahirokawahara
1
1k
技術以外の世界に『越境』しエンジニアとして進化を遂げる 〜Kotlinへの愛とDevHRとしての挑戦を添えて〜
subroh0508
1
360
SSO方式とJumpアカウント方式の比較と設計方針
yuobayashi
5
220
バグハンター視点によるサプライチェーンの脆弱性
scgajge12
3
840
pmconf2025 - 他社事例を"自社仕様化"する技術_iRAFT法
daichi_yamashita
0
750
re:Invent 2025 ふりかえり 生成AI版
takaakikakei
1
160
意外とあった SQL Server 関連アップデート + Database Savings Plans
stknohg
PRO
0
270
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
RailsConf 2023
tenderlove
30
1.3k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
4 Signs Your Business is Dying
shpigford
186
22k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
700
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Designing for Performance
lara
610
69k
Being A Developer After 40
akosma
91
590k
Code Review Best Practice
trishagee
74
19k
Music & Morning Musume
bryan
46
7k
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