Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Gopter

github.com

  • Free plan
  • Linux
  • Self-hosted
7.2 Club score Visit github.com

What Gopter is

Gopter is a free Go module for property-based testing. It creates properties from conditions and generated inputs, then checks whether those properties hold. Its generators offer tighter control than Go's testing/quick package and can be composed with operations such as Map, FlatMap, SuchThat, and WithShrinker. When a property fails, shrinkers search for a smaller value that still exposes the failure. The library includes a generator for regular-expression matches and supports stateful tests built around arbitrary commands. Properties can run with Go's testing.T through TestingRun, while the gopter/convey package provides helpers for GoConvey tests. Console and formatted reporters present test results. The project is a Go module that declares Go 1.20 and is distributed under the MIT License. Its documentation covers gopter, gen, prop, arbitrary, commands, and convey packages. The README identifies two limitations: there is no ScalaCheck Pretty feature, and parallel commands are not available yet.

Who it suits

Gopter suits Go developers who want to test properties across generated inputs, including stateful behavior. It can fit projects using Go's testing package or GoConvey.

Good to know, and what to watch

  • Shrinkers reduce failing inputs.
  • Generators support composition operations.
  • Includes regular-expression match generation.
  • Supports stateful tests with arbitrary commands.
  • Works with Go testing.T and GoConvey.
  • Parallel commands are not available yet.
  • Does not provide ScalaCheck's Pretty feature.
  • Declares Go 1.20.

Gopter

Free

MIT-licensed package

Free

Free plan

Getting started

  1. Open the Gopter GitHub repository
  2. Add the github.com/leanovate/gopter Go module to a Go 1.20 project
  3. Define properties from condition functions and generated inputs
  4. Compose generators with operations such as Map, FlatMap, SuchThat, or WithShrinker
  5. Run checks with TestingRun and Go’s testing.T
  6. Use gopter/convey helpers when writing GoConvey tests

Limits to check

Gopter is free under the MIT License. The README identifies no parallel commands and no ScalaCheck Pretty feature.

The Club's review

Overview

Gopter brings property-based testing to Go projects that need more control over generated cases than the standard testing/quick package provides. It is best suited to Go developers who want to check general properties across generated inputs, including stateful behavior. Its strongest case is the combination of generator control and automatic shrinking; teams needing parallel commands or ScalaCheck’s Pretty feature should look elsewhere.

Key features

Generators can be composed with Map, FlatMap, SuchThat and WithShrinker, giving developers ways to shape both generated inputs and their reduction. When a property fails, shrinking searches for a minimum value that still falsifies it. That makes a counterexample more tractable to diagnose, while reproducible failures help developers return to the same case.

Gopter also generates matches for regular expressions and supports stateful tests built from arbitrary commands. The former is useful for properties involving pattern-constrained strings; the latter extends testing from isolated values to behavior across commands. The README says parallel commands are not available yet, which limits its fit for teams that need concurrent command execution. It also lacks ScalaCheck’s Pretty feature.

Properties can run with Go’s testing.T context through TestingRun. The gopter/convey package provides helpers for using Gopter within GoConvey tests, and console and formatted reporters present results. Documentation covers the gopter, gen, prop, arbitrary, commands and convey packages.

Pricing

Gopter is free: both the MIT-licensed package and the Gopter plan cost nothing. There is no paid tier to weigh against the free option, and no free-trial decision; the project is distributed under the MIT License.

Platforms

Gopter is a Go module for Linux and self-hosted use, with Go 1.20 declared. It supports Go’s testing package and GoConvey. This is a library for teams working in Go rather than a hosted testing service.

Who it's for

Choose Gopter if you write Go and want more generator control than testing/quick, automatic shrinking, reproducible failures, or stateful tests. Its Go test and GoConvey integrations make it a natural fit for projects already using those testing workflows. It is less suitable when parallel commands or Pretty support are requirements.

