SlideShare a Scribd company logo
Property-based testing an
open source compiler, pflua
A fast and easy way to find bugs
kbarone@igalia.com ( luatime.org )
www.igalia.com
Katerina Barone-Adesi
Summary
● What is property-based testing?
● Why is it worth using?
● Property-based testing case study with pflua,
an open source compiler
● How do you implement it in an afternoon?
● What tools already exist?
Why test?
● Reliability
● Interoperability
● Avoiding regressions
● … but this is the test room, so
hopefully people already think testing
is useful and necessary
Why property-based testing?
● Writing tests by hand is slow, boring,
expensive, and usually doesn't lead to
many tests being written
● Generating tests is cheaper, faster,
more flexible, and more fun
● Covers cases humans might not
Why is it more flexible?
● Have you ever written a set of unit
tests, then had to change them all by
hand as the code changes?
● It's a lot easier and faster to change
one part of test generation instead!
What is property-based testing?
● Choose a property (a statement that
should always be true), such as:
● somefunc(x, y) < 100
● sort(sort(x)) == sort(x) (for stable sorts)
● run(expr) == run(optimize(expr))
● our_app(input) == other_app(input)
What is property-based testing not?
● A formal proof
● Exhaustive (except for very small types)
● What that means: property-based testing tries
to find counter-examples. If you find a counter-
example, something is wrong and must be
changed. If you don't, it's evidence (NOT proof)
towards that part of your program being correct.
Why not exhaustively test?
● Too difficult
● Too expensive
● Too resource-consuming (human and computer
time)
● Formal methods and state space reduction
have limitations
What is pflua?
● Pflua is a source to source compiler
● It takes libpcap's filter language (which we call
pflang), and emits lua code
● Why? This lets us run the lua code with luajit
● Performance: better than libpcap, often by a
factor of two or more
● https://github.com/Igalia/pflua/
● Apache License, Version 2.0
Property-based testing an open-source compiler, pflua (FOSDEM 2015)
What is pflang?
● The input for pflua, libpcap, and other tools
● Igalia's name for it, not an official name
● A language for defining packet filters
● Examples: “ip”, “tcp”, “tcp port 80”, …
● tcp port 80 and not host 192.168.0.1
● If you've used wireshark or tcpdump,
you've used pflang
Case study: testing pflua
● Pflua already had two forms of testing,
and works in practice
● Andy Wingo and I implemented a
property-based checker in an
afternoon, with one property...
What was the test property?
● lua code generated from optimized and
unoptimized IR has the same result on the
same random packet
● It compared two paths:
● Input → IR → optimize(IR) →
compile → run()
● Input → IR → (no change) →
compile → run()
What happened?
● We found 6/7 bugs
● Some are ones we were unlikely to
find with testing by hand
● Remember: pflua is an already-tested,
working project
What were the bugs?
● Accidental comments: 8--2 is 8, not 10! (Lua)
● Invalid optimization: ntohs/ntohl
● Generating invalid lua (return must end block)
● Range analysis: range folding bug (→ inf)
● Range analysis: not setting range of len
● Range analysis: NaN (inf – inf is not your friend)
● + a Luajit bug, found later by the same test
Case study recap
● Property-based testing is useful even for
seemingly-working, seemingly-mature code
● We found 3 bugs in range analysis
● We were unlikely to have found all 3 bugs with
unit testing by hand
● This was code that appeared to work
● Typical use didn't cause any visible problem
● 4 of the 6 bugs fixed that afternoon
Property-based testing: how?
● for i = 1,100 do
local g = generate_test_case()
run_test_case(property, g)
● Conceptually, it's that simple:
Generate and run tests (handling exceptions)
● With premade tools, you need a property,
and (sometimes) a random test generator
How to generate test cases
● The simplest version is unweighted choices:
function True() return { 'true' } end
function Comparison()
return { ComparisonOp(), Arithmetic(),
Arithmetic() } end
…
function Logical()
return choose({ Conditional, Comparison,
True, False, Fail })() end
Are unweighted choices enough?
● math.random(0, 2^32-1)
● Property: 1/y <= y
● False iff y = 0
● 4 billion test cases doesn't guarantee this will
be found...
● What are other common edge case numbers?
Weighted choices
function Number()
if math.random() < 0.2
then return math.random(0, 2^32 – 1)
else
return choose({ 0, 1, 2^32-1, 2^31-1 })
end
end
Write your own checker!
for i = 1,iterations do
local packet, packet_idx = choose(packets)
local P, len = packet.packet, packet.len
random_ir = Logical()
local unopt_lua = codegen.compile(random_ir)
local optimized = optimize.optimize(random_ir)
local opt_lua = codegen.compile(optimized)
if unopt_lua(P, len) ~= opt_lua(P, len)
then print_details_and_exit() end
end
Test generation problems
● Large, hard-to-analyze test cases
● Defaults to randomly searching the
solution space; randomly testing that
plain 'false' is still 'false' after
optimization as 20% of your 1000
tests is a bit daft
What level to test?
● For a compiler: the front-end language? Various
levels of IR? Other?
● In general: input? Internal objects?
● Tradeoffs: whitebox testing with internals can
be useful, but can break systems with internals
that the system itself cannot create.
● Testing multiple levels is possible
● Tends to test edge cases of lower levels
Interaction with interface stability
● At any level, more flexible than hand unit
testing
● Interfaces change. Inputs hopefully change
rarely; internals may change often
● Property-based testing makes refactoring
cheaper and easier: less code to change when
internals change, more test coverage
It's still worth unit testing
● Use property-based testing to find bugs (and
classes of bugs)
● Use unit tests for avoiding regressions;
continue to routinely test code that has already
caused problems, to reduce the chances that
known bugs will be re-introduced
● Use unit testing if test generation is infeasible,
or for extremely rare paths
Reproducible tests
● There are some pitfalls to outputting a
random seed to re-run tests
● The RNG may not produce consistent
results across platforms or be stable
across upgrades
● (Rare) Bugs in your compiler / interpreter
/ libraries can hinder reproducibility
Existing tools: QuickCheck
● Originally in Haskell; has been widely ported to
other languages
● Better tools for test case generation
● Allows filtering test cases
● Starts with small test cases
● QuickCheck2: test case minimization
The future of test generation
● Hypothesis, by David Ritchie MacIver (Python)
● https://github.com/DRMacIver/hypothesis
● Example database is better than saving seeds - it
propagates interesting examples between tests.
● Much smarter data generation
● Adapts to conditional tests better
● Blurs the lines between fuzz testing, conventional
unit testing and property based testing.
Forward-looking Hypothesis
● The following are planned, but not implemented
● Using coverage information to drive example
generation
● Adding "combining rules" which allow you to
also express things like "set | set -> set" and
then it can test properties on those too.
● Better workflows around integrating into CI
● End-of-February 1.0 release predicted
Other stable tools
● Scalacheck
● Quviq's Quickcheck for Erlang
● Have/inspired some of the benefits of
Hypothesis, but are already mature and widely
used
Conclusions
● Property-based testing finds tricky bugs and
saves time
● You can start it in an afternoon, with no tools
● There are some pretty helpful existing tools
(QuickCheck, Hypothesis, ScalaCheck, etc)
● Start property-based testing today!
● Or Monday, at least.

