Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Four Tips for More Testable UI
Search
Jim Holmes
March 17, 2019
Technology
67
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
140
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
170
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
78
Is Quality The Bottleneck?
jimholmes
0
160
Don't Fear Leadership
jimholmes
0
130
Intro To TDD
jimholmes
1
120
Honor Flight #20 (Bay Area) Recap
jimholmes
0
170
Other Decks in Technology
See All in Technology
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
240
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
200
Podは生きているのにGoだけが落ちる:GOGCとGOMEMLIMITで追うInvisible OOM Killの謎
tkc66buzz
1
680
Microsoft 365 Copilot chat -tekoälypalvelun tietosuojaongelmat
hponka
0
840
人間はどの意思決定を手放せるのか
kawasima
7
2.3k
2026/09/10 Spring Bootから Jakarta EE/MicroProfileへの移行
megascus
0
350
データ界隈LT祭 第1回LT登壇
taromatsui_cccmkhd
1
990
AI時代、データエンジニアが一番おもろい
genshun9
0
440
SQL文一行も書けない人事がCortexもろもろを使って人事業務を楽にしてみる
ponponmikankan
1
230
2026_devsumi_ozono.pdf
o3
3
450
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
290
目の前の楽しいが人生を変える - コミュニティの螺旋の歩き方と楽しむコツ / change your life
soudai
PRO
4
540
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
930
Making Projects Easy
brettharned
120
6.7k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Design in an AI World
tapps
1
310
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Statistics for Hackers
jakevdp
799
230k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
480
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
510
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