property based testing library for Scala
- real
scala.FunctionN
generators usingCogen
(akaCoArbitraryin 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 likediscipline
- 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 isMersenne Twister(JVM, scala-native) orTiny Mersenne Twister(Scala.js)
- Scala.jssupport
- scala-nativesupport. seehttps://github /scalaprops/scalaprops-native-example
- deterministic testing
please use sbt plugin because there are some convenient features.
setup without sbt plugin
testFrameworks+=newTestFramework("scalaprops.ScalapropsFramework")
parallelExecution inTest:=false//currently, does not support parallel execution
libraryDependencies+="com.github.scalaprops"%%"scalaprops"%"0.9.1"%"test"
libraryDependencies+="com.github.scalaprops"%%"scalaprops-scalaz"%"0.9.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.
Seescalaprops-exampleproject.