A property-based testing library for Elixir, implementing QuickCheck-style testing with ExUnit integration.
ExCheck is a property-based testing library for Elixir, inspired by QuickCheck. It enables developers to write robust tests by specifying properties that should hold for a wide range of generated inputs, rather than relying on fixed examples. The library integrates seamlessly with ExUnit, Elixir's built-in test framework, making it easy to adopt in existing test suites.
Elixir developers who want to enhance their test suites with property-based testing, particularly those already using ExUnit and seeking to improve code reliability through automated input generation.
Developers choose ExCheck for its simplicity and tight integration with ExUnit, providing a lightweight wrapper around the Erlang triq library that brings powerful property-based testing to Elixir without unnecessary complexity.
Property-based testing library for Elixir (QuickCheck style).
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
ExCheck macros seamlessly embed into ExUnit test cases, supporting async testing and per-property iteration control via tags, as shown in the sample test code with @tag iterations.
Imports a wide range of generators from triq, including integers, lists, tuples, atoms, binaries, and Unicode strings, enabling diverse input generation for comprehensive testing.
Provides implies and such_that constructs to filter or constrain generated data based on predicates, useful for targeting specific scenarios without manual input crafting.
Allows setting test iterations globally via mix config or per-property using ExUnit tags, offering flexibility in test depth and performance tuning.
Admitted as a 'trial implementation' in the README, ExCheck lacks advanced property-based testing features like stateful testing, complex shrinking, or detailed failure reporting.
Requires erlang-eunit to build the underlying triq library, adding an extra dependency that can complicate setup and increase project overhead.
Test output is textual with simple symbols (dots and x's), lacking interactive or graphical tools for exploring failed cases, which can hinder debugging efficiency.