Gopter vs PropCheck
Gopter
github.comPropCheck
github.comSide by side
| Figure | Gopter | PropCheck |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Linux | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 2 | 1 |
| Spec score · Property-Based Testing Tools | 8.6 (#2) | 8.0 (#7) |
| Generators | It provides tighter control over generators than Go's testing/quick package. | It includes generators for common Ruby data types and a DSL for defining custom generators. |
| License | The repository identifies Gopter as MIT licensed. | The project is released under the MIT License. |
| Purpose | Gopter is a Go property-testing library that brings ideas from ScalaCheck and QuickCheck to Go. | PropCheck is a Ruby library for property-based testing that checks assertions against generated inputs. |
| Shrinking | Its shrinkers automatically seek a minimum value that falsifies a property. | When a generated case fails, PropCheck attempts to simplify it to a minimal counterexample. |
| Stateful testing | Gopter supports stateful tests. | The README lists stateful property testing as a possible future separate add-on library. |
Plans
In their own words
Gopter
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.
PropCheck
PropCheck is a Ruby library for property-based testing: it generates inputs and checks whether assertions hold across them. When a generated example fails, it tries to simplify that case into a smaller counterexample. Built-in generators cover integers, floats, strings, symbols, arrays, hashes, sets, dates, times and datetimes. A generator DSL lets developers define their own, while the API also supports mapping and binding values, alternatives and weighted frequency choices.
Before, after and around hooks provide setup and cleanup around generated examples. The README gives usage examples for RSpec, MiniTest, test-unit and vanilla Ruby, and says the library has no external dependencies. PropCheck requires Ruby 2.5.1 or later and is released under the MIT License. It is available as a free Community library. Installation can be done through a Gemfile or with `gem install prop_check`. For generated examples involving a database, the README recommends cleaning database state around each example and mentions DatabaseCleaner. Stateful property testing is described as a possible future separate add-on.