Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. Property-Based Testing Tools
  3. Scala Hedgehog

Scala Hedgehog

What it is

Scala Hedgehog is a property-based testing system for Scala. It generates values to test properties and can simplify failing cases through integrated shrinking, preserving the invariants of generated values. Range combinators let developers set bounds for generated numbers and collections. For stateful software such as web services and database layers, it supports abstract state machine testing. The project provides an SBT test runner and integration modules for Minitest and MUnit; its documentation also describes Gradle support through a Scala plugin. The getting-started guide assumes SBT. Documented Scala versions are 2.12, 2.13, and 3.3 or later. Its core module has no external dependencies, and module binaries are published through Maven Central. Scala Hedgehog is free, with no paid plans listed. The project describes itself as an early release and says its API may change before wider adoption. IntelliJ's Scala plugin does not list Hedgehog among its built-in test frameworks, though Properties tests can be run as applications.

For and against

For

  • Shrinking simplifies failures while preserving generated-value invariants.
  • Supports abstract state machine testing.
  • Range combinators control generated numbers and collections.
  • Includes SBT, Minitest, and MUnit support.
  • Core module has no external dependencies.

Against

  • The project describes the release as early.
  • The API may change before wider adoption.
  • IntelliJ's Scala plugin lacks built-in framework listing.

The verdict

Scala Hedgehog combines property generation, shrinking, and stateful testing with several Scala test integrations. Its early-release status and IntelliJ limitation are important considerations.

Who it suits

Scala developers seeking property-based tests, including tests for stateful systems, are the intended users. It may suit teams using SBT, Minitest, or MUnit.

Plans and prices

Scala Hedgehog

Free

Open-source Scala testing library · no paid plans listed

Every plan, in full

On the record

Automatic shrinking
Integrated shrinking simplifies failing test cases while preserving the invariants of generated values.hedgehogqa.github.io · read 4 Oct 2026
Availability
The project documents binary dependencies published through Maven Central, including core, runner, SBT, Minitest, and MUnit modules.hedgehogqa.github.io · read 4 Oct 2026
Build tools
The getting-started documentation assumes SBT and says Hedgehog is also supported for Gradle through a Scala plugin.hedgehogqa.github.io · read 4 Oct 2026
Core dependencies
The core module currently has no external dependencies.hedgehogqa.github.io · read 4 Oct 2026
Generator control
Range combinators control the scope of generated numbers and collections.hedgehogqa.github.io · read 4 Oct 2026
IDE limitation
The docs say the IntelliJ Scala plugin does not include Hedgehog among its hard-coded supported test frameworks; tests can be run as applications by extending Properties, with the test defined as an object.hedgehogqa.github.io · read 4 Oct 2026
Integrated shrinking
Its integrated shrinkers compose with generators, so shrunk values preserve their invariants by construction.hedgehogqa.github.io · read 4 Oct 2026
IntelliJ limitation
The docs say IntelliJ's Scala plugin does not list Hedgehog among its hard-coded supported test frameworks, and explain how to run Properties tests as an application instead.hedgehogqa.github.io · read 4 Oct 2026
Intended users
The project is for Scala developers who want property-based tests, including tests of stateful systems.hedgehogqa.github.io · read 4 Oct 2026
Minitest integration
Scala Hedgehog lists Minitest as an available integration module.hedgehogqa.github.io · read 4 Oct 2026
MUnit integration
The hedgehog-munit module supports property-based and example-based Hedgehog tests in an MUnit test suite.hedgehogqa.github.io · read 4 Oct 2026
Purpose
Scala Hedgehog is a property-based testing system for Scala, in the spirit of QuickCheck and ScalaCheck.hedgehogqa.github.io · read 4 Oct 2026
Range controls
Range combinators control the scope of generated numbers and collections.hedgehogqa.github.io · read 4 Oct 2026
Release status
The project describes itself as in an early release and says its API may break until wider adoption.hedgehogqa.github.io · read 4 Oct 2026
SBT runner
Hedgehog provides an sbt testing extension; sbt 1.9.1 and higher support it by default, while versions 1.9.0 and lower require a testFrameworks setting.hedgehogqa.github.io · read 4 Oct 2026
Scala compatibility
The documentation lists support for Scala 2.12, 2.13, and 3.3+.hedgehogqa.github.io · read 4 Oct 2026
Scala versions
The documented supported Scala versions are 2.12, 2.13, and 3.3+.hedgehogqa.github.io · read 4 Oct 2026
Stateful testing
It supports abstract state machine testing for stateful systems such as web services and database layers.hedgehogqa.github.io · read 4 Oct 2026

