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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Pierre GOUDJO
January 20, 2022
Programming
110
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
79
Always available workspaces: Dotfiles, Github and other shenanigans
pierregoudjo
0
60
Amazon Virtual Private Cloud
pierregoudjo
0
87
Service Discovery: Fundamentals
pierregoudjo
0
87
Relational Databases on AWS: Amazon RDS and Aurora
pierregoudjo
0
110
Object storage: An exploration of AWS S3
pierregoudjo
0
77
Load Balancing: A strategy for scalable internet applications
pierregoudjo
0
100
Boring Technologies
pierregoudjo
0
64
CDN: Caching and edge computing on AWS
pierregoudjo
0
65
Other Decks in Programming
See All in Programming
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
170
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2k
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
5.6k
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
120
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
400
Claspは野良GASの夢をみるか
takter00
0
190
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
340
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
560
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
740
Featured
See All Featured
Everyday Curiosity
cassininazir
0
230
Speed Design
sergeychernyshev
33
1.8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Designing for Performance
lara
611
70k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
Facilitating Awesome Meetings
lara
57
7k
Docker and Python
trallard
47
3.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Building Adaptive Systems
keathley
44
3.1k
Designing Experiences People Love
moore
143
24k
The Cost Of JavaScript in 2023
addyosmani
55
10k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
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