hauleth

hauleth

Guidance Counsellor

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

Showing Posts 1 to 9

dimitarvp

dimitarvp

Mind documenting this library a little further? I looked at your example but couldn’t quite grok it, f.ex. what do generate_commands do exactly, and how run_commands runs under the hood. Looked at the code but it seemed that I have to read the entire file to understand which at the time I didn’t do.

Are you willing to provide a few more examples in the repo and attach detailed explanations to them?

hauleth

hauleth OP

Yes, I was working on it. I should release version with updated documentation today.

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

What issues were you having with Propcheck? Personally I think there’s some room for making prop check’s api a bit more friendly and I’d love to see more effort go in that direction since the internals are already very solid.

hauleth

hauleth OP

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.

sorentwo

sorentwo

Oban Core Team

Funny you ask, in addition to Fred’s book I learned how to make stateful models from your Redis model example =)

My two primary issues are:

  1. While working out the generators it stores the failing examples in a file and immediately runs them when I start the next pass. That is a great workflow when I’m fixing failure cases, but not when the issues are coming from my generators and model code.
  2. The built in generators are very limited in comparison to stream_data. I have to build up generators from more primitive primitives. If I want to test ascii strings with a minimum and maximum length I have a lot of work to do, with stream_data I can use string/2.
  3. Assertion errors aren’t reported as well, which could just user error on my part.
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.

hauleth

hauleth OP

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.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews