438: Writing abstractions in tests
Episode
49 min
Read time
2 min
Topics
Design & UX, Crypto & Web3, Psychology & Behavior
AI-Generated Summary
Key Takeaways
- ✓Test abstractions: Good test abstractions shouldn't require jumping to definitions - readers should understand functionality from method names like "login_as_admin" without checking implementation details.
- ✓Custom matchers over shared examples: Custom matchers provide better composition than shared examples, which couple behaviors like inheritance and force unwanted dependencies between test cases.
- ✓Helper method design: Helper methods should return values rather than set state, be called inline within test examples, and have descriptive names indicating setup conditions.
- ✓Abstraction frequency: Test abstractions that require frequent changes indicate poor abstraction choices - stable abstractions suggest you've correctly identified truly similar rather than coincidentally similar code.
What It Covers
Joelle and Steph explore when and how to use abstractions in test code, comparing helper methods, custom matchers, and shared examples for better test readability.
Key Questions Answered
- •Test abstractions: Good test abstractions shouldn't require jumping to definitions - readers should understand functionality from method names like "login_as_admin" without checking implementation details.
- •Custom matchers over shared examples: Custom matchers provide better composition than shared examples, which couple behaviors like inheritance and force unwanted dependencies between test cases.
- •Helper method design: Helper methods should return values rather than set state, be called inline within test examples, and have descriptive names indicating setup conditions.
- •Abstraction frequency: Test abstractions that require frequent changes indicate poor abstraction choices - stable abstractions suggest you've correctly identified truly similar rather than coincidentally similar code.
Notable Moment
Steph suggests creating a game where developers read random test examples from their codebase to practice understanding code, turning test comprehension into team learning.
No transcript yet — request it by email, free
We'll transcribe this episode on request and email you the full transcript and AI summary — usually within a day. No account needed.
One email, no spam. We’ll also show you what SignalCast does.
You just read a 3-minute summary of a 46-minute episode.
Get The Bike Shed summarized like this every Monday — plus up to 2 more podcasts, free.
Pick Your Podcasts — FreeKeep Reading
More from The Bike Shed
We summarize every new episode. Want them in your inbox?
Similar Episodes
Related episodes from other podcasts
Software Engineering Daily
May 5
SmartBear and Multi-Agent QA
How I AI
Apr 23
GPT 5.5 just did what no other model could
The Changelog
Nov 14
Retreat to attack (Friends)
Lenny's Podcast
Aug 30
AI’s third era: the rise of persistent AI coworkers | Tara Seshan (OpenAI’s product lead)
How I AI
Aug 18
I tested Grok Bot, Grok 4.6, and Cursor Origin - here’s my honest take
Explore Related Topics
This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.
You're clearly into The Bike Shed.
Every Monday, we deliver AI summaries of the latest episodes from The Bike Shed and 192+ other podcasts. Free for one show.
Start My Monday DigestNo credit card · Unsubscribe anytime