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
53
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
82
Public_Speaking.pdf
jimholmes
0
120
Trusted System Boundaries
jimholmes
0
99
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
120
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
63
Is Quality The Bottleneck?
jimholmes
0
140
Don't Fear Leadership
jimholmes
0
100
Intro To TDD
jimholmes
1
88
Honor Flight #20 (Bay Area) Recap
jimholmes
0
140
Other Decks in Technology
See All in Technology
AI が Approve する開発フロー / How AI Reviewers Accelerate Our Development
zaimy
1
230
Eight Engineering Unit 紹介資料
sansan33
PRO
1
6.8k
クラウド時代における一時権限取得
krrrr38
1
130
なぜAIは組織を速くしないのか 令和の腑分け
sugino
80
50k
AIで 浮いた時間で 何をする? 2026春 #devsumi
konifar
16
3.4k
Master Dataグループ紹介資料
sansan33
PRO
1
4.4k
チームメンバー迷わないIaC設計
hayama17
5
3.1k
マイグレーションガイドに書いてないRiverpod 3移行話
taiju59
0
330
技術キャッチアップ効率化を実現する記事推薦システムの構築
yudai00
2
160
LLM活用の壁を超える:リクルートR&Dの戦略と打ち手
recruitengineers
PRO
1
170
三菱UFJ銀行におけるエンタープライズAI駆動開発のリアル / Enterprise AI_Driven Development at MUFG Bank: The Real Story
muit
10
20k
Claude Codeと駆け抜ける 情報収集と実践録
sontixyou
2
1.2k
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
130
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
250
A Tale of Four Properties
chriscoyier
162
24k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
How to make the Groovebox
asonas
2
2k
Believing is Seeing
oripsolob
1
68
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
460
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
620
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