More Related Content

PDF
JProfiler / an introduction
PDF
me-and-python
PPTX
Introduction to Python Programming
PPT
Rational Robot (http://www.geektester.blogspot.com)
PDF
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
ODP
The Art of Evolutionary Algorithms Programming
PDF
ATDD Using Robot Framework
PDF
Unit testing legacy code
JProfiler / an introduction
me-and-python
Introduction to Python Programming
Rational Robot (http://www.geektester.blogspot.com)
ARB_gl_spirv implementation in Mesa: status update (XDC 2018)
The Art of Evolutionary Algorithms Programming
ATDD Using Robot Framework
Unit testing legacy code

What's hot (19)

PPTX
JProfiler8 @ OVIRT
PDF
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
PPTX
Refactoring legacy code driven by tests - ENG
PPTX
News In The Net40
PDF
Tips and Tricks for Testing Lambda Expressions in Android
PDF
Refactoring to Java 8 (Devoxx UK)
PDF
Build Great Networked APIs with Swift, OpenAPI, and gRPC
PPTX
Integration Group - Robot Framework
KEY
Programming with Python: Week 1
PDF
Robot Framework Introduction
PPTX
SecureWV - APT2
DOCX
Test driven development and unit testing with examples in C++
PDF
POUG2019 - Test your PL/SQL - your database will love you
PPTX
How to NLProc from .NET
PDF
High-Performance Python
PPT
Google mock for dummies
PDF
Fast and Reliable Swift APIs with gRPC
PPTX
DerbyCon - APT2
PDF
Living With Legacy Code
JProfiler8 @ OVIRT
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
Refactoring legacy code driven by tests - ENG
News In The Net40
Tips and Tricks for Testing Lambda Expressions in Android
Refactoring to Java 8 (Devoxx UK)
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Integration Group - Robot Framework
Programming with Python: Week 1
Robot Framework Introduction
SecureWV - APT2
Test driven development and unit testing with examples in C++
POUG2019 - Test your PL/SQL - your database will love you
How to NLProc from .NET
High-Performance Python
Google mock for dummies
Fast and Reliable Swift APIs with gRPC
DerbyCon - APT2
Living With Legacy Code
Ad

Viewers also liked (12)

PDF
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
PDF
Recent Improvements in Epiphany and WebKitGTK+ (GUADEC 2015)
PDF
How to test OpenGL drivers using Free Software (FOSDEM 2015)
PDF
A Short Introduction to Servo (Web Engines Hackfest 2014)
PDF
Self-hosted JS (ffconf 2014)
PDF
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
PDF
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
PDF
New interoperability features in LibreOffice
PDF
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
PDF
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
PDF
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
PDF
Spelunking through JPEG with Racket (Sixth RacketCon)
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Recent Improvements in Epiphany and WebKitGTK+ (GUADEC 2015)
How to test OpenGL drivers using Free Software (FOSDEM 2015)
A Short Introduction to Servo (Web Engines Hackfest 2014)
Self-hosted JS (ffconf 2014)
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
CSS Grid Layout is Just Around the Corner (CSSConf US 2015)
New interoperability features in LibreOffice
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
Spelunking through JPEG with Racket (Sixth RacketCon)
Ad

Similar to Property-based testing an open-source compiler, pflua (FOSDEM 2015) (20)

PDF
Why on Earth would I test if I have to just "Let it crash"?
PDF
Testing outside of the Ruby World
PPT
Testing foundations
PPTX
Understanding Key Concepts and Applications in Week 11: A Comprehensive Overv...
PPT
Quality Assurance
PDF
Presentation
PDF
clegoues-pwlconf-sept16-asPDF.pdf
PDF
Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...
PPTX
It Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
PDF
Building Efficient Software with Property Based Testing
PDF
PresentationqwertyuiopasdfghUnittest.pdf
PDF
Software Testing for Data Scientists
PPT
lec-11 Testing.ppt
DOC
Testing survey by_directions
PDF
DSR Testing (Part 1)
PPTX
Software Testing overview jay prakash maurya.pptx
PPTX
Software_Testing_Overview.pptx
PDF
ESUG 2024: Testing the tests with Mutalk in 2024
PDF
Testing untestable code - STPCon11
PDF
Plone Testing Tools And Techniques
Why on Earth would I test if I have to just "Let it crash"?
Testing outside of the Ruby World
Testing foundations
Understanding Key Concepts and Applications in Week 11: A Comprehensive Overv...
Quality Assurance
Presentation
clegoues-pwlconf-sept16-asPDF.pdf
Property based tests and where to find them - Andrzej Jóźwiak - TomTom Webina...
It Does What You Say, Not What You Mean: Lessons From A Decade of Program Repair
Building Efficient Software with Property Based Testing
PresentationqwertyuiopasdfghUnittest.pdf
Software Testing for Data Scientists
lec-11 Testing.ppt
Testing survey by_directions
DSR Testing (Part 1)
Software Testing overview jay prakash maurya.pptx
Software_Testing_Overview.pptx
ESUG 2024: Testing the tests with Mutalk in 2024
Testing untestable code - STPCon11
Plone Testing Tools And Techniques

More from Igalia (20)

PDF
Life of a Kernel Bug Fix
PDF
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
PDF
Advancing WebDriver BiDi support in WebKit
PDF
Jumping Over the Garden Wall - WPE WebKit on Android
PDF
Collective Funding, Governance and Prioritiation of Browser Engine Projects
PDF
Don't let your motivation go, save time with kworkflow
PDF
Solving the world’s (localization) problems
PDF
The Whippet Embeddable Garbage Collection Library
PDF
Nobody asks "How is JavaScript?"
PDF
Getting more juice out from your Raspberry Pi GPU
PDF
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
PDF
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
PDF
CSS :has() Unlimited Power
PDF
Device-Generated Commands in Vulkan
PDF
Current state of Lavapipe: Mesa's software renderer for Vulkan
PDF
Vulkan Video is Open: Application showcase
PDF
Scheme on WebAssembly: It is happening!
PDF
EBC - A new backend compiler for etnaviv
PDF
RISC-V LLVM State of the Union
PDF
Device-Generated Commands in Vulkan
Life of a Kernel Bug Fix
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
Advancing WebDriver BiDi support in WebKit
Jumping Over the Garden Wall - WPE WebKit on Android
Collective Funding, Governance and Prioritiation of Browser Engine Projects
Don't let your motivation go, save time with kworkflow
Solving the world’s (localization) problems
The Whippet Embeddable Garbage Collection Library
Nobody asks "How is JavaScript?"
Getting more juice out from your Raspberry Pi GPU
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
CSS :has() Unlimited Power
Device-Generated Commands in Vulkan
Current state of Lavapipe: Mesa's software renderer for Vulkan
Vulkan Video is Open: Application showcase
Scheme on WebAssembly: It is happening!
EBC - A new backend compiler for etnaviv
RISC-V LLVM State of the Union
Device-Generated Commands in Vulkan

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Empathic Computing: Creating Shared Understanding
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
A comparative analysis of optical character recognition models for extracting...
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Weekly Chronicles - August'25-Week II
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools
MIND Revenue Release Quarter 2 2025 Press Release
“AI and Expert System Decision Support & Business Intelligence Systems”
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Advanced methodologies resolving dimensionality complications for autism neur...
A comparative analysis of optical character recognition models for extracting...

Property-based testing an open-source compiler, pflua (FOSDEM 2015)

  • 1. Property-based testing an open source compiler, pflua A fast and easy way to find bugs [email protected] ( luatime.org ) www.igalia.com Katerina Barone-Adesi
  • 2. Summary ● What is property-based testing? ● Why is it worth using? ● Property-based testing case study with pflua, an open source compiler ● How do you implement it in an afternoon? ● What tools already exist?
  • 3. Why test? ● Reliability ● Interoperability ● Avoiding regressions ● … but this is the test room, so hopefully people already think testing is useful and necessary
  • 4. Why property-based testing? ● Writing tests by hand is slow, boring, expensive, and usually doesn't lead to many tests being written ● Generating tests is cheaper, faster, more flexible, and more fun ● Covers cases humans might not
  • 5. Why is it more flexible? ● Have you ever written a set of unit tests, then had to change them all by hand as the code changes? ● It's a lot easier and faster to change one part of test generation instead!
  • 6. What is property-based testing? ● Choose a property (a statement that should always be true), such as: ● somefunc(x, y) < 100 ● sort(sort(x)) == sort(x) (for stable sorts) ● run(expr) == run(optimize(expr)) ● our_app(input) == other_app(input)
  • 7. What is property-based testing not? ● A formal proof ● Exhaustive (except for very small types) ● What that means: property-based testing tries to find counter-examples. If you find a counter- example, something is wrong and must be changed. If you don't, it's evidence (NOT proof) towards that part of your program being correct.
  • 8. Why not exhaustively test? ● Too difficult ● Too expensive ● Too resource-consuming (human and computer time) ● Formal methods and state space reduction have limitations
  • 9. What is pflua? ● Pflua is a source to source compiler ● It takes libpcap's filter language (which we call pflang), and emits lua code ● Why? This lets us run the lua code with luajit ● Performance: better than libpcap, often by a factor of two or more ● https://github.com/Igalia/pflua/ ● Apache License, Version 2.0
  • 11. What is pflang? ● The input for pflua, libpcap, and other tools ● Igalia's name for it, not an official name ● A language for defining packet filters ● Examples: “ip”, “tcp”, “tcp port 80”, … ● tcp port 80 and not host 192.168.0.1 ● If you've used wireshark or tcpdump, you've used pflang
  • 12. Case study: testing pflua ● Pflua already had two forms of testing, and works in practice ● Andy Wingo and I implemented a property-based checker in an afternoon, with one property...
  • 13. What was the test property? ● lua code generated from optimized and unoptimized IR has the same result on the same random packet ● It compared two paths: ● Input → IR → optimize(IR) → compile → run() ● Input → IR → (no change) → compile → run()
  • 14. What happened? ● We found 6/7 bugs ● Some are ones we were unlikely to find with testing by hand ● Remember: pflua is an already-tested, working project
  • 15. What were the bugs? ● Accidental comments: 8--2 is 8, not 10! (Lua) ● Invalid optimization: ntohs/ntohl ● Generating invalid lua (return must end block) ● Range analysis: range folding bug (→ inf) ● Range analysis: not setting range of len ● Range analysis: NaN (inf – inf is not your friend) ● + a Luajit bug, found later by the same test
  • 16. Case study recap ● Property-based testing is useful even for seemingly-working, seemingly-mature code ● We found 3 bugs in range analysis ● We were unlikely to have found all 3 bugs with unit testing by hand ● This was code that appeared to work ● Typical use didn't cause any visible problem ● 4 of the 6 bugs fixed that afternoon
  • 17. Property-based testing: how? ● for i = 1,100 do local g = generate_test_case() run_test_case(property, g) ● Conceptually, it's that simple: Generate and run tests (handling exceptions) ● With premade tools, you need a property, and (sometimes) a random test generator
  • 18. How to generate test cases ● The simplest version is unweighted choices: function True() return { 'true' } end function Comparison() return { ComparisonOp(), Arithmetic(), Arithmetic() } end … function Logical() return choose({ Conditional, Comparison, True, False, Fail })() end
  • 19. Are unweighted choices enough? ● math.random(0, 2^32-1) ● Property: 1/y <= y ● False iff y = 0 ● 4 billion test cases doesn't guarantee this will be found... ● What are other common edge case numbers?
  • 20. Weighted choices function Number() if math.random() < 0.2 then return math.random(0, 2^32 – 1) else return choose({ 0, 1, 2^32-1, 2^31-1 }) end end
  • 21. Write your own checker! for i = 1,iterations do local packet, packet_idx = choose(packets) local P, len = packet.packet, packet.len random_ir = Logical() local unopt_lua = codegen.compile(random_ir) local optimized = optimize.optimize(random_ir) local opt_lua = codegen.compile(optimized) if unopt_lua(P, len) ~= opt_lua(P, len) then print_details_and_exit() end end
  • 22. Test generation problems ● Large, hard-to-analyze test cases ● Defaults to randomly searching the solution space; randomly testing that plain 'false' is still 'false' after optimization as 20% of your 1000 tests is a bit daft
  • 23. What level to test? ● For a compiler: the front-end language? Various levels of IR? Other? ● In general: input? Internal objects? ● Tradeoffs: whitebox testing with internals can be useful, but can break systems with internals that the system itself cannot create. ● Testing multiple levels is possible ● Tends to test edge cases of lower levels
  • 24. Interaction with interface stability ● At any level, more flexible than hand unit testing ● Interfaces change. Inputs hopefully change rarely; internals may change often ● Property-based testing makes refactoring cheaper and easier: less code to change when internals change, more test coverage
  • 25. It's still worth unit testing ● Use property-based testing to find bugs (and classes of bugs) ● Use unit tests for avoiding regressions; continue to routinely test code that has already caused problems, to reduce the chances that known bugs will be re-introduced ● Use unit testing if test generation is infeasible, or for extremely rare paths
  • 26. Reproducible tests ● There are some pitfalls to outputting a random seed to re-run tests ● The RNG may not produce consistent results across platforms or be stable across upgrades ● (Rare) Bugs in your compiler / interpreter / libraries can hinder reproducibility
  • 27. Existing tools: QuickCheck ● Originally in Haskell; has been widely ported to other languages ● Better tools for test case generation ● Allows filtering test cases ● Starts with small test cases ● QuickCheck2: test case minimization
  • 28. The future of test generation ● Hypothesis, by David Ritchie MacIver (Python) ● https://github.com/DRMacIver/hypothesis ● Example database is better than saving seeds - it propagates interesting examples between tests. ● Much smarter data generation ● Adapts to conditional tests better ● Blurs the lines between fuzz testing, conventional unit testing and property based testing.
  • 29. Forward-looking Hypothesis ● The following are planned, but not implemented ● Using coverage information to drive example generation ● Adding "combining rules" which allow you to also express things like "set | set -> set" and then it can test properties on those too. ● Better workflows around integrating into CI ● End-of-February 1.0 release predicted
  • 30. Other stable tools ● Scalacheck ● Quviq's Quickcheck for Erlang ● Have/inspired some of the benefits of Hypothesis, but are already mature and widely used
  • 31. Conclusions ● Property-based testing finds tricky bugs and saves time ● You can start it in an afternoon, with no tools ● There are some pretty helpful existing tools (QuickCheck, Hypothesis, ScalaCheck, etc) ● Start property-based testing today! ● Or Monday, at least.