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
Property-based testing: The lazy programmer's g...
Search
Pierre GOUDJO
January 20, 2022
Programming
0
100
Property-based testing: The lazy programmer's guide to writing thousands of tests
Pierre GOUDJO
January 20, 2022
Tweet
Share
More Decks by Pierre GOUDJO
See All by Pierre GOUDJO
Simplicity matters
pierregoudjo
0
61
Always available workspaces: Dotfiles, Github and other shenanigans
pierregoudjo
0
51
Amazon Virtual Private Cloud
pierregoudjo
0
75
Service Discovery: Fundamentals
pierregoudjo
0
81
Relational Databases on AWS: Amazon RDS and Aurora
pierregoudjo
0
98
Object storage: An exploration of AWS S3
pierregoudjo
0
66
Load Balancing: A strategy for scalable internet applications
pierregoudjo
0
96
Boring Technologies
pierregoudjo
0
53
CDN: Caching and edge computing on AWS
pierregoudjo
0
62
Other Decks in Programming
See All in Programming
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
180
CSC307 Lecture 03
javiergs
PRO
1
490
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
100
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
990
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
230
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
120
ぼくの開発環境2026
yuzneri
0
240
Gemini for developers
meteatamel
0
100
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
210
Apache Iceberg V3 and migration to V3
tomtanaka
0
170
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
170
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
440
Optimizing for Happiness
mojombo
379
71k
The Curious Case for Waylosing
cassininazir
0
240
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Agile that works and the tools we love
rasmusluckow
331
21k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7k
4 Signs Your Business is Dying
shpigford
187
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Documentation Writing (for coders)
carmenintech
77
5.3k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
For a Future-Friendly Web
brad_frost
182
10k
Transcript
Pierre Goudjo Property-based testing The lazy programmer's guide to writing
thousands of tests
“Real-life” Scenario
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Solution
What’s an addition?
None
None
Properties Addition • Associativity: x+(y+z) = (x+y)+z • Commutativity: x
+ y = y + x • Identity Element: x+0 = x
This is property-based testing
for any (x, y, …) such as precondition(x, y, …)
holds property(x, y, …) is true
Let’s implement this!!!!
Is it useful?
Avg • for any number (a and b ) •
such a <= b • a <= avg(a, b) and avg(a, b) <= b • for any number (a and b ) • such a <= b • avg(a, b) == avg(a, b)
Zip/Unzip • for any string (x) • such as x
not “” • unzip(zip(x)) == x is true