Gopter
github.com
What it 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 provide more 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 seek a smaller value that still demonstrates the failure. Gopter also includes a generator for regular-expression matches and supports stateful tests based on arbitrary commands. Properties can run with Go's testing.T through TestingRun, and the gopter/convey package provides helpers for using Gopter inside GoConvey tests. Console and formatted reporters present test results. The project declares Go 1.20 and is distributed under the MIT License. Its documentation covers the gopter, gen, prop, arbitrary, commands, and convey packages. The README identifies two omissions: ScalaCheck's Pretty feature is not provided, and parallel commands are not available yet.
Spec sheet
- Purpose
- Gopter is a Go property-testing library that brings ideas from ScalaCheck and QuickCheck to Go.Read 2 Oct 2026 · github.com
- License
- The repository identifies Gopter as MIT licensed.Read 2 Oct 2026 · github.com
- API usage
- The package provides TestingRun for running property checks with a Go testing.T context.Read 30 Sep 2026 · pkg.go.dev
- Commands limitation
- The README says parallel commands are not available yet.Read 30 Sep 2026 · github.com
- Documentation packages
- Documentation covers gopter, gen, prop, arbitrary, commands, and convey packages.Read 30 Sep 2026 · github.com
- Generator composition
- Generators support operations including Map, FlatMap, SuchThat, and WithShrinker.Read 2 Oct 2026 · pkg.go.dev
- Generators
- It provides tighter control over generators than Go's testing/quick package.Read 2 Oct 2026 · github.com
- GoConvey
- The gopter/convey package provides helpers for using Gopter inside GoConvey tests.Read 2 Oct 2026 · github.com
- GoConvey integration
- The convey package provides helpers used by Gopter inside GoConvey tests.Read 30 Sep 2026 · github.com
- Known limitation
- The README notes that Gopter does not provide ScalaCheck's Pretty feature and has no parallel commands yet.Read 2 Oct 2026 · github.com
- Maker business
- Leanovate describes itself as a software development company supporting product implementation, technical scaling, digital transformation, organizational development, workshops, and training.Read 30 Sep 2026 · linkedin.com
- Maker size
- Leanovate is listed as having 11–50 employees.Read 30 Sep 2026 · linkedin.com
- Module version
- pkg.go.dev lists version v0.2.11, published April 3, 2024.Read 30 Sep 2026 · pkg.go.dev
- Platform and delivery
- The project is a Go module with module path github.com/leanovate/gopter and declares Go 1.20.Read 2 Oct 2026 · github.com
- Property testing
- It creates properties from condition functions and generated inputs.Read 2 Oct 2026 · github.com
- Regex generation
- It includes a generator for regular-expression matches.Read 2 Oct 2026 · github.com
- Regex support
- Gopter includes a generator for regex matches.Read 30 Sep 2026 · github.com
- Reporting
- Gopter provides console and formatted reporters for test results.Read 2 Oct 2026 · pkg.go.dev
- Shrinking
- Its shrinkers automatically seek a minimum value that falsifies a property.Read 2 Oct 2026 · github.com
- Stateful testing
- Gopter supports stateful tests.Read 30 Sep 2026 · github.com
- Stateful tests
- It supports stateful tests based on arbitrary commands.Read 2 Oct 2026 · github.com
- Support channel
- The project is hosted in a public GitHub repository with an Issues section.Read 30 Sep 2026 · github.com
- Testing integration
- Properties can be run with Go's testing.T through TestingRun.Read 2 Oct 2026 · pkg.go.dev
- Testing scope
- Gopter is described as a more sophisticated version of Go's testing/quick package.Read 30 Sep 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Shrinks failing inputs toward smaller examples.
- Supports stateful tests using arbitrary commands.
- Includes a regular-expression match generator.
- Runs properties with Go's testing.T.
- MIT-licensed Go module.
Limits
- Does not provide ScalaCheck's Pretty feature.
- Parallel commands are not available.
- Project declares Go 1.20.
Who it suits
Gopter suits Go developers who want property-based testing, generator control, shrinking, or stateful tests. It can also fit projects using GoConvey or Go's testing.T.
Gopter in depth
Read the full write-up
Gopter is a Go module for property-based testing, best suited to Go developers who want generated inputs and more control than testing/quick offers. Its combination of shrinking, stateful tests and Go test integrations makes it a capable choice for finding counterexamples; the lack of parallel commands and ScalaCheck’s Pretty feature narrows its fit.
Overview
Instead of writing every test case by hand, developers define properties as condition functions and let Gopter evaluate them against generated inputs. That approach is useful when behavior must hold across a range of cases, especially when the input space is awkward to enumerate. Gopter is a Go library rather than a hosted service, so its value is in the testing tools it brings into a Go project.
The MIT-licensed module is published as github.com/leanovate/gopter and declares Go 1.20. Its API includes TestingRun, which runs property checks with a Go testing.T context. That keeps property checks within Go’s testing package rather than requiring a separate runner.
Key features
Gopter gives developers tighter control over generators than Go’s testing/quick. Composition operations including Map, FlatMap, SuchThat and WithShrinker let a test shape both its inputs and their reduction. This is useful when default random values do not reflect the cases a property needs to cover, though it also means the test author must decide how to compose the generators.
When a generated input breaks a property, shrinkers search for a minimum value that still falsifies it. That makes a complicated failure more tractable to diagnose, and failures are reproducible so the counterexample can be revisited. Gopter also has a generator for regular-expression matches, a focused aid for properties involving strings constrained by patterns.
Stateful tests let developers express behavior through arbitrary commands, extending checks beyond isolated inputs to command-based behavior. The gopter/convey package supplies helpers for using Gopter inside GoConvey tests, while console and formatted reporters present results. Documentation covers the gopter, gen, prop, arbitrary, commands and convey packages.
There are meaningful omissions for teams expecting a fuller ScalaCheck-style toolkit: the README says parallel commands are not available yet, and Gopter does not provide ScalaCheck’s Pretty feature. Those limits matter most when parallel command execution or that formatting capability is central to a test workflow.
Pricing
Gopter is free: both the MIT-licensed package plan and the Gopter plan cost free. There is no paid tier to compare or trial period to plan around. The free package is the whole offering, so the trade-off is its feature scope rather than a seat cap or usage quota.
Platforms
Gopter runs as a Go module on Linux and in self-hosted environments. It supports Go as its language, with the Go testing package and GoConvey as test-runner integrations. It is not a cross-language testing service; teams choosing it should be working in Go.
Who it's for
Gopter is a strong fit for Go developers who want to test properties over generated inputs, need control over generators, or want failing cases shrunk to a smaller counterexample. Its regex generator and stateful command testing broaden the kinds of properties it can address. GoConvey users can adopt its integration helpers, while teams standardized on Go’s testing package can use TestingRun.
It is a weaker fit for teams that require parallel commands or ScalaCheck’s Pretty feature, or for projects written in a language other than Go. It also suits developers prepared to work with composable generators rather than those looking for a managed testing service.
Pros and cons
Pros
Generator control: Composition operations let Go developers tailor generated inputs and shrinking behavior beyond testing/quick.
Useful failure reduction: Shrinkers find a minimum falsifying value, and reproducible failures make counterexamples easier to revisit.
More than isolated inputs: Regex-match generation and stateful tests based on arbitrary commands cover distinct testing needs.
Fits Go test workflows:TestingRun works with testing.T, and the convey package adds GoConvey helpers.
No purchase barrier: The MIT-licensed Go package costs nothing.
Cons
No parallel commands: Teams that need command sequences to run in parallel will need another approach.
No ScalaCheck Pretty feature: Users who depend on that capability will not find it in Gopter.
Go-specific scope: The module targets Go, so it is not a shared property-testing choice for mixed-language teams.
Alternatives
For a broader comparison, see Property-Based Testing Tools. Developers comparing property-testing libraries across operating systems may consider Hypothesis, which is free and supports Linux, macOS and Windows. For JavaScript or TypeScript projects, fast-check is a free MIT-licensed option with Linux, web and API platforms.
For Haskell users, QuickCheck is a free Linux library for random testing of program properties. Scala teams may prefer Scala Hedgehog, a free open-source Scala testing library with no paid plans listed. CsCheck is a free, forever option under Apache 2 for self-hosted use, while PropEr is free GPL-licensed software for self-hosted use. OCaml developers can choose QCheck, a free Linux property-testing library under BSD-2-Clause. RapidCheck is another free option, supporting Linux, self-hosted and Windows platforms.
Verdict
Choose Gopter if you write Go and want property-based tests with composable generators, automatic shrinking and integrations for Go testing or GoConvey—all in a free MIT-licensed module. Look elsewhere if parallel commands or ScalaCheck’s Pretty feature are requirements, or if your project is not in Go.
Verdict
Gopter offers property generation, shrinking, and stateful testing in a Go module, with integrations for Go testing and GoConvey. Its documented gaps include no parallel commands and no ScalaCheck Pretty feature.
Where Specifiction places it
- Property-Based Testing Tools#2 of 288.6