String Fuzzer Library

I used some non-standard string fuzzers in my test recently and was wondering whether it would be a good idea to publish them as a package. Currently, I have three fuzzers:

  • nonemptyStringFuzzer
  • nonblankStringFuzzer (at least one printable, i. e. non-whitespace, character)
  • whitespaceStringFuzzer

Would there be interest in my publishing of these sorts of fuzzers? What are things I might consider?

The repo containing them is at GitHub - j-maas/string-fuzzers: Control what types of strings to use in fuzz tests..

I am asking because I’ve read some time ago that generators for the fuzzers in the elm-explorations/test library are not exposed, because of concerns with people messing around with them without really understanding what they are doing. E. g. filtering fuzzers’ results instead of generating correct values. So I wanted to make sure I didn’t get into something that other people have decided against for good reasons. Hope you understand where I’m coming from. :smiley:

Full unicode string fuzzer’s would be cool as well

A full unicode string fuzzer is coming to elm-test as soon as I have time to port the PR over from the old repo to the new one.

1 Like

My proposal goes slightly beyond unicode. It’s about more precise control over what type of strings get generated. So that can include unicode.

I imagine that it would be similar to e. g. List.Extra, where it’s not part of the “standard library”, but easily added when you need it. This would allow some experimentation.

I have spent some time building a library that given a regular expression will produce a fuzzer for strings that satisfy the regular expression. However I got sidetracked in the intricacies of the specifics of the JavaScript regex spec and its various modes that I never finished the project.

I’ve linked the repo where I uploaded the code. It’s not yet documented and not currently a priority for me, but feel free to check it out and leave an issue or PR. :wink:

Repo is at https://github.com/Y0hy0h/string-fuzzers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.