Pros and cons

  • Pros: Composable generators and automatic shrinking give developers control over inputs and a smaller failing case to investigate.
  • Pros: Regex generators and stateful tests cover constrained strings and command-driven behavior, while Go test and GoConvey integrations fit existing Go testing workflows.
  • Cons: Parallel commands are not available yet, so command-based tests cannot use that capability.
  • Cons: Gopter does not provide ScalaCheck’s Pretty feature.

Alternatives

For another Go option, Rapid is a free, open-source Go library with no dependencies outside the Go standard library; choose it if that dependency constraint is the deciding factor. For a Haskell library, QuickCheck is free. fast-check is a free MIT-licensed option for JavaScript and TypeScript across API, Linux and web platforms. PropEr is free, self-hosted software under GPL version 3 or later; QCheck is a free OCaml property-testing library under BSD-2-Clause. Scala Hedgehog is a free open-source Scala testing library with no paid plans, while CsCheck is self-hosted, Apache 2 software described as free forever. Hypothesis is a free option for Linux, macOS and Windows. Browse the Property-Based Testing Tools directory for more choices.

Verdict

Go developers who want configurable property generators, shrinking and stateful tests should choose Gopter for its focused testing scope and integrations with Go’s testing package and GoConvey. Look elsewhere if parallel command execution or ScalaCheck-style Pretty support is essential.

The verdict

Gopter offers property generation, shrinking, and stateful tests for Go projects. Its documented gaps around parallel commands and Pretty support may matter for teams expecting those capabilities.

Questions people ask

How much does Gopter cost?

Gopter is free, with a listed price of free MIT-licensed Go package.

Which platforms does Gopter support?

The listed platforms are Linux and self-hosted environments.

Which languages and test runners are supported?

Gopter supports Go, Go’s testing package through TestingRun, and GoConvey helpers.

Is Gopter open source?

Yes. It is distributed under the MIT License and hosted in a public GitHub repository.

Does Gopter shrink failing cases?

Yes. Its shrinkers automatically seek a minimum value that still falsifies a property.

What the maker publishes

API usage
The package provides TestingRun for running property checks with a Go testing.T context. source
Commands limitation
The README says parallel commands are not available yet. source
Documentation packages
Documentation covers gopter, gen, prop, arbitrary, commands, and convey packages. source
Generator composition
Generators support operations including Map, FlatMap, SuchThat, and WithShrinker. source
Generators
Gopter provides tighter control over generators than testing/quick. source
Generators
It provides tighter control over generators than Go's testing/quick package. source
GoConvey
The gopter/convey package provides helpers for using Gopter inside GoConvey tests. source
GoConvey integration
The convey package provides helpers used by Gopter inside GoConvey tests. source
Known limitation
The README notes that Gopter does not provide ScalaCheck's Pretty feature and has no parallel commands yet. source
License
The project is distributed under the MIT License. source
License
The repository identifies Gopter as MIT licensed. source
Maker business
Leanovate describes itself as a software development company supporting product implementation, technical scaling, digital transformation, organizational development, workshops, and training. source
Maker size
Leanovate is listed as having 11–50 employees. source
Module version
pkg.go.dev lists version v0.2.11, published April 3, 2024. source
Platform and delivery
The project is a Go module with module path github.com/leanovate/gopter and declares Go 1.20. source
Property testing
It creates properties from condition functions and generated inputs. source
Purpose
Gopter brings ScalaCheck-style property testing to Go. source
Purpose
Gopter is a Go property-testing library that brings ideas from ScalaCheck and QuickCheck to Go. source
Regex generation
It includes a generator for regular-expression matches. source
Regex support
Gopter includes a generator for regex matches. source
Reporting
Gopter provides console and formatted reporters for test results. source
Shrinking
Its shrinkers automatically find the minimum value that falsifies a property. source
Shrinking
Its shrinkers automatically seek a minimum value that falsifies a property. source
Stateful testing
Gopter supports stateful tests. source

Checked against the maker's pages on 2 Oct 2026.