Freedom251 › Property-Based Testing Tools
StreamData

What StreamData is
StreamData is an Elixir library for generating data and writing property-based tests with ExUnit. It supplies generators that you can combine into custom generators, and those generators also work as streams of random data through Elixir’s Enumerable protocol. Its ExUnitProperties module runs properties with generated inputs to look for cases that disprove expected behavior. When a generated value causes a failure, StreamData can shrink it toward a simpler example, which can make the failure easier to understand and reproduce. Reusing the seed from the failing run lets you reproduce it; the library does not store counter-examples in a file. StreamData is written entirely in Elixir and provides an idiomatic Elixir API. The project recommends adding it as a dependency in the test environment, where it can support tests and test-data generation. To install it, add the `stream_data` dependency and run `mix deps.get`. It is free under the Apache License 2.0, and online documentation is available through HexDocs. StreamData does not support stateful property-based testing.
Who it suits
StreamData suits Elixir developers who use ExUnit and want to generate inputs for property-based tests or test data. It is also useful when a failing generated value needs to be reduced to a simpler example and reproduced with its seed.
What it does well
- Combines generators to create custom data generators.
- Generators can also produce streams of random data.
- Shrinks failing values toward simpler examples.
- Reproduce failures by reusing the original seed.
- Free under the Apache License 2.0.
What to know first
- Does not support stateful property-based testing.
- Does not save counter-examples to a file.
Limits
StreamData does not support stateful property-based testing and does not store counter-examples in a file.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| StreamData | Elixir library for data generation and property-based testing · Apache License 2.0 | Free |
As github.com lists them, read 8 Oct 2026. The maker's own page has the final word.
Getting started
- Open the StreamData repository on GitHub.
- Add `stream_data` as a dependency in the test environment.
- Run `mix deps.get`.
- Read the online documentation on HexDocs.
Verdict
Choose StreamData if you write Elixir tests with ExUnit and want generated inputs, shrinking, and reproducible failures. Look elsewhere if your property-based tests need stateful testing or saved counter-examples.
Questions
How much does StreamData cost?
StreamData is free; its listed plan is free.
Which language and test runner does it support?
It is written in Elixir and supports ExUnit.
Can it shrink a failing test case?
Yes. It can reduce failing values toward simpler examples.
Can failures be reproduced?
Yes. Reusing the seed that caused a failure can reproduce it.
Is StreamData open source?
The repository README identifies its license as Apache License 2.0.
How do I install it?
Add the `stream_data` dependency in the test environment and run `mix deps.get`.
Facts from StreamData's own pages
- Documentation
- The repository links to online StreamData documentation on HexDocs. · github.com, 8 Oct 2026
- Generators
- It provides generators and functions for combining them into custom generators. · github.com, 8 Oct 2026
- Installation
- The README instructs users to add the stream_data dependency and run mix deps.get. · github.com, 8 Oct 2026
- Language implementation
- The project says it is written entirely in Elixir and provides an idiomatic Elixir API. · github.com, 8 Oct 2026
- License
- The repository README identifies the license as Apache License 2.0. · github.com, 8 Oct 2026
- Limitation
- The README says StreamData does not support stateful property-based testing. · github.com, 8 Oct 2026
- Property tests
- Its ExUnitProperties module provides property-based testing that generates inputs to try to falsify code properties. · github.com, 8 Oct 2026
- Purpose
- StreamData is an Elixir library for data generation and property-based testing. · github.com, 8 Oct 2026
- Random data streams
- Generators implement Elixir's Enumerable protocol and can be used as streams of random data. · github.com, 8 Oct 2026
- Reproducibility
- The README says failures can be reproduced by reusing the seed that caused them; it does not support storing counter-examples in a file. · github.com, 8 Oct 2026
- Shrinking
- Generators can shrink failing values toward simpler examples to make property test failures easier to understand and reproduce. · stream-data.hexdocs.pm, 8 Oct 2026
- Test dependency
- The README recommends adding StreamData as a dependency in the test environment because it is used for tests and test data generation. · github.com, 8 Oct 2026
Where StreamData stands on Freedom251
- Property-Based Testing Tools#23 of 28