Thanks for your answer Max, When I think about using fuzzers outside elm-test one of the use cases I have in mind is something à la devcards https://github.com/bhauman/devcards
If you don't know about it it's a very useful tools used by the clojurescript community to mount a UI using different snapshots of its state and observe how it changes. I wrote an article not so long ago about using generative models to observe your UI under edge cases (https://juxt.pro/blog/posts/generative-ui-clojure-spec.html) (live example here https://frankiesardo.github.io/speccards/#!/speccards.app). Because Elm is strictly typed this should actually be a lot easier to implement :) Faker is good, but actually using randomly generated data derived from your type system ensures you have chosen the good type representation in the first place On Tuesday, December 6, 2016 at 3:09:20 AM UTC, Max Goldstein wrote: > > Hi Frankie, thanks for trying Elm, glad you like it! > > >> But why isn't the ability to create fuzzy records/data available outside >> that package? What I usually do is to stub out the UI given a certain model >> type. Being able to call fuzzy generators in my Main namespace to populate >> the model makes it easier iterate on an initial design and can still be >> very useful to run the application in 'mock mode'. Any chance we can see >> the generators extracted in their own library? > > > I'm the co-author of elm-test. We're going to add a way to run fuzzers > outside of elm-test <https://github.com/elm-community/elm-test/issues/82> > but that's probably not what you want. The fuzzers are designed to produce > edge cases, and most of the work that goes into them is around being able > to shrink values into smaller forms to obtain a minimal test failure. Test > data is fundamentally different from mocked data, especially if you want to > be able to do UI design or take screenshots (i.e. for documenting your UI). > I think you may want random-extra > <http://package.elm-lang.org/packages/elm-community/random-extra/latest> > which > includes a lot of similar helper functions, though it's still fairly > primitive. > > Long-term, I would love for someone to port part of faker > <https://github.com/stympy/faker> to Elm. > > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
