All Projects → jmid → pbt-frameworks

jmid / pbt-frameworks

Licence: other
An overview of property-based testing functionality

Projects that are alternatives of or similar to pbt-frameworks

Quickcheck State Machine
Test monadic programs using state machine based models
Stars: ✭ 192 (+562.07%)
Mutual labels:  quickcheck, property-based-testing
quick.py
Property-based testing library for Python
Stars: ✭ 15 (-48.28%)
Mutual labels:  quickcheck, property-based-testing
extrapolate
generalize counter-examples of property-based testing
Stars: ✭ 13 (-55.17%)
Mutual labels:  property-based-testing, property-testing
Rapid
Rapid is a Go library for property-based testing that supports state machine ("stateful" or "model-based") testing and fully automatic test case minimization ("shrinking")
Stars: ✭ 213 (+634.48%)
Mutual labels:  quickcheck, property-based-testing
kitimat
A library for generative, property-based testing in TypeScript and Jest.
Stars: ✭ 68 (+134.48%)
Mutual labels:  quickcheck, property-based-testing
ava-fast-check
Property based testing for AVA based on fast-check
Stars: ✭ 44 (+51.72%)
Mutual labels:  quickcheck, property-based-testing
Swiftcheck
QuickCheck for Swift
Stars: ✭ 1,319 (+4448.28%)
Mutual labels:  quickcheck, property-based-testing
Haskell Hedgehog
Release with confidence, state-of-the-art property testing for Haskell.
Stars: ✭ 584 (+1913.79%)
Mutual labels:  quickcheck, property-based-testing
quickcheck
Randomized testing for Prolog à la QuickCheck
Stars: ✭ 18 (-37.93%)
Mutual labels:  quickcheck, property-based-testing
Quick check.js
A JS implementation of quick_check
Stars: ✭ 48 (+65.52%)
Mutual labels:  quickcheck, property-based-testing
Fsharp Hedgehog
Release with confidence, state-of-the-art property testing for .NET.
Stars: ✭ 219 (+655.17%)
Mutual labels:  quickcheck, property-based-testing
fuzz-rest-api
Derive property based testing fast-check into a fuzzer for REST APIs
Stars: ✭ 38 (+31.03%)
Mutual labels:  quickcheck, property-based-testing
efftester
Effect-Driven Compiler Tester for OCaml
Stars: ✭ 37 (+27.59%)
Mutual labels:  quickcheck, property-based-testing
Qcheck
QuickCheck inspired property-based testing for OCaml.
Stars: ✭ 194 (+568.97%)
Mutual labels:  quickcheck, property-based-testing
Stream data
Data generation and property-based testing for Elixir. 🔮
Stars: ✭ 597 (+1958.62%)
Mutual labels:  quickcheck, property-based-testing
Fast Check
Property based testing framework for JavaScript (like QuickCheck) written in TypeScript
Stars: ✭ 2,604 (+8879.31%)
Mutual labels:  quickcheck, property-based-testing
Jqf
JQF + Zest: Coverage-guided semantic fuzzing for Java.
Stars: ✭ 340 (+1072.41%)
Mutual labels:  quickcheck, property-based-testing
Quicktheories
Property based testing for Java 8
Stars: ✭ 483 (+1565.52%)
Mutual labels:  quickcheck, property-based-testing
Junit Quickcheck
Property-based testing, JUnit-style
Stars: ✭ 821 (+2731.03%)
Mutual labels:  quickcheck, property-based-testing
Qcstm
A simple state-machine framework for OCaml based on QCheck
Stars: ✭ 50 (+72.41%)
Mutual labels:  quickcheck, property-based-testing

Overview of Property-Based Testing Functionality

Property-based testing (PBT) frameworks come with a number of different features, but which library supports which features? For a PBT newcomer, it can be hard to tell. Strictly speaking you don't even need a PBT framework. Property-based tests can be written from scratch on a case-by-case basis using a random number generator. One can even test stateful code without a state-machine framework, e.g., as outlined here. However a framework provides reusable parts and infrastructure, thus paving the way for bigger developments, such as property-based testing automotive software against the AUTOSAR specification.

  • To test an imperative API a framework with state machine support would be nice.
  • Integrated shrinking can be a nice feature for bigger developments where writing custom shrinkers may be out of the question.
  • ...

