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
160
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
89
Your tests are mocking you
jakzal
0
140
Statyczna analiza aplikacji Symfony
jakzal
2
280
Symfony 4 (Flex included)
jakzal
5
410
Lightning fast tests at Dutch PHP Conference
jakzal
3
510
Eating spaghetti with Symfony
jakzal
13
4.3k
Lightning fast Symfony tests
jakzal
1
2.2k
Embracing change at BrnoPHP
jakzal
9
2.4k
Embracing change
jakzal
5
1.1k
Other Decks in Technology
See All in Technology
コード✕AIーソフトウェア開発者のための生成AI実践入門~
yuhattor
3
810
Oracle Database 23ai 新機能#4 Rolling Maintenance
oracle4engineer
PRO
0
130
How CERN serves 1EB of data via FUSE
ennael
PRO
0
16k
Assisted reorganization of data structures
ennael
PRO
0
260
I tried the newly introduced certification "Applied Skills" on Microsoft Learn
mappie_kochi
0
150
Oracle Database 23ai 新機能#4 Application Continuity
oracle4engineer
PRO
0
120
Efficient zero-copy networking using io_uring
ennael
PRO
0
360
シェルとPerlの使い分け、 そういった思考の道具は、どこから来て、どこへゆくのか?v1.1.0
fmlorg
0
200
電子辞書にステータスバーを実装する
puhitaku
0
100
AWSへのNIST SP800-171管理策 導入に向けての整備/20240930 Mitsutoshi Matsuo
shift_evolve
0
240
スクラム導入の舞台裏:QAエンジニアがスクラムマスターになるまで
bubo1201
0
230
リスクから学ぶKubernetesコンテナセキュリティ/k8s-risk-and-security
mochizuki875
1
320
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.7k
Building an army of robots
kneath
302
42k
The Mythical Team-Month
searls
218
43k
How To Stay Up To Date on Web Technology
chriscoyier
787
250k
Documentation Writing (for coders)
carmenintech
65
4.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Docker and Python
trallard
40
3k
Fireside Chat
paigeccino
32
3k
What's in a price? How to price your products and services
michaelherold
243
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.5k
4 Signs Your Business is Dying
shpigford
180
21k
Code Review Best Practice
trishagee
62
16k
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