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
0
56
Lunch & Learn - Property Based Testing
Mickael Metesreau
December 21, 2016
Tweet
Share
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
85
Alt.Net Talks - The Actor Model
mmetesreau
0
50
Betclic Dojo - Where is Fluffy?
mmetesreau
0
73
Mini training - EventStore
mmetesreau
0
65
Alt.Net Talks - EdgeJs
mmetesreau
0
300
Betclic Dojo - Extreme Carpaccio
mmetesreau
0
120
Betclic Dojo - Game of life
mmetesreau
0
38
Mini training - Containerization and Docker
mmetesreau
0
420
Other Decks in Programming
See All in Programming
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
710
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
610
WindowInsetsだってテストしたい
ryunen344
1
200
C++20 射影変換
faithandbrave
0
550
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
240
20250613-SSKMvol.15
diostray
0
100
0626 Findy Product Manager LT Night_高田スライド_speaker deck用
mana_takada
0
130
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
320
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
440
GraphRAGの仕組みまるわかり
tosuri13
8
500
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
590
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
124
52k
For a Future-Friendly Web
brad_frost
179
9.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
A Tale of Four Properties
chriscoyier
160
23k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Done Done
chrislema
184
16k
We Have a Design System, Now What?
morganepeng
53
7.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
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/