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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
JAWSDAYS2026 [C02] 楽しく学ぼう!AWSとは?AWSの歴史 入門
hiragahh
0
170
AIエージェント、 社内展開の前に知っておきたいこと
oracle4engineer
PRO
2
150
TypeScript 7.0の現在地と備え方
uhyo
7
1.7k
OSC仙台プレ勉強会 AlmaLinuxとは
koedoyoshida
0
190
銀行の内製開発にて2つのプロダクトを1つのチームでスクラムしてみてる話
koba1210
1
140
わたしがセキュアにAWSを使えるわけないじゃん、ムリムリ!(※ムリじゃなかった!?)
cmusudakeisuke
1
780
楽しく学ぼう!ネットワーク入門
shotashiratori
1
460
AI駆動AI普及活動 ~ 社内AI活用の「何から始めれば?」をAIで突破する
oracle4engineer
PRO
1
110
めちゃくちゃ開発するQAエンジニアになって感じたメリットとこれからの課題感
ryuhei0000yamamoto
0
110
アーキテクチャモダナイゼーションを実現する組織
satohjohn
1
1k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
NewSQL_ ストレージ分離と分散合意を用いたスケーラブルアーキテクチャ
hacomono
PRO
4
380
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Thoughts on Productivity
jonyablonski
75
5.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
43k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
260
A designer walks into a library…
pauljervisheath
210
24k
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Statistics for Hackers
jakevdp
799
230k
Scaling GitHub
holman
464
140k
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