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
0
46
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
61
Public_Speaking.pdf
jimholmes
0
79
Trusted System Boundaries
jimholmes
0
80
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
100
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
48
Is Quality The Bottleneck?
jimholmes
0
110
Don't Fear Leadership
jimholmes
0
78
Intro To TDD
jimholmes
1
67
Honor Flight #20 (Bay Area) Recap
jimholmes
0
110
Other Decks in Technology
See All in Technology
TypeScript入門
recruitengineers
PRO
12
2.9k
我々は雰囲気で仕事をしている / How can we do vibe coding as well
naospon
2
220
見てわかるテスト駆動開発
recruitengineers
PRO
4
310
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
2
20k
モダンフロントエンド 開発研修
recruitengineers
PRO
2
300
アジャイルテストで高品質のスプリントレビューを
takesection
0
110
AIとTDDによるNext.js「隙間ツール」開発の実践
makotot
5
670
Figma + Storybook + PlaywrightのMCPを使ったフロントエンド開発
yug1224
8
1.5k
小さなチーム 大きな仕事 - 個人開発でAIをフル活用する
himaratsu
0
120
GitHub Copilot coding agent を推したい / AIDD Nagoya #1
tnir
2
4.5k
Claude Code x Androidアプリ 開発
kgmyshin
1
570
.NET開発者のためのAzureの概要
tomokusaba
0
230
Featured
See All Featured
Faster Mobile Websites
deanohume
309
31k
How STYLIGHT went responsive
nonsquared
100
5.7k
Navigating Team Friction
lara
189
15k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Code Reviewing Like a Champion
maltzj
525
40k
Raft: Consensus for Rubyists
vanstee
140
7.1k
The Pragmatic Product Professional
lauravandoore
36
6.8k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Making Projects Easy
brettharned
117
6.3k
Optimising Largest Contentful Paint
csswizardry
37
3.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