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
Lunch & Learn - Property Based Testing
Search
Mickael Metesreau
December 21, 2016
Programming
69
0
Share
Lunch & Learn - Property Based Testing
Mickael Metesreau
December 21, 2016
More Decks by Mickael Metesreau
See All by Mickael Metesreau
Fear the Ponies
mmetesreau
0
160
Alt.Net Talks - Make type system great again
mmetesreau
0
92
Alt.Net Talks - The Actor Model
mmetesreau
0
57
Betclic Dojo - Where is Fluffy?
mmetesreau
0
77
Mini training - EventStore
mmetesreau
0
74
Alt.Net Talks - EdgeJs
mmetesreau
0
300
Betclic Dojo - Extreme Carpaccio
mmetesreau
0
130
Betclic Dojo - Game of life
mmetesreau
0
45
Mini training - Containerization and Docker
mmetesreau
0
460
Other Decks in Programming
See All in Programming
Moments When Things Go Wrong
aurimas
3
140
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
140
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
2
370
関係性から理解する"同一性"の型用語たち
pvcresin
2
630
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
320
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.4k
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
340
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
2
1.1k
今さら聞けないCancellationToken
htkym
0
210
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.4k
JavaDoc 再入門
nagise
0
240
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
2
610
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
590
First, design no harm
axbom
PRO
2
1.2k
Fireside Chat
paigeccino
42
3.9k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
590
How to Talk to Developers About Accessibility
jct
2
210
Being A Developer After 40
akosma
91
590k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Into the Great Unknown - MozCon
thekraken
41
2.5k
WENDY [Excerpt]
tessaabrams
11
38k
How to Ace a Technical Interview
jacobian
281
24k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Transcript
Lunch & Learn Property based Testing
What is a Property? Something always true in a given
context
Could be Strong The total is the sum of the
elements The answer is always 42 …
But most of the time, it’s weak The appointment is
always in the future The invoice is never negative …
A test only validate one specific case
Wait, we also have parameterized tests
Yes but we go further with random generators
Let me introduce FsCheck A port of Haskell’s Quickcheck for
.NET
Generator: easily generates a number of random values for many
types Shrinker: tries to find the mininal counter example that still fails the property
None
Property based testing don’t replace unit testing
Property based testing test a lot of random cases cheaply
Random??? So what does green mean? Testing show the presence,
not the absence of bug E. W. Dijktra
Finding good properties is hard
But it is worth to think about general properties of
your business
Thanks QuickCheck: A Lightweight Tool for Random Testing of Haskell
Programs http://www.cs.tufts.edu/~nr/cs257/archive/john-hughes/quick.pdf An introduction to property-based testing http://fsharpforfunandprofit.com/posts/property-based-testing/ FsCheck https://fscheck.github.io/FsCheck/