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
150
Programowanie wspierane przez testy po londyńsku
Jakub Zalas
May 27, 2023
Tweet
Share
More Decks by Jakub Zalas
See All by Jakub Zalas
Your tests are mocking you
jakzal
0
130
Statyczna analiza aplikacji Symfony
jakzal
2
250
Symfony 4 (Flex included)
jakzal
5
410
Lightning fast tests at Dutch PHP Conference
jakzal
3
500
Eating spaghetti with Symfony
jakzal
13
4.1k
Lightning fast Symfony tests
jakzal
1
2.2k
Embracing change at BrnoPHP
jakzal
9
2.4k
Embracing change
jakzal
5
1.1k
The Dependency Trap
jakzal
12
1.6k
Other Decks in Technology
See All in Technology
Microsoft for Startups Founders Hub_20240429 update
daikikanemitsu
1
2.4k
Amplify 🩷 Bedrock 〜生成AI入門〜
minorun365
PRO
8
410
LayerXにおけるLLMプロダクト開発の今までとこれから
layerx
PRO
3
600
GrafanaMeetup_AmazonManagedGrafanaのアクセス制御機能とマルチテナント環境下でのアクセス制御について
daitak
0
390
How to do well in consulting–Balkan Ruby 2024
irinanazarova
0
130
MapLibreとAmazon Location Service
dayjournal
1
180
エンジニア候補者向け資料2024.04.24.pdf
macloud
0
3.3k
Azureの基本的な権限管理の勉強会
yhana
1
2k
生成AIの変革の時代に、直近1年で直面した課題とその解決策
ktc_wada
0
510
認知症フレンドリーテックとスタックチャン
naokiuc
0
150
競技としてのKaggle、役に立つKaggle
yu4u
6
2.3k
成長をサポートするピープルマネジメントのやり方
sioncojp
8
940
Featured
See All Featured
Robots, Beer and Maslow
schacon
PRO
155
7.9k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
Faster Mobile Websites
deanohume
300
30k
Testing 201, or: Great Expectations
jmmastey
29
6.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
275
13k
The Pragmatic Product Professional
lauravandoore
26
5.8k
Music & Morning Musume
bryan
41
5.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
11
1k
The Mythical Team-Month
searls
216
42k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
7
1.3k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
6
3.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