Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
50
Amazon Virtual Private Cloud
pierregoudjo
0
75
Service Discovery: Fundamentals
pierregoudjo
0
80
Relational Databases on AWS: Amazon RDS and Aurora
pierregoudjo
0
98
Object storage: An exploration of AWS S3
pierregoudjo
0
65
Load Balancing: A strategy for scalable internet applications
pierregoudjo
0
92
Boring Technologies
pierregoudjo
0
53
CDN: Caching and edge computing on AWS
pierregoudjo
0
61
Other Decks in Programming
See All in Programming
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
110
認証・認可の基本を学ぼう前編
kouyuume
0
190
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
310
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.2k
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
26
22k
Go コードベースの構成と AI コンテキスト定義
andpad
0
110
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
340
Cap'n Webについて
yusukebe
0
110
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.3k
dotfiles 式年遷宮 令和最新版
masawada
1
710
CSC509 Lecture 14
javiergs
PRO
0
220
CSC305 Lecture 17
javiergs
PRO
0
320
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
40k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The Invisible Side of Design
smashingmag
302
51k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
[SF Ruby Conf 2025] Rails X
palkan
0
480
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
Docker and Python
trallard
47
3.7k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
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