PropCheck vs SwiftCheck
PropCheck
github.comSwiftCheck
github.comSide by side
| Figure | PropCheck | SwiftCheck |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| macOS | — | Yes |
| Linux | Yes | — |
| iOS | — | Yes |
| Self-hosted | Yes | — |
| Plans published | 1 | 0 |
| Spec score · Property-Based Testing Tools | 8.0 (#7) | 6.5 (#27) |
| Generators | It includes generators for common Ruby data types and a DSL for defining custom generators. | The library provides generator combinators for choosing values, filtering generated values, and composing generators. |
| Installation | The README says to add `gem 'prop_check'` to a Gemfile or install it with `gem install prop_check`. | The README describes installation through Swift Package Manager, Carthage, CocoaPods, or by adding the Xcode project as a framework dependency. |
| License | The project is released under the MIT License. | SwiftCheck is released under the MIT license. |
| Purpose | PropCheck is a Ruby library for property-based testing that checks assertions against generated inputs. | SwiftCheck is a Swift testing library that automatically generates random data to test program properties. |
| Shrinking | When a generated case fails, PropCheck attempts to simplify it to a minimal counterexample. | When a generated test case fails, SwiftCheck reduces the data toward a minimal counterexample. |
Plans
In their own words
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.