Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
なぜ使われないのか?──定量×定性で見極める本当のボトルネック
kakehashi
PRO
1
1.2k
バグハンター視点によるサプライチェーンの脆弱性
scgajge12
3
970
Security Diaries of an Open Source IAM
ahus1
0
130
re:Invent 2025 ふりかえり 生成AI版
takaakikakei
1
170
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
2
140
【CEDEC+KYUSHU2025】学生・若手必見!テクニカルアーティスト 大全 ~仕事・スキル・キャリアパス、TAの「わからない」を徹底解剖~
cygames
PRO
0
140
re:Invent2025 コンテナ系アップデート振り返り(+CloudWatchログのアップデート紹介)
masukawa
0
300
Overture Maps Foundationの3年を振り返る
moritoru
0
150
Noを伝える技術2025: 爆速合意形成のためのNICOフレームワーク速習 #pmconf2025
aki_iinuma
2
2k
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
690
Playwright x GitHub Actionsで実現する「レビューしやすい」E2Eテストレポート
kinosuke01
0
320
5分で知るMicrosoft Ignite
taiponrock
PRO
0
120
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Documentation Writing (for coders)
carmenintech
76
5.2k
Typedesign – Prime Four
hannesfritz
42
2.9k
Bash Introduction
62gerente
615
210k
Agile that works and the tools we love
rasmusluckow
331
21k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
RailsConf 2023
tenderlove
30
1.3k
Raft: Consensus for Rubyists
vanstee
141
7.2k
Designing for humans not robots
tammielis
254
26k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
92
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
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