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
47
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
88
Alt.Net Talks - Make type system great again
mmetesreau
0
80
Alt.Net Talks - The Actor Model
mmetesreau
0
48
Betclic Dojo - Where is Fluffy?
mmetesreau
0
55
Mini training - EventStore
mmetesreau
0
59
Alt.Net Talks - EdgeJs
mmetesreau
0
290
Betclic Dojo - Extreme Carpaccio
mmetesreau
0
110
Betclic Dojo - Game of life
mmetesreau
0
34
Mini training - Containerization and Docker
mmetesreau
0
400
Other Decks in Programming
See All in Programming
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
840
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
Snowflakeで眠ったデータを起こそう!
estie
0
120
Anthropic Cookbook のおすすめレシピ
schroneko
7
990
見た目から始める生産性向上
ikumatadokoro
7
850
VS Code をプロダクトにどう取り込むか
onomax
1
370
What We Can Learn From OSS
inouehi
0
420
Ruby GitHub Packages
bkuhlmann
0
630
Apache Hive 4 on Treasure Data
ryukobayashi
0
340
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
540
Fragment Composition of GraphQL
quramy
7
1k
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
274
13k
The Language of Interfaces
destraynor
151
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
25
2.3k
Ruby is Unlike a Banana
tanoku
96
10k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
121
39k
How to train your dragon (web standard)
notwaldorf
73
5.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
43k
Bash Introduction
62gerente
604
210k
The Illustrated Children's Guide to Kubernetes
chrisshort
31
46k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
Designing with Data
zakiwarfel
96
4.8k
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/