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
59
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
89
Alt.Net Talks - The Actor Model
mmetesreau
0
51
Betclic Dojo - Where is Fluffy?
mmetesreau
0
74
Mini training - EventStore
mmetesreau
0
67
Alt.Net Talks - EdgeJs
mmetesreau
0
300
Betclic Dojo - Extreme Carpaccio
mmetesreau
0
130
Betclic Dojo - Game of life
mmetesreau
0
39
Mini training - Containerization and Docker
mmetesreau
0
430
Other Decks in Programming
See All in Programming
iOSでSVG画像を扱う
kishikawakatsumi
0
180
CSC305 Lecture 10
javiergs
PRO
0
330
Inside of Swift Export
giginet
PRO
1
330
GitHub Copilotを使いこなせ!/mastering_github_copilot!
kotakageyama
2
750
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
2k
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
110
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.7k
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
250
Making Angular Apps Smarter with Generative AI: Local and Offline-capable
christianliebel
PRO
0
100
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
contribution to astral-sh/uv
shunsock
0
580
SODA - FACT BOOK(JP)
sodainc
1
9.2k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
209
24k
Embracing the Ebb and Flow
colly
88
4.9k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
How to Think Like a Performance Engineer
csswizardry
27
2.2k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
910
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Building Adaptive Systems
keathley
44
2.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Documentation Writing (for coders)
carmenintech
76
5.1k
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/