The review

Scala Hedgehog is a property-based testing library for Scala projects that need to check behavior across generated inputs and stateful operations. It is a strong fit for developers who want shrinking integrated with generators and can accept an API still in early release.

Overview

Hedgehog lets developers express properties and evaluate them with generated values, extending testing beyond a set of hand-picked examples. Its support for abstract state machines also suits systems whose behavior depends on sequences of operations, including web services and database layers.

Range combinators help keep generated numbers and collections within relevant bounds. When a case fails, integrated shrinkers simplify it while preserving generator invariants, so the reduced example remains within the generator’s intended constraints. The core module has no external dependencies, and modules are published through Maven Central. The main trade-off is maturity: Hedgehog calls itself an early release and warns that its API may break before broader adoption.

Key features

Property generation and shrinking

Generator ranges let teams shape the values a property should cover rather than testing an unrestricted input space. Integrated shrinking makes failures easier to examine by reducing failing cases without discarding the invariants encoded in their generators. Reproducible failures are supported, which helps developers revisit a problem case.

Stateful testing

Abstract state-machine testing allows properties to cover stateful systems, not just individual inputs. That makes Hedgehog relevant when correctness depends on how a service or database layer responds across operations.

Test integrations and build tools

The project includes an SBT test runner and an SBT testing extension; SBT 1.9.1 and later support the extension by default, while older versions require a testFrameworks setting. MUnit users can use the hedgehog-munit module for both property-based and example-based tests in an MUnit suite. Minitest is also supported through an integration module. Getting-started guidance assumes SBT, while Gradle support is provided through a Scala plugin.

Documented Scala compatibility covers 2.12, 2.13, and 3.3+. IntelliJ’s Scala plugin does not include Hedgehog among its hard-coded test frameworks, so properties need to be run as applications by extending Properties and defining the test as an object. That workaround is workable, but less seamless than framework discovery.

Pricing

Scala Hedgehog is free: its plan costs nothing and describes an open-source Scala testing library. There is no paid plan or free trial. For Scala teams, that removes a purchase decision, though the cost advantage does not offset the early-release API risk for projects that require a stable testing interface.

Platforms

Scala Hedgehog is listed for Linux. Its documented build and test integrations center on Scala projects using SBT, Gradle through a Scala plugin, MUnit, or Minitest; Scala support includes versions 2.12, 2.13, and 3.3+.

Who it's for

Choose Hedgehog if you are building in Scala and want generated property tests, invariant-preserving shrinking, or state-machine coverage, particularly within an SBT or supported test-integration workflow. It is less suitable for teams that depend on IntelliJ’s normal test-framework discovery or cannot accommodate possible API changes.

Pros and cons

Pros

  • Invariant-preserving shrinking: reduced failures remain valid under the generator’s constraints, making them more useful to diagnose.
  • State-machine support: tests can address sequences of behavior in stateful systems as well as isolated values.
  • Multiple Scala test integrations: SBT, MUnit, and Minitest options fit several existing test workflows.
  • No external core dependencies: the core module avoids adding external dependencies to a project’s test stack.

Cons

  • Early-release API: the project warns that the API may break, creating maintenance risk for teams adopting it.
  • IntelliJ workaround: the Scala plugin does not hard-code support for Hedgehog, so properties must be run as applications rather than discovered as a supported test framework.
  • SBT version caveat: versions 1.9.0 and lower need a test-framework setting to use the extension.

Alternatives

Property-Based Testing Tools is a directory of other options to consider. For Scala projects comparing property-testing libraries, ScalaCheck is another free open-source library, with Linux, macOS, and Windows listed as platforms. For a different language, SwiftCheck is free and lists iOS and macOS; Gopter is a free MIT-licensed Go library for Linux and self-hosted use; and JSVerify is a free open-source JavaScript library for self-hosted and web use.

CsCheck, FsCheck, PropCheck, and QCheck are also alternatives.

Verdict

Scala Hedgehog is a good choice for Scala developers seeking free property-based and stateful testing with shrinking that respects generator invariants. Its broad integration options and dependency-free core are practical strengths; look elsewhere if a mature, stable API or straightforward IntelliJ test discovery is essential.

Alternatives to Scala Hedgehog

Every alternative, ranked