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
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
今から始めるClaude Code超入門
448jp
8
9.1k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
Oxlint JS plugins
kazupon
1
1k
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
210
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
dchart: charts from deck markup
ajstarks
3
1k
CSC307 Lecture 09
javiergs
PRO
1
840
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
210
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
100
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
440
The agentic SEO stack - context over prompts
schlessera
0
650
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Building AI with AI
inesmontani
PRO
1
700
Designing Experiences People Love
moore
144
24k
Into the Great Unknown - MozCon
thekraken
40
2.3k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
Paper Plane
katiecoart
PRO
0
46k
Building Applications with DynamoDB
mza
96
6.9k
Are puppies a ranking factor?
jonoalderson
1
2.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
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