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
Programowanie wspierane przez testy po londyńsku
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jakub Zalas
May 27, 2023
Technology
250
0
Share
Programowanie wspierane przez testy po londyńsku
Jakub Zalas
May 27, 2023
More Decks by Jakub Zalas
See All by Jakub Zalas
Test doubles explained in Kotlin
jakzal
0
260
Your tests are mocking you
jakzal
0
230
Statyczna analiza aplikacji Symfony
jakzal
2
360
Symfony 4 (Flex included)
jakzal
5
480
Lightning fast tests at Dutch PHP Conference
jakzal
3
610
Eating spaghetti with Symfony
jakzal
13
4.6k
Lightning fast Symfony tests
jakzal
1
2.3k
Embracing change at BrnoPHP
jakzal
9
2.5k
Embracing change
jakzal
5
1.2k
Other Decks in Technology
See All in Technology
AI時代における技術的負債への取り組み
codenote
1
1.7k
小説執筆のハーネスエンジニアリング
yoshitetsu
0
770
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
12
4.8k
目的ファーストのハーネス設計 ~ハーネスの変更容易性を高めるための優先順位~
gotalab555
8
2.4k
レビューしきれない?それは「全て人力でのレビュー」だからではないでしょうか
amixedcolor
0
350
Agents CLI と Gemini Enterprise Agent Platform で マルチエージェント開発が楽しくなる!
kaz1437
0
140
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
150
Microsoft 365 / Microsoft 365 Copilot : 自分の状態を確認する「ラベル」について
taichinakamura
0
350
Expiration of Secure Boot Certificates for vSphere Virtual Machines
mirie_sd
0
110
AIが書いたコードを信じられない問題 〜レビュー負荷を下げるために変えたこと〜 / The AI Code Trust Gap: Reducing the Review Burden
bitkey
PRO
8
1.4k
The Journey of Box Building
tagomoris
4
3.4k
Standards et agents IA : un tour d’horizon de MCP, A2A, ADK et plus encore
glaforge
0
190
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
180
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
It's Worth the Effort
3n
188
29k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Heart Work Chapter 1 - Part 1
lfama
PRO
6
35k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Designing Experiences People Love
moore
143
24k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Music & Morning Musume
bryan
47
7.2k
Navigating Weather and Climate Data
rabernat
0
170
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
120
Transcript
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