Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Property-based testing: The lazy programmer's g...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Pierre GOUDJO
January 20, 2022
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Property-based testing: The lazy programmer's guide to writing thousands of tests
Pierre GOUDJO
January 20, 2022
More Decks by Pierre GOUDJO
See All by Pierre GOUDJO
Simplicity matters
pierregoudjo
0
83
Always available workspaces: Dotfiles, Github and other shenanigans
pierregoudjo
0
67
Amazon Virtual Private Cloud
pierregoudjo
0
91
Service Discovery: Fundamentals
pierregoudjo
0
89
Relational Databases on AWS: Amazon RDS and Aurora
pierregoudjo
0
110
Object storage: An exploration of AWS S3
pierregoudjo
0
81
Load Balancing: A strategy for scalable internet applications
pierregoudjo
0
100
Boring Technologies
pierregoudjo
0
66
CDN: Caching and edge computing on AWS
pierregoudjo
0
73
Other Decks in Programming
See All in Programming
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
790
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
190
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
230
iOSDC2026登壇資料.pdf
riofujimon
0
150
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
150
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
150
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
620
一人だけ、Kiroが静止する日
hideg
0
100
XHTMLが残したもの
yosuke_furukawa
PRO
2
780
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
340
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
450
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Designing Experiences People Love
moore
143
24k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Believing is Seeing
oripsolob
1
220
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
270
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Claude Code のすすめ
schroneko
67
230k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
930
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Art, The Web, and Tiny UX
lynnandtonic
304
22k
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