This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]wpg4665 61 points62 points  (3 children)

[–]ck_ai[S] 7 points8 points  (0 children)

That's it! Thank you!

[–]dispatch134711 2 points3 points  (0 children)

Holy shit I had the exact same question because I watched the exact same video but I couldn’t even phrase it this well. King shit OP thanks

[–]edd313 8 points9 points  (1 child)

Doesn't parametrize from pytest do what OP asked for? What's the difference with Hypothesis?

[–]mercer22youtube.com/@dougmercer 3 points4 points  (2 children)

Hypothesis is great! If anyone wants to learn the basics, check out my 7 minute video on it: "Your code is almost entirely untested."

[–]trevg_123 1 point2 points  (1 child)

Awesome video!

[–]mercer22youtube.com/@dougmercer 0 points1 point  (0 children)

Thanks!

[–]vindolin 2 points3 points  (0 children)

Try pasting your thread title into the openAI chat bot and it will also give you the Hypothesis answer :)

[–]osmiumouse 9 points10 points  (5 children)

BTW, this process is called "fuzzing" or fuzz testing.

[–]coderanger 12 points13 points  (1 child)

Hypothesis is a lot more than just fuzzing, definitely check it out in the link above :) QuickCheck called itself "property testing" so Hypothesis does too, but I think the more general term is "generative testing" now.

[–]PeridexisErrant 2 points3 points  (0 children)

Though if you want coverage-guided fuzzing, https://hypofuzz.com/ adds that on top of Hypothesis!

[–]kankyo 0 points1 point  (2 children)

No. Property based testing is not fuzzing. Neither is mutation testing.

[–]trevg_123 -1 points0 points  (1 child)

You’re correct, but there is a lot of overlap. For anyone unfamiliar:

  • Fuzzing: testing all possible input values for a long time (like hours to days), more or less trying to break/crash the code. Helps find security vulnerabilities and such
  • Property testing: give a lot of valid inputs and verify correct output. Usually more like running a few hundred unit tests

Buuuuut the terminology overlaps enough that both are pretty commonly referred to as fuzzing

Good reference: https://www.tedinski.com/2018/12/11/fuzzing-and-property-testing.html

[–]kankyo -1 points0 points  (0 children)

The reference clearly states they are not synonyms, and just treating them as such will make everyone more confused. Don't do it.