hauleth

hauleth

StreamState - stateful testing implemented on top of StreamData

There is long running issue on stream_data library to implement such functionality. In the meanwhile I have created this small library (still WIP) using @alfert counter statem implementation as a base.

It implements API similar to eqc_statem, however there is still a lot of unimplemented hooks. For now supported hooks are:

  • */n
  • *_args/1
  • *_command/1
  • *_pre/2
  • *_post/3
  • *_next/3
  • weight/2

Most Liked

hauleth

hauleth

My biggest issue is the license as in some projects I am not allowed to use it (as legal do not allow GPL code) and in other it is PITA to need to double license project or use different license for tests and code.

hauleth

hauleth

It is more than that. GPL is very opinionated, and about some clauses there is no consensus how to treat them. Though I prefer to give freedom to the developers, so I prefer more permissive licenses. I am more OSI/BSD guy rather than FSF/GNU. So for me this is also slightly ideological problem.

keathley

keathley

Fair enough.

sorentwo

sorentwo

Oban Core Team

After fighting a lot with PropCheck last week I went and checked the long standing stream_data issue. Naturally it led me to stream_state.

I greatly prefer the ergonomics and documentation of stream_data and would love to use stream_state for some models. My assumption is that the hooks behave similarly to Proper’s, but there are still ambiguities such as whether it uses symbolic variables.

Thanks for releasing it, I’ll be watching the progress.

keathley

keathley

I’ve definitely felt some of these same pain points.

I’m sure that a PR to add some more generators would be welcome. I end up needing the same types of things in all of my projects with proper and haven’t taken the time to open PRs for them. I find the assertions for stateless tests in proper to be fine. I think in theory the stream data reporting is nicer but I have so much trouble getting stream data to shrink failing cases to a reasonable size that its hard to have a real comparison. The reporting for Proper’s stateful tests could certainly use some love though just to make them more readable. That would probably go a really long way towards making them more approachable.

Yeah this tends to come up. We got permission to use it at work since we’re never shipping the test code to our servers. The same is true for my open source stuff. But I’m not a lawyer and I get that GPL tends to scare people.

Where Next?

Popular in Libraries Top

scohen
Lexical Lexical is a next-generation language server for the Elixir programming language. Features Context aware code completion As-you...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
sasajuric
I’d like to announce a small library called boundaries. This is an experimental project which explores the idea of enforcing boundaries ...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
tfwright
After working on it for a couple of months and using it in production for most of that time, today I’ve released LiveAdmin, a LiveView ba...
New
mbuhot
EctoJob A transactional job queue built with Ecto, PostgreSQL and GenStage Available on Hex.pm: ecto_job | Hex Docs: API Reference — ec...
New
zorbash
I created Kitto a framework for dashboards inspired by Dashing. [demo] The distributed characteristics of Elixir and the low memory foo...
New
engineeringdept
I’ve just released the first version of Snap, an Elasticsearch client. It borrows ideas about application structure and process managemen...
New
Qqwy
While not as prevalent as in imperative languages, arrays (collections with efficient random element access) are still very useful in Eli...
New
vic
Expat is a tiny experiment I did for extracting patterns and being able to reuse them (compose and share patterns between elixir librarie...
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

Sub Categories:

We're in Beta

About us Mission Statement