A property-based testing library for Scala with advanced generators, flexible configuration, and full Scala.js/scala-native support.
ScalaProps is a property-based testing library for Scala that generates random test data to verify code properties, offering advanced features like real function generators, flexible per-test settings, and cross-platform support. It solves the need for more configurable and deterministic property testing in Scala, especially for functional programming with Scalaz integration. The library provides immutable random number generation and reproducible test execution.
Scala developers, particularly those using functional programming libraries like Scalaz, who need robust property-based testing for applications targeting JVM, JavaScript (via Scala.js), or native platforms (via scala-native).
Developers choose ScalaProps over alternatives like ScalaCheck for its flexible per-test configuration, immutable random number generators, deterministic testing with seed replay, and seamless integration with Scalaz and cross-platform Scala projects.
property based testing library for Scala
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates scala.FunctionN instances using Cogen, enabling comprehensive testing of higher-order functions beyond constant values, similar to QuickCheck's CoArbitrary.
Allows configuration of parameters like test size on a per-property basis, a feature missing in ScalaCheck, providing fine-grained control for diverse testing needs.
Emits seeds for failing tests and supports re-running with the same seed via --seed option, ensuring reproducible debugging and reliable test outcomes.
Fully compatible with Scala.js and scala-native, enabling property-based testing across JVM, JavaScript, and native platforms without code changes.
Uses immutable Mersenne Twister variants instead of mutable scala.util.Random, reducing side effects and enhancing test reproducibility and reliability.
Currently does not support parallel test execution, as indicated by the setup requiring parallelExecution in Test := false, which can slow down large test suites.
Deep integration with Scalaz for laws and instances adds dependency bloat and complexity for projects not using Scalaz, limiting its appeal in diverse Scala ecosystems.
Requires specific sbt configuration and recommends using a plugin for convenience, making initial setup more involved compared to drop-in alternatives like ScalaCheck.
scalaprops is an open-source alternative to the following products: