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
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
Transcript
36 slides
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
More Decks by Pierre GOUDJO
See All by Pierre GOUDJO
Simplicity matters
pierregoudjo
0
93
Always available workspaces: Dotfiles, Github and other shenanigans
pierregoudjo
0
73
Amazon Virtual Private Cloud
pierregoudjo
0
95
Service Discovery: Fundamentals
pierregoudjo
0
92
Relational Databases on AWS: Amazon RDS and Aurora
pierregoudjo
0
120
Object storage: An exploration of AWS S3
pierregoudjo
0
91
Load Balancing: A strategy for scalable internet applications
pierregoudjo
0
100
Boring Technologies
pierregoudjo
0
68
CDN: Caching and edge computing on AWS
pierregoudjo
0
81
Other Decks in Programming
See All in Programming
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
160
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
190
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
240
高速開発を止めずに 性能を上げる Flyleのシステム刷新と改善の歴史
azihsoyn
0
110
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
The Cost of the DOM
ypresto
2
260
特急いなほ as a Workflow / 20261107jaws-festa-2026-akita-lt
kasacchiful
PRO
0
110
はじめてのKubernetesコントリビューション
nasa9084
0
320
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
240
小さなアプリを作って公開するまで
onozaty
0
250
SODA - FACT BOOK(JP)
sodainc
1
40k
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
WCS-LA-2024
lcolladotor
0
1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
560
Amusing Abliteration
ianozsvald
1
400
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
340
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
680
Designing for Timeless Needs
cassininazir
1
570
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
630
Abbi's Birthday
coloredviolet
5
11k