Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
51
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
73
Public_Speaking.pdf
jimholmes
0
97
Trusted System Boundaries
jimholmes
0
92
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
110
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
56
Is Quality The Bottleneck?
jimholmes
0
130
Don't Fear Leadership
jimholmes
0
92
Intro To TDD
jimholmes
1
79
Honor Flight #20 (Bay Area) Recap
jimholmes
0
130
Other Decks in Technology
See All in Technology
特別捜査官等研修会
nomizone
0
560
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.8k
「もしもデータ基盤開発で『強くてニューゲーム』ができたなら今の僕はどんなデータ基盤を作っただろう」
aeonpeople
0
240
ExpoのインダストリーブースでみたAWSが見せる製造業の未来
hamadakoji
0
190
[Neurogica] 採用ポジション/ Recruitment Position
neurogica
1
110
ESXi のAIOps だ!2025冬
unnowataru
0
350
Lookerで実現するセキュアな外部データ提供
zozotech
PRO
0
200
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
2.1k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
AWSに革命を起こすかもしれない新サービス・アップデートについてのお話
yama3133
0
500
AIエージェント開発と活用を加速するワークフロー自動生成への挑戦
shibuiwilliam
4
840
Kiro を用いたペアプロのススメ
taikis
4
1.8k
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
0
100
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Design in an AI World
tapps
0
100
First, design no harm
axbom
PRO
1
1.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Marketing to machines
jonoalderson
1
4.3k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
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