property based testing library for Scala
- real
scala.FunctionN
generators usingCogen
(aka CoArbitrary in QuickCheck). scalaprops can generate not only constant Functions - flexible parameter settings for each test( ScalaCheck doesn't have this feature )
- timeout as soon as possible
- flexible law checking like discipline
- discipline uses only
String
for test id. but scalaprops can use other thanString
- scalaz integration
- laws for scalaz typeclasses
Gen
andCogen
instances of scalaz datatypes- immutable random number generator
- scalaprops does not use
scala.util.Random
becausescala.util.Random
is mutable - default implementation is Mersenne Twister (JVM, scala-native) or Tiny Mersenne Twister (Scala.js)
- Scala.js support
- scala-native support. see https://github.com/scalaprops/scalaprops-native-example
- deterministic testing
please use sbt plugin because there are some convenient features.
setup without sbt plugin
testFrameworks += new TestFramework("scalaprops.ScalapropsFramework")
parallelExecution in Test := false // currently, does not support parallel execution
libraryDependencies += "com.github.scalaprops" %% "scalaprops" % "0.8.1" % "test"
libraryDependencies += "com.github.scalaprops" %% "scalaprops-scalaz" % "0.8.1" % "test"
Scalaprops emitting which seed it started with during a failing test, and providing an interface --seed=<value>
for re-running the failing test with the same seed.
See scalaprops-example project.