ex_machina + stream_data
ibarchenkov opened this issue · 1 comments
Hello ex_machina maintainers.
I've discovered that data for Ecto factories could be generated using StreamData library. Here's an example. The most compelling thing to me in this approach is that I can define one set of functions and use them simultaneously as Ecto factories in unit/controller tests and as generators in property-based testing.
I have a working solution and almost ready to share it with the community.
Please, consider the following questions:
- Do you want me to contribute such functionality to your project?
- If not, do you mind if I borrow some code in
params_for*
functions?
Thank you.
Hi @ibarchenkov, thanks for reaching out! I haven't had the chance to use StreamData
yet, but property-based testing is something near the top of my list to devote some time into. Given that I'm not familiar with that, I'm not sure I can judge whether what you're talking about would be a good addition to ExMachina
or not. So unfortunately I don't think contributing that functionality to the project would be a good idea yet before I can give that some more serious research and thinking.
To your other question,
If not, do you mind if I borrow some code in params_for* functions?
Absolutely don't mind! If you find something useful in the codebase, feel free to copy it.
And maybe once I get more well versed with property-based testing and StreamData
, I'll come back here and ask you how it's going!
Either way, thank you for reaching out and asking!