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
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
76
Public_Speaking.pdf
jimholmes
0
100
Trusted System Boundaries
jimholmes
0
94
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
120
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
60
Is Quality The Bottleneck?
jimholmes
0
130
Don't Fear Leadership
jimholmes
0
97
Intro To TDD
jimholmes
1
83
Honor Flight #20 (Bay Area) Recap
jimholmes
0
130
Other Decks in Technology
See All in Technology
【Oracle Cloud ウェビナー】ランサムウェアが突く「侵入の隙」とバックアップの「死角」 ~ 過去の教訓に学ぶ — 侵入前提の防御とデータ保護 ~
oracle4engineer
PRO
0
130
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
Microsoft Tech Brief : Microsoft Fabric × Databricks × Microsoft Foundry が切り拓く Agentic Analytics 革命 ― Microsoft Ignite & Databricks 社 主催 DATA+AI World Tour Tokyo 最新アップデート総括
databricksjapan
0
100
ソフトとハード両方いけるデータ人材の育て方
waiwai2111
1
470
スクラムマスターが スクラムチームに入って取り組む5つのこと - スクラムガイドには書いてないけど入った当初から取り組んでおきたい大切なこと -
scrummasudar
3
2.2k
Proxmoxで作る自宅クラウド入門
koinunopochi
0
140
あの夜、私たちは「人間」に戻った。 ── 災害ユートピア、贈与、そしてアジャイルの再構築 / 20260108 Hiromitsu Akiba
shift_evolve
PRO
0
710
ALB「証明書上限問題」からの脱却
nishiokashinji
0
210
Kaggleコンペティション「MABe Challenge - Social Action Recognition in Mice」振り返り
yu4u
1
530
Security Hub と出会ってから 1年半が過ぎました
rch850
0
150
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
920
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
67
Un-Boring Meetings
codingconduct
0
180
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
430
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
190
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
75
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
480
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
42
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
2
81
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Amusing Abliteration
ianozsvald
0
87
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