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
43
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
54
Public_Speaking.pdf
jimholmes
0
67
Trusted System Boundaries
jimholmes
0
70
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
87
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
44
Is Quality The Bottleneck?
jimholmes
0
99
Don't Fear Leadership
jimholmes
0
67
Intro To TDD
jimholmes
1
56
Honor Flight #20 (Bay Area) Recap
jimholmes
0
100
Other Decks in Technology
See All in Technology
Compose におけるパスワード自動入力とパスワード保存
tonionagauzzi
0
190
ドキュメント管理の理想と現実
kazuhe
3
320
Part1 GitHubってなんだろう?その1
tomokusaba
1
220
Azure × MCP 入門
ry0y4n
3
470
地味にいろいろあった! 2025春のAmazon Bedrockアップデートおさらい
minorun365
PRO
2
560
白金鉱業Meetup_Vol.18_AIエージェント時代のUI/UX設計
brainpadpr
1
280
AIでめっちゃ便利になったけど、結局みんなで学ぶよねっていう話
kakehashi
PRO
1
530
30代からでも遅くない! 内製開発の世界に飛び込み、最前線で戦うLLMアプリ開発エンジニアになろう
minorun365
PRO
16
5.1k
Computer Use〜OpenAIとAnthropicの比較と将来の展望〜
pharma_x_tech
6
970
Databricksで完全履修!オールインワンレイクハウスは実在した!
akuwano
0
140
CodeRabbitと過ごした1ヶ月 ─ AIコードレビュー導入で実感したチーム開発の進化
mitohato14
1
230
AI駆動で進化する開発プロセス ~クラスメソッドでの実践と成功事例~ / aidd-in-classmethod
tomoki10
1
820
Featured
See All Featured
Making Projects Easy
brettharned
116
6.2k
For a Future-Friendly Web
brad_frost
177
9.7k
Fireside Chat
paigeccino
37
3.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
550
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
A designer walks into a library…
pauljervisheath
205
24k
Scaling GitHub
holman
459
140k
What's in a price? How to price your products and services
michaelherold
245
12k
How to Think Like a Performance Engineer
csswizardry
23
1.6k
Optimising Largest Contentful Paint
csswizardry
37
3.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
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