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
85
Public_Speaking.pdf
jimholmes
0
130
Trusted System Boundaries
jimholmes
0
100
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
130
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
91
Honor Flight #20 (Bay Area) Recap
jimholmes
0
140
Other Decks in Technology
See All in Technology
CyberAgentの生成AI戦略 〜変わるものと変わらないもの〜
katayan
0
270
内製AIチャットボットで学んだDatadog LLM Observability活用術
mkdev10
0
130
Sansanでの認証基盤内製化と移行
sansantech
PRO
0
590
AIエージェント、 社内展開の前に知っておきたいこと
oracle4engineer
PRO
2
160
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
180
(Test) ai-meetup slide creation
oikon48
3
460
Go標準パッケージのI/O処理をながめる
matumoto
0
230
僕、S3 シンプルって名前だけど全然シンプルじゃありません よろしくお願いします
yama3133
1
230
[JAWSDAYS2026]Who is responsible for IAM
mizukibbb
0
900
猫でもわかるKiro CLI(AI 駆動開発への道編)
kentapapa
0
260
AI時代のSaaSとETL
shoe116
1
190
身体を持ったパーソナルAIエージェントの 可能性を探る開発
yokomachi
1
130
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
240k
New Earth Scene 8
popppiees
1
1.7k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
320
How to Think Like a Performance Engineer
csswizardry
28
2.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.9k
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