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
55
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
150
Alt.Net Talks - Make type system great again
mmetesreau
0
84
Alt.Net Talks - The Actor Model
mmetesreau
0
49
Betclic Dojo - Where is Fluffy?
mmetesreau
0
72
Mini training - EventStore
mmetesreau
0
63
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
410
Other Decks in Programming
See All in Programming
Making TCPSocket.new "Happy"!
coe401_
1
1k
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
740
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
0
130
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
2.7k
状態と共に暮らす:ステートフルへの挑戦
ypresto
1
240
Unlock the Potential of Swift Code Generation
rockname
0
250
Develop Faster With FrankenPHP
dunglas
2
3.3k
AIコーディングの理想と現実
tomohisa
18
22k
SwiftUI API Design Lessons
niw
1
280
海外のアプリで見かけたかっこいいTransitionを真似てみる
shogotakasaki
1
170
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
0
110
国漢文混用体からHolloまで
minhee
1
180
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Designing for Performance
lara
608
69k
Optimizing for Happiness
mojombo
377
70k
Code Reviewing Like a Champion
maltzj
522
40k
Building Applications with DynamoDB
mza
94
6.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
119
51k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.6k
Side Projects
sachag
452
42k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Gamification - CAS2011
davidbonilla
81
5.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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/