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
65
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
110
Public_Speaking.pdf
jimholmes
0
140
Trusted System Boundaries
jimholmes
0
140
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
170
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
77
Is Quality The Bottleneck?
jimholmes
0
160
Don't Fear Leadership
jimholmes
0
130
Intro To TDD
jimholmes
1
110
Honor Flight #20 (Bay Area) Recap
jimholmes
0
170
Other Decks in Technology
See All in Technology
国家プロジェクトを支える「さくらONE」 大規模LLM開発におけるGPU障害を乗り越えるクラスター運用戦略
gpuunite_official
0
120
コネクションをピン留めさせずに SELECTクエリのタイムアウトを設定した話
codmoninc
0
170
SmartHR Engineering Team Deck
smarthr
1
3k
自宅NWにISR4331を導入してみた話
okaits
0
110
AIコーディングの次。コードレビューと理解負荷を解消して組織の開発生産性を高める
moongift
PRO
2
2.7k
事業価値と Engineering 2026年度版
recruitengineers
PRO
51
25k
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
280
AI時代のアウトプット――変わったこと、変わらないこと / Devsumi 2026 Kansai #devsumi
jnchito
0
250
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
100
LanceDB入門
mocobeta
9
620
AI開発に用いられるHPC技術について
gpuunite_official
0
150
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.8k
Done Done
chrislema
186
16k
Bash Introduction
62gerente
615
220k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
470
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
640
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.4k
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