String Fuzzer Library


#1

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 https://github.com/Y0hy0h/string-fuzzers.

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:


#2

Full unicode string fuzzer’s would be cool as well


#3

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.


#4

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.


#5

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.


#6

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.


#7

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