Questions about Property Testing / Stream Data

Awesome! Would you be interested in writing those then? Should they be published on the blog with a link to the forum at the end for discussion? We probably need a better name too! :smiley:

5 Likes

Sure! I’m happy to help.

That’s a great idea, wonderful way to encourage conversation :thumbsup:

5 Likes

Perfect, I will ping you in private to figure out the details.

Meanwhile the Development page on the website is live: https://elixir-lang.org/development.html

Feedback is welcome!

5 Likes

TMiX → This month in Elixir.

A pun to all the “this week in X” known from other languages. Also a pun to our primary build tool which assemblies source code to modules and applications. Which the newsletter does as well in a sense

2 Likes

I like everything about it except the name. At least SOME indication that it’s about property based testing would be nice.

After its inclusion in Elixir, we will have two modules: Stream.Data and ExUnit.Properties. The library name (stream_data) will be fully gone by then. :slight_smile:

3 Likes

I’m curious, why the gen macro is part of ExUnitProperties. The other two macros are surely test related, but creating custom generators using the gen macro doesn’t seem like it would only be useful in a testing context.

1 Like

That’s a very good question. We have debated it as well as but it ultimately felt out of place in both ExUnitProperties and in StreamData. So we decided to go with a more conservative approach and keep it in ExUnitProperties. We can always add it to StreamData later.

1 Like

I’d put my vote on making it available with StreamData. I’ve created some date/time/datetime generators some time ago and just now also a version without depending on ExUnitProperties. The macro version is certainly more readable and also seems easier to understand for someone not intimate with the library. If I’d want to use them outside of a testing context (which seems to be the goal for the generators) I’d need to go with the less readable version:

3 Likes

I’m using StreamData with generators in my ProtocolEx sub-projects without using ExUnit anything (as it is a compile-time enforcement thing, not a MIX_ENV=test type thing, though those are used too).

Awesome gists, thank you.

I’ve just read on the elixir-lang.com StreamData post that the core team decided against including StreamData in the standard library.

What were the reasons behind that decision?

2 Likes