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
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
84
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
120
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
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
350
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
110
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
360
速習iPhone Duo対応
yuukiw00w
2
910
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
500
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.2k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
1
660
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
390
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
570
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
250
Webの地図
yosuke_furukawa
PRO
6
5k
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1k
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
330
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
For a Future-Friendly Web
brad_frost
183
10k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
How to Ace a Technical Interview
jacobian
280
24k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
We Are The Robots
honzajavorek
0
380
The Pragmatic Product Professional
lauravandoore
37
7.5k
Evolving SEO for Evolving Search Engines
ryanjones
0
300
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