Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Programowanie wspierane przez testy po londyńsku
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jakub Zalas
May 27, 2023
Technology
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Programowanie wspierane przez testy po londyńsku
Jakub Zalas
May 27, 2023
Transcript
119 slides
JAKUB ZALAS PO LONDYŃSKU PROGRAMOWANIE WSPIERANE PRZEZ TESTY PHP EDITION
Jakub Zalas @jakub_zalas @jakub_zalas @jakzal
- Behaviour - Veri fi cation - The chain premise
- Collaboration tests - Test doubles - Contract tests - Mocking hell PLAN
None
None
None
None
None
None
None
https://blog.thecodewhisperer.com/permalink/integrated-tests-are-a-scam Beware the Integrated Tests Scam J. B. Rainsberger /
@jbrains
None
None
None
None
None
None
None
None
None
None
VS
None
None
None
None
VS
None
None
None
None
DATA CALCULATIONS ACTIONS Grokking Simplicity Eric Normand 2021
None
None
“TEST A CHAIN BY TESTING EACH LINK” MICHAEL "GEEPAW" HILL
https://www.geepawhill.org/2018/01/16/underplayed-the-chain-premise-in-depth/
None
None
None
None
None
WE GET TO CHOOSE WHEN AND WHERE WE BREAK THE
DEPENDENCY CHAIN FOR TESTING
None
None
COLLABORATION TESTS
INDIRECT INPUT INDIRECT OUTPUT
None
None
None
None
None
None
xUnit Test Patterns Refactoring Test Code Gerard Meszaros 2007
WE HAVE DETECTED UNUSUALLY HIGH SPENDING ON YOUR CARD IN
THESE CATEGORIES: • YOU SPENT £101.19 ON FOOD • YOU SPENT £27.70 ON ENTERTAINMENT https://github.com/testdouble/contributing-tests/wiki/Unusual-Spending-Kata
SPY & STUB HAND-CRAFTED
None
A REAL OBJECT, BUT A DUMMY WOULD WORK AS WELL.
None
A SPY
A SPY
None
None
None
A STUB
A STUB
None
None
MOCK OBJECT HAND-CRAFTED
A MOCK OBJECT
A MOCK OBJECT
None
A MOCK OBJECT
STUB & MOCK OBJECT WITH A MOCKING FRAMEWORK
A STUB
A MOCK OBJECT
None
A MOCK OBJECT
CONTRACT TESTS aka "Role tests"
None
None
None
None
None
None
UnusualSpendingNotificationUseCaseTest
UnusualSpendingNotificationUseCaseTest
UnusualSpendingQueryTest UnusualSpendingQueryTest UnusualSpendingNotificationUseCaseTest
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
THANK YOU Verify behaviour Mock roles, not objects Listen to
your tests Leverage test doubles as a TDD tool @jakub_zalas @jakub_zalas @jakzal
More Decks by Jakub Zalas
See All by Jakub Zalas
Test doubles explained in Kotlin
jakzal
0
330
Your tests are mocking you
jakzal
0
280
Statyczna analiza aplikacji Symfony
jakzal
2
380
Symfony 4 (Flex included)
jakzal
5
510
Lightning fast tests at Dutch PHP Conference
jakzal
3
650
Eating spaghetti with Symfony
jakzal
13
4.7k
Lightning fast Symfony tests
jakzal
1
2.3k
Embracing change at BrnoPHP
jakzal
9
2.5k
Embracing change
jakzal
5
1.3k
Other Decks in Technology
See All in Technology
Amazon ECS ネットワークモード選びに悩まない ~検証を通じて見えたネットワークモードの選び方~ / 20261114 Masaki Okuda
shift_evolve
PRO
2
170
ワークフローからハーネスへ — Web フレームワークの作者たちが AI エージェントに向かう理由
azukiazusa1
4
4k
AWS DevOps Agentの構造から読み解く運用 AI エージェントの設計原則/aws-devops-agent-design-principles
tomoki10
0
330
認知負荷の減らし方 ~開発にも日常業務にも活かせるノウハウ~
minorun365
PRO
21
24k
Amazon EFS のマルウェアスキャンをClamAV で自前実装したら苦労した話
mtmtfactory01
0
140
OCI Artifact による自動運転タクシーに向けた OTA 基盤の構築
biwashi
1
310
40以上のマイクロサービスを支えるKubernetes JITアクセス — 160以上の恒久RoleBindingを削減
jumpe1
0
120
AI時代に問い直す「プロダクションミーティング」の価値 〜チームでサービスの信頼性を高める取り組み〜
mackerelio
0
260
メディアアートを〈拡張〉する——器官学と個体化論を手がかりに
_kotobuki_
1
420
不具合データを用いたプロダクトコードの弱点可視化
tarappo
6
380
リリースしたで終わらない。 観測できるフロントエンド開発
yamakenji24
4
2k
Platform Engineering をベースとした Agentic Software Factory の実践
110y
3
1.1k
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380
Fireside Chat
paigeccino
43
4.1k
How to train your dragon (web standard)
notwaldorf
96
6.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.3k
The untapped power of vector embeddings
frankvandijk
2
2k
We Have a Design System, Now What?
morganepeng
55
8.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
350
Into the Great Unknown - MozCon
thekraken
41
2.8k
Optimising Largest Contentful Paint
csswizardry
37
4k
Heart Work Chapter 1 - Part 1
lfama
PRO
11
37k