A property-based testing library for Elixir, built as a wrapper around the PropEr framework.
PropCheck is a property-based testing library for Elixir that provides an interface to PropEr, an Erlang-based property testing framework inspired by QuickCheck. It enables developers to write robust, automated tests by generating random inputs to verify that properties hold for all possible cases, catching edge cases that traditional example-based tests might miss.
Elixir developers who need to write comprehensive, automated tests for their applications, particularly those working on stateful systems or seeking to catch edge cases through random input generation.
Developers choose PropCheck for its seamless integration with Elixir's ExUnit, support for state-based testing and targeted property-based testing (TPBT), and its philosophy of using carefully crafted type generators for precise testing, rather than relying on automatic derivation.
Property based Testing for Elixir (based upon PropEr)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Properties automatically execute via Elixir's built-in ExUnit when running `mix test`, making integration straightforward without extra setup.
Supports property testing of stateful systems through `PropCheck.StateM.ModelDSL` and its newer DSL, enabling complex model-based verification as documented in the README.
Implements Targeted Property Based Testing (TPBT) to automatically search for more effective test data, improving coverage for edge cases, as described in `PropCheck.TargetedPBT`.
Stores counterexamples in a configurable file and offers verbose output with global exception detection via environment variables, aiding in debugging failing tests.
Does not support automatic derivation of type generators from Elixir @spec annotations, requiring manual crafting which increases initial setup time and effort.
Has only very limited support for parallel testing, as admitted in the README, which may hinder testing of concurrent or distributed systems effectively.
Licensed under GPL 3 due to PropEr dependency, raising potential copyleft issues for projects that distribute binaries with test code, necessitating legal caution.