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
97
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
59
Always available workspaces: Dotfiles, Github and other shenanigans
pierregoudjo
0
48
Amazon Virtual Private Cloud
pierregoudjo
0
72
Service Discovery: Fundamentals
pierregoudjo
0
78
Relational Databases on AWS: Amazon RDS and Aurora
pierregoudjo
0
95
Object storage: An exploration of AWS S3
pierregoudjo
0
60
Load Balancing: A strategy for scalable internet applications
pierregoudjo
0
88
Boring Technologies
pierregoudjo
0
50
CDN: Caching and edge computing on AWS
pierregoudjo
0
59
Other Decks in Programming
See All in Programming
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
7
2.5k
Compose Multiplatform × AI で作る、次世代アプリ開発支援ツールの設計と実装
thagikura
0
170
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
320
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
610
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
480
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.5k
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
570
Cache Me If You Can
ryunen344
2
3.1k
Testing Trophyは叫ばない
toms74209200
0
890
はじめてのMaterial3 Expressive
ym223
2
900
Featured
See All Featured
Become a Pro
speakerdeck
PRO
29
5.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How to Ace a Technical Interview
jacobian
279
23k
GitHub's CSS Performance
jonrohan
1032
460k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
113
20k
Writing Fast Ruby
sferik
628
62k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
RailsConf 2023
tenderlove
30
1.2k
Optimizing for Happiness
mojombo
379
70k
How to train your dragon (web standard)
notwaldorf
96
6.2k
For a Future-Friendly Web
brad_frost
180
9.9k
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