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
62
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Jim Holmes
See All by Jim Holmes
Adapting to Change in Software Delivery
jimholmes
0
100
Public_Speaking.pdf
jimholmes
0
140
Trusted System Boundaries
jimholmes
0
130
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
150
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
73
Is Quality The Bottleneck?
jimholmes
0
150
Don't Fear Leadership
jimholmes
0
120
Intro To TDD
jimholmes
1
100
Honor Flight #20 (Bay Area) Recap
jimholmes
0
160
Other Decks in Technology
See All in Technology
新しいVibe Codingと”自走”について
watany
5
290
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
1.6k
AIの性能が向上しても未解決な組織の重大問題は何か?/An Unsolved Organizational Problem in the Age of AI
moriyuya
3
610
2026TECHFRESH畢業分享會 - Lightning Talk - 資料也要 CI/CD? 用 Airbyte 自動化資料同步
line_developers_tw
PRO
0
760
Microsoft Build Keynoteふりかえり
tomokusaba
0
120
2026TECHFRESH畢業分享會 - 原生還是跨平台? App 開發踩坑實錄
line_developers_tw
PRO
0
780
白金鉱業Meetup_Vol.24_「AIエージェントは分けるほど良い」は本当か? / Is it true that “the more you divide AI agents, the better”?
brainpadpr
1
300
自律型AIエージェントは何を破壊するのか
kojira
0
150
AIソロプレナー時代に2ヶ月で20人増員した事業創造会社の開発組織の話
miyatakoji
0
590
Agentic Web
dynamis
1
200
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.9k
Snowflakeと仲良くなる第一歩
coco_se
4
420
Featured
See All Featured
Accessibility Awareness
sabderemane
1
140
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
420
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The Spectacular Lies of Maps
axbom
PRO
1
800
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Agile that works and the tools we love
rasmusluckow
331
21k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
580
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
180
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
GraphQLとの向き合い方2022年版
quramy
50
15k
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