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
Jakub Zalas
May 27, 2023
Technology
0
220
Programowanie wspierane przez testy po londyńsku
Jakub Zalas
May 27, 2023
Tweet
Share
More Decks by Jakub Zalas
See All by Jakub Zalas
Test doubles explained in Kotlin
jakzal
0
210
Your tests are mocking you
jakzal
0
190
Statyczna analiza aplikacji Symfony
jakzal
2
330
Symfony 4 (Flex included)
jakzal
5
450
Lightning fast tests at Dutch PHP Conference
jakzal
3
580
Eating spaghetti with Symfony
jakzal
13
4.5k
Lightning fast Symfony tests
jakzal
1
2.2k
Embracing change at BrnoPHP
jakzal
9
2.4k
Embracing change
jakzal
5
1.2k
Other Decks in Technology
See All in Technology
KMP の Swift export
kokihirokawa
0
310
Pure Goで体験するWasmの未来
askua
1
170
実装で解き明かす並行処理の歴史
zozotech
PRO
1
230
#普通の文系サラリーマンチャレンジ 自分でアプリ開発と電子工作を続けたら人生が変わった
tatsuya1970
0
910
GC25 Recap+: Advancing Go Garbage Collection with Green Tea
logica0419
1
320
extension 現場で使えるXcodeショートカット一覧
ktombow
0
190
データエンジニアがこの先生きのこるには...?
10xinc
0
430
SOC2取得の全体像
shonansurvivors
1
350
Why React!?? Next.jsそしてReactを改めてイチから選ぶ
ypresto
10
4.1k
PythonとLLMで挑む、 4コマ漫画の構造化データ化
esuji5
1
120
What is BigQuery?
aizack_harks
0
120
AI Agentと MCP Serverで実現する iOSアプリの 自動テスト作成の効率化
spiderplus_cb
0
360
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
What's in a price? How to price your products and services
michaelherold
246
12k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Being A Developer After 40
akosma
91
590k
Raft: Consensus for Rubyists
vanstee
139
7.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
32
2.2k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
840
Making Projects Easy
brettharned
118
6.4k
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