nw-pbt-erlang-elixir

Solid

Erlang/Elixir property-based testing with PropEr, PropCheck, and StreamData frameworks

Testing & QA 526 stars 55 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
91
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# PBT Erlang/Elixir -- PropEr, PropCheck, StreamData ## Framework Selection | Framework | Language | Stateful | Parallel | Choose When | |-----------|----------|----------|----------|-------------| | PropEr | Erlang | Yes | Yes (linearizability) | Erlang projects needing full stateful/parallel testing | | PropCheck | Elixir | Yes (via PropEr) | Yes (via PropEr) | Elixir projects needing stateful/parallel testing | | StreamData | Elixir | No | No | Elixir projects needing only stateless PBT | PropCheck wraps PropEr with Elixir syntax. StreamData is pure Elixir but lacks stateful testing. ## Quick Start ```erlang %% PropEr (Erlang) -include_lib("proper/include/proper.hrl"). prop_sort_preserves_length() -> ?FORALL(List, list(integer()), length(lists:sort(List)) =:= length(List)). %% Run: proper:quickcheck(my_module:prop_sort_preserves_length()). ``` ### Syntax Differences | Concept | PropEr (Erlang) | PropCheck (Elixir) | StreamData (Elixir) | |---------|-----------------|--------------------|--------------------| | Import | `-include_lib("proper/include/proper.hrl").` | `use PropCheck` | `use ExUnitProperties` | | Property | `?FORALL(X, gen(), body)` | `forall x <- gen() do body end` | `check all x <- gen() do assert body end` | | Integer | `integer()` | `integer()` | `integer()` | | List | `list(integer())` | `list(integer())` | `list_of(integer())` | | Run | `proper:quickcheck(prop())` | `mix test` | `mix test` | ## Generator Cheat Sheet (PropEr) ### Pr...

Details

Author
nWave-ai
Repository
nWave-ai/nWave
Created
3 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category