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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jim Holmes
March 17, 2019
Technology
0
52
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
78
Public_Speaking.pdf
jimholmes
0
120
Trusted System Boundaries
jimholmes
0
96
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
120
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
61
Is Quality The Bottleneck?
jimholmes
0
130
Don't Fear Leadership
jimholmes
0
99
Intro To TDD
jimholmes
1
85
Honor Flight #20 (Bay Area) Recap
jimholmes
0
130
Other Decks in Technology
See All in Technology
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
470
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
2
200
今日から始めるAmazon Bedrock AgentCore
har1101
4
410
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
150
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.5k
OpenShiftでllm-dを動かそう!
jpishikawa
0
110
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
150
Agile Leadership Summit Keynote 2026
m_seki
1
610
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
930
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
570
Featured
See All Featured
Design in an AI World
tapps
0
140
Marketing to machines
jonoalderson
1
4.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
82
We Are The Robots
honzajavorek
0
160
Build your cross-platform service in a week with App Engine
jlugia
234
18k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
How to build a perfect <img>
jonoalderson
1
4.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
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