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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mickael Metesreau
December 21, 2016
Programming
0
64
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
91
Alt.Net Talks - The Actor Model
mmetesreau
0
52
Betclic Dojo - Where is Fluffy?
mmetesreau
0
75
Mini training - EventStore
mmetesreau
0
70
Alt.Net Talks - EdgeJs
mmetesreau
0
300
Betclic Dojo - Extreme Carpaccio
mmetesreau
0
130
Betclic Dojo - Game of life
mmetesreau
0
42
Mini training - Containerization and Docker
mmetesreau
0
450
Other Decks in Programming
See All in Programming
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
260
CSC307 Lecture 15
javiergs
PRO
0
240
Ruby and LLM Ecosystem 2nd
koic
0
310
ロボットのための工場に灯りは要らない
watany
6
1.6k
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
180
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
220
文字コードの話
qnighy
44
17k
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
550
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
120
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
110
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
250
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
950
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
280
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
410
The Spectacular Lies of Maps
axbom
PRO
1
600
Mind Mapping
helmedeiros
PRO
1
110
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
150
From π to Pie charts
rasagy
0
150
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
130
WCS-LA-2024
lcolladotor
0
480
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
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/