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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Pierre GOUDJO
January 20, 2022
Programming
140
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
86
Always available workspaces: Dotfiles, Github and other shenanigans
pierregoudjo
0
68
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
74
Other Decks in Programming
See All in Programming
AI-Powered Domain-Driven Design
ziobrando
0
300
Domain-Driven Transformation
hschwentner
2
2.3k
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
170
GraphQL の onError と Nullability のこれから
quramy
0
180
Seven New Principles of Software Engineering
yegor256
0
280
golang-bob.pdf
iwatsukayura
0
140
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
130
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.6k
Vue Fes Japan の “作る側”に関わってみて
naokihaba
1
180
R8 の設定見直しでアプリサイズ削減
andpad
0
230
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
210
パスワード再設定メールのURLについて知っておこう
uyuki234
0
180
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
330
Deep Space Network (abreviated)
tonyrice
0
380
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
ラッコキーワード サービス紹介資料
rakko
4
5.4M
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
330
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Bash Introduction
62gerente
615
220k
YesSQL, Process and Tooling at Scale
rocio
174
15k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.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