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) or Tiny Mersenne Twister (Scala.js)
- Scala.js support
testFrameworks += new TestFramework("scalaprops.ScalapropsFramework")
parallelExecution in Test := false // currently, does not support parallel execution
libraryDependencies += "com.github.scalaprops" %% "scalaprops" % "0.3.4" % "test"
libraryDependencies += "com.github.scalaprops" %% "scalaprops-scalazlaws" % "0.3.4" % "test"
or you can use sbt plugin
resolvers += Opts.resolver.sonatypeSnapshots
testFrameworks += new TestFramework("scalaprops.ScalapropsFramework")
parallelExecution in Test := false
libraryDependencies += "com.github.scalaprops" %% "scalaprops" % "0.3.5-SNAPSHOT" % "test"
libraryDependencies += "com.github.scalaprops" %% "scalaprops-scalazlaws" % "0.3.5-SNAPSHOT" % "test"