This overview is to help myself keep track. It has been compiled over a number of years teaching PBT. As features are gradually added to a framework the table's entries may unfortunately become outdated. YMMV.

I'll be happy to accept PRs for updating entries and adding new frameworks.

Framework functionality

Framework Language Gen. EDSL Shrinking Int. shr. State machine Par. st. mach. Cov. guidance
QuickCheck Erlang ✔️ ✔️ ✔️ ✔️ ✔️
PropEr Erlang ✔️ ✔️ ✔️ ✔️ ✔️
QuickCheck Haskell ✔️ ✔️ (✔️) (✔️)
SmallCheck Haskell ✔️ 1 1
Hedgehog Haskell ✔️ ✔️ ✔️ ✔️ ✔️
Scala-Hedgehog Scala / JVM ✔️ ✔️ ✔️ ✔️ ✔️
R-Hedgehog R ✔️ ✔️ ✔️ ✔️
FSharp-Hedgehog F# / .Net ✔️ ✔️ ✔️
Hypothesis Python ✔️ ✔️ ✔️ ✔️ (✔️)2 (✔️), (✔️)
TSTL Python 3 ✔️ ✔️ ✔️ ✔️
ScalaCheck Scala / JVM ✔️ ✔️ ✔️ ✔️
gopter Go ✔️ ✔️ ✔️
Rapid Go ✔️ ✔️ ✔️ ✔️
propCheck Kotlin ✔️ ✔️ ✔️ ✔️ ✔️
FsCheck F# / .Net ✔️ ✔️ ✔️
CsCheck C# / .Net ✔️ ✔️ ✔️ ✔️ ✔️
fast-check JS / TS ✔️ ✔️ ✔️ ✔️ (✔️)2
QCheck OCaml ✔️ ✔️ (✔️) (✔️) (✔️)
Crowbar OCaml ✔️ (✔️)4 ✔️
Monolith OCaml ✔️ (✔️)4 ✔️
Base_quickcheck OCaml ✔️ ✔️
Popper OCaml ✔️ ✔️ ✔️
junit-quickcheck Java ✔️ ✔️ (✔️)5
QuickTheories Java ✔️ ✔️ ✔️ (✔️) (✔️) ✔️
jqwik Java ✔️ ✔️ ✔️ ✔️
quickcheck Rust ✔️ ✔️
propcheck Rust ✔️ ✔️ ✔️
Fox Obj.C / Swift ✔️ ✔️ ✔️ ✔️ (✔️)
SwiftCheck Swift ✔️ ✔️
RapidCheck C++ ✔️ ✔️ ✔️ (✔️)
test.check Clojure ✔️ ✔️ ✔️ ? ?
Lua-QuickCheck Lua ✔️ ✔️ ✔️ ✔️
theft C (✔️) ✔️ (✔️) (✔️)
DeepState C / C++ (✔️) ✔️ ✔️ ✔️
Echidna Solidity / EVM ✔️ ✔️ ✔️ ✔️
...

Legend:

  • Language denotes the frameworks's language or platform
  • Generator EDSL denotes whether the framework has an expressive, embedded domain-specific language for programming custom generators (int, list, map, ...)
  • Shrinking denotes whether the framework has built-in support for reducing counterexamples.
  • Integrated shrinking denotes whether a shrinker automatically preserves any invariants of an EDSL-based custom generator (sorted lists, non-empty array, valid JSON, ...)
  • State machine denotes whether the framework has a state-machine library for model-based testing.
  • Parallel state machine denotes whether the framework supports parallel state-machine testing for race conditons, etc.
  • Coverage guidance denotes whether the framework's generators (and shrinkers) can be guided by code coverage information obtained via instrumentation.

Footnotes

Background:

The term property-based testing seems to originate from 'Property-Based Testing; A New Approach to Testing for Assurance' by Fink and Bishop (SE Notes 1997). The approach was popularized as an embedded domain-specific language in 'QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs' by Claessen and Hughes (ICFP 2000) which inspired ports to many other languages.

Integrated shrinking is explained in more detail in

State machines to test protocols and systems with state are described in

Parallel state-machine tests for race conditions were later introduced in

Additional resources:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].