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
60
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
93
Boring Technologies
pierregoudjo
0
53
CDN: Caching and edge computing on AWS
pierregoudjo
0
61
Other Decks in Programming
See All in Programming
GoLab2025 Recap
kuro_kurorrr
0
780
TerraformとStrands AgentsでAmazon Bedrock AgentCoreのSSO認証付きエージェントを量産しよう!
neruneruo
4
2k
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
230
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
910
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
150
Navigating Dependency Injection with Metro
l2hyunwoo
1
200
複雑なUI設計への銀の弾丸 「オブジェクト指向UIデザイン」
teamlab
PRO
2
110
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
540
Go コードベースの構成と AI コンテキスト定義
andpad
0
150
gunshi
kazupon
1
120
JETLS.jl ─ A New Language Server for Julia
abap34
2
460
AIエージェントの設計で注意するべきポイント6選
har1101
6
2.6k
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
1
140
GraphQLとの向き合い方2022年版
quramy
50
14k
Agile that works and the tools we love
rasmusluckow
331
21k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
180
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Being A Developer After 40
akosma
91
590k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
230
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
53
47k
First, design no harm
axbom
PRO
1
1.1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
32
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