Gopter is a free Go module for property-based testing: it generates inputs for conditions you define and checks the resulting properties. Its generator controls offer more options than Go's testing/quick package, with composition operations including Map, FlatMap, SuchThat and WithShrinker. When a property fails, shrinkers look for a smaller input that still reproduces the failure. Gopter also 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, and the gopter/convey package provides helpers for using Gopter within GoConvey tests. Console and formatted reporters display results. Documentation covers the gopter, gen, prop, arbitrary, commands and convey packages. The project declares Go 1.20 and uses the MIT License. Its README notes that it lacks ScalaCheck's Pretty feature and does not yet offer parallel commands. The package is listed at 0.00 USD per free.
Who it is for
Gopter is suited to Go developers who want generated inputs, shrinking and stateful property checks alongside the Go testing package or GoConvey.
What is good
- Shrinks failing inputs toward a smaller counterexample.
- Supports stateful tests with arbitrary commands.
- Runs properties with Go's testing.T.
- Provides helpers for GoConvey tests.
- Generators support Map, FlatMap, SuchThat and WithShrinker.
What to know first
- No parallel commands yet.
- Does not provide ScalaCheck's Pretty feature.
- Requires Go 1.20, as declared by the project.
Freedom251 review
Gopter: the full review
Gopter offers generator composition, shrinking and testing integrations for Go property checks. Its documented gaps are the lack of ScalaCheck's Pretty feature and parallel commands.
Overview
Gopter brings property-based testing to Go, for developers who want to check conditions against generated inputs rather than rely only on hand-picked examples. Its strong point is control over generators and the ability to shrink a failure to a smaller counterexample; its clearest trade-off is that it lacks ScalaCheck’s Pretty feature and parallel commands.
Key features
Gopter is a more sophisticated alternative to Go’s testing/quick, particularly when the shape of generated data matters. Generator operations including Map, FlatMap, SuchThat and WithShrinker give developers ways to compose inputs and control reduction. When a generated case breaks a property, shrinking searches for a minimum value that still falsifies it. That makes the failure easier to inspect, while reproducible failures let developers return to the same problem.
The library also generates strings matching regular expressions and supports stateful tests based on arbitrary commands. Those capabilities suit properties involving constrained text or behavior across command sequences, not just isolated inputs. Gopter offers console and formatted reporters for results. Its TestingRun API runs checks with Go’s testing.T context, and gopter/convey adds helpers for using properties inside GoConvey tests.
Documentation covers the gopter, gen, prop, arbitrary, commands and convey packages. The project declares Go 1.20 and is distributed under the MIT License. The README identifies two meaningful omissions: no ScalaCheck-style Pretty feature and no parallel commands. Teams that depend on either should consider another tool rather than assume these workflows are covered.
Pricing
Gopter is free: both the MIT-licensed package and the Gopter plan cost 0.00 USD per free. There is no paid tier or free trial. The free package is the whole offering, so it fits individual developers and teams that can use a Go library under the MIT License; there is no lower tier with reduced functionality or paid plan for added capacity.
Platforms
Gopter is a Go module for Linux and self-hosted use, with module path github.com/leanovate/gopter. It supports Go, Go’s testing package and GoConvey. This is a library-oriented choice rather than a web test service, so it suits projects running tests in their own Go environment.
Who it's for
Choose Gopter if you write Go and want configurable generators, automatic shrinking and support for stateful properties within familiar Go test workflows. It is especially useful when generated failures need to be reduced to actionable cases. It is a weaker fit for teams that need parallel commands or ScalaCheck’s Pretty feature, or developers working outside Go.
Pros and cons
- Pros: Composable generator operations offer tighter input control than testing/quick.
- Pros: Shrinking and reproducible failures help turn a failing generated case into a smaller debugging target.
- Pros: Regex generation, stateful testing, Go testing integration and GoConvey helpers cover several Go testing styles.
- Pros: The MIT-licensed package is free, with no paid-plan boundary.
- Cons: Parallel commands are not available, limiting teams that need that form of test execution.
- Cons: The absence of ScalaCheck’s Pretty feature may matter to developers who expect that capability.
Alternatives
For other choices, browse Property-Based Testing Tools. Pick fast-check if your work is in JavaScript or TypeScript and you want a free, MIT-licensed public project; Scala Hedgehog is the free Scala-oriented option. CsCheck is another free, self-hosted choice, under Apache 2. For Haskell random property testing, consider QuickCheck. If you want a free, open-source Go library with no dependencies outside the standard library, Rapid is a direct alternative. Hypothesis, RapidCheck and Proptest are also alternatives.
Verdict
Gopter is a sound choice for Go developers who want to build richer property checks, narrow failures automatically and keep tests in Go’s testing or GoConvey workflows, all at no cost. Its generator control and shrinking are the main reasons to choose it over testing/quick; look elsewhere if parallel commands or ScalaCheck’s Pretty feature are requirements.
Gopter plans and pricing
All plansCompared on property-based testing tools
- Free plan
- Yes
- Supported languages
- Go
- Test runner support
- Go testing package; GoConvey
- Failing-case shrinking
- Yes
- Stateful testing
- Yes
- Reproducible failures
- Yes
