ScalaCheck
ScalaCheck libraries are used for Generator-driven, property-based testing. ScalaCheck can be used for testing both Java and Scala. ScalaCheck is written in Scala and was inspired by QuickCheck for Haskell.
It is quite easy to introduce ScalaCheck in you is test harness, as it only needs Scala to work with and is not dependent on any other external libraries.
Note
To include ScalaCheck in your application test harness, add this line to your build.sbt file:
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.0" % "test"
For an in-depth view of ScalaCheck, check out, http://www.artima.com/shop/scalacheck.
Generators
ScalaCheck uses Generators for creating test data. Quite simply put, a Generator is a function that takes some parameters ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access