Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
51
Amazon Virtual Private Cloud
pierregoudjo
0
75
Service Discovery: Fundamentals
pierregoudjo
0
81
Relational Databases on AWS: Amazon RDS and Aurora
pierregoudjo
0
98
Object storage: An exploration of AWS S3
pierregoudjo
0
66
Load Balancing: A strategy for scalable internet applications
pierregoudjo
0
93
Boring Technologies
pierregoudjo
0
53
CDN: Caching and edge computing on AWS
pierregoudjo
0
61
Other Decks in Programming
See All in Programming
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
140
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
190
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.4k
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
650
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
140
gunshi
kazupon
1
120
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
270
tparseでgo testの出力を見やすくする
utgwkk
2
290
クラウドに依存しないS3を使った開発術
simesaba80
0
170
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
0
190
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
Featured
See All Featured
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
91
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.2k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Docker and Python
trallard
47
3.7k
Un-Boring Meetings
codingconduct
0
160
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
A Soul's Torment
seathinner
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