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
58
0
Share
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
130
Trusted System Boundaries
jimholmes
0
120
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
150
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
70
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
150
Other Decks in Technology
See All in Technology
ラズパイ & Picoで入門:Zephyr(RTOS)の環境構築からビルドまでの紹介
iotengineer22
0
240
まだ道半ば、AI-DLCを歩み始めている話
news_it_enj
2
180
AIコーディングエージェントの活用で、コードは静かに肥大化した
yosukeshinoda
1
370
情シスがMCP環境導入時に打ちのめされる認可の崖
oidfj
0
450
Gradle×GitHub_ActionsでCI時間を約50%短縮 ジョブ分割の設計と落とし穴 / Cutting CI Time by ~50% with Gradle and GitHub Actions: Job-Splitting Design and Pitfalls
takatty
0
140
TypeScript で Platform SDK を作る技術
toiroakr
1
300
形式手法特論:公平性制約の位相的特徴づけ #kernelvm / Kernel VM Study Kansai 12th
ytaka23
1
230
基礎から解説!Icebergで紐解くSnowflake×Databricks連携の現在地
cm_yasuhara
0
320
AI とサービス・デザイン / AI and Service Design
ks91
PRO
0
170
The Making of AI Chips
pfn
PRO
0
770
「使われるデータ基盤」を目指してデータアナリストとワークショップをやった話
jackojacko_
2
860
シンデレラなんかになりたくない!ガラスの靴が割れた時代にどう歩く?
nomizone
0
190
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
570
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
370
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
150
Mobile First: as difficult as doing things right
swwweet
225
10k
Faster Mobile Websites
deanohume
310
31k
Google's AI Overviews - The New Search
badams
0
1k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
270
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
320
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
550
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